[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Update tp/maintain/language-subtag-registry. CHan
From: |
Patrice Dumas |
Subject: |
branch master updated: Update tp/maintain/language-subtag-registry. CHange in spacing in code |
Date: |
Thu, 13 Jan 2022 14:30:02 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 04ed5843b5 Update tp/maintain/language-subtag-registry. CHange in
spacing in code
04ed5843b5 is described below
commit 04ed5843b5aec166ea8a9840bb52462db08afbab
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 13 20:29:32 2022 +0100
Update tp/maintain/language-subtag-registry. CHange in spacing in code
---
tp/maintain/language-subtag-registry | 30 +++++++++-
tp/maintain/regenerate_documentlanguages-iana.pl | 76 ++++++++++++++++++++++++
2 files changed, 105 insertions(+), 1 deletion(-)
diff --git a/tp/maintain/language-subtag-registry
b/tp/maintain/language-subtag-registry
index 3ce374c128..08541bb39a 100644
--- a/tp/maintain/language-subtag-registry
+++ b/tp/maintain/language-subtag-registry
@@ -1,4 +1,4 @@
-File-Date: 2021-05-11
+File-Date: 2021-12-29
%%
Type: language
Subtag: aa
@@ -44793,6 +44793,11 @@ Description: Katakana
Added: 2005-10-16
%%
Type: script
+Subtag: Kawi
+Description: Kawi
+Added: 2021-12-24
+%%
+Type: script
Subtag: Khar
Description: Kharoshthi
Added: 2005-10-16
@@ -45012,6 +45017,11 @@ Description: Burmese
Added: 2005-10-16
%%
Type: script
+Subtag: Nagm
+Description: Nag Mundari
+Added: 2021-12-24
+%%
+Type: script
Subtag: Nand
Description: Nandinagari
Added: 2018-10-28
@@ -45290,6 +45300,11 @@ Description: Sundanese
Added: 2006-07-21
%%
Type: script
+Subtag: Sunu
+Description: Sunuwar
+Added: 2021-12-24
+%%
+Type: script
Subtag: Sylo
Description: Syloti Nagri
Added: 2005-10-16
@@ -47357,6 +47372,12 @@ Added: 2010-10-23
Comments: Indicates that the content is transcribed according to X-SAMPA
%%
Type: variant
+Subtag: gallo
+Description: Gallo
+Added: 2021-08-05
+Prefix: fr
+%%
+Type: variant
Subtag: gascon
Description: Gascon
Added: 2018-04-22
@@ -47779,6 +47800,13 @@ Comments: Sutsilvan is one of the five traditional
written standards or
"idioms" of the Romansh language.
%%
Type: variant
+Subtag: synnejyl
+Description: Synnejysk
+Description: South Jutish
+Added: 2021-07-17
+Prefix: da
+%%
+Type: variant
Subtag: tarask
Description: Belarusian in Taraskievica orthography
Added: 2007-04-27
diff --git a/tp/maintain/regenerate_documentlanguages-iana.pl
b/tp/maintain/regenerate_documentlanguages-iana.pl
new file mode 100755
index 0000000000..10b7547756
--- /dev/null
+++ b/tp/maintain/regenerate_documentlanguages-iana.pl
@@ -0,0 +1,76 @@
+#! /usr/bin/env perl
+
+# regenerate_documentlanguages.pl: download the iana files language
+# and regenerate Texinfo/Documentlanguages.pm list of languages and regions
+#
+# Copyright 2010, 2011, 2012 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+#
+# Original author: Patrice Dumas <pertusus@free.fr>
+#
+# Calling that script for each release could be a good idea.
+
+use strict;
+
+# emulates -w
+BEGIN
+{
+ $^W = 1;
+}
+
+my $dir = 'maintain';
+system ("cd $dir && wget -N
http://www.iana.org/assignments/language-subtag-registry");
+
+open (TXT,"$dir/language-subtag-registry") or die "Open
$dir/language-subtag-registry: $!\n";
+
+my $entry;
+my @entries;
+while (<TXT>) {
+ if (/^%%/) {
+ push @entries, $entry if (defined($entry));
+ $entry = undef;
+ } else {
+ if (/^(\w+): (.*)/) {
+ $entry->{$1} = $2;
+ }
+ }
+}
+push @entries, $entry if (defined($entry));
+if (!defined($entry->{'Type'})) {
+ die "Type not defined for $entry ".join('|', keys(%$entry))."\n";
+}
+
+open (OUT, ">Texinfo/Documentlanguages.pm") or die "Open
Texinfo/Documentlanguages.pm: $!\n";
+
+print OUT "# This file was automatically generated from $0\n\n";
+
+print OUT "package Texinfo::Documentlanguages;\n\n";
+
+print OUT 'our %language_codes = ('."\n";
+foreach my $entry (@entries) {
+ # Scope collection macrolanguage are used
+ if ($entry->{'Type'} eq 'language' and !defined($entry->{'Preferred-Value'})
+ and !defined($entry->{'Macrolanguage'})
+ and (!defined($entry->{'Scope'})
+ or ($entry->{'Scope'} ne 'special'
+ and $entry->{'Scope'} ne 'private-use'))) {
+ print OUT "'$entry->{'Subtag'}' => 1,\n";
+ print STDERR "$entry->{'Subtag'} Scope $entry->{'Scope'}\n"
+ if defined($entry->{'Scope'});
+ }
+}
+print OUT ");\n\n";
+
+print OUT 'our %region_codes = ('."\n";
+foreach my $entry (@entries) {
+ if ($entry->{'Type'} eq 'region' and !defined($entry->{'Preferred-Value'})
+ and $entry->{'Description'} ne 'Private use'
+ and $entry->{'Subtag'} !~ /^\d{3}$/) {
+ print OUT "'$entry->{'Subtag'}' => 1,\n";
+ }
+}
+print OUT ");\n\n1;\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Update tp/maintain/language-subtag-registry. CHange in spacing in code,
Patrice Dumas <=