summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-23 00:46:07 +0200
committerEike Rathke <erack@redhat.com>2015-08-23 00:48:18 +0200
commitfdafa5302df26df4f147b0d2efb6064389a1330c (patch)
tree70db647aaabbeb4b7585533f0992e645193b3e6b /i18nlangtag
parent304ce084e94c92d1b44b16ec1fd9d48dc24019c1 (diff)
adapt mapping lines to current isolang.cxx entries
and some usage comments Change-Id: I264d6e1ed52046e58284a2090eff3e8911c87f6a
Diffstat (limited to 'i18nlangtag')
-rwxr-xr-xi18nlangtag/source/isolang/MS-LCID-to-list.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/i18nlangtag/source/isolang/MS-LCID-to-list.sh b/i18nlangtag/source/isolang/MS-LCID-to-list.sh
index 34fd70904501..0012bfc9cdf5 100755
--- a/i18nlangtag/source/isolang/MS-LCID-to-list.sh
+++ b/i18nlangtag/source/isolang/MS-LCID-to-list.sh
@@ -10,10 +10,21 @@
# http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-LCID%5D.pdf
# downloaded from http://msdn.microsoft.com/library/cc233965.aspx
# At least this worked for Release: Monday, July 22, 2013; 08/08/2013 Revision 6.0
-# downloaded on 2013-10-17
+# Also worked for 6/30/2015 revision 7.0
#
# Uses pdftotext (from poppler-utils), grep and gawk.
-# Files created/overwritten: MS-LCID.txt, MS-LCID.lst, MS-LCID.lst.h
+#
+# The script expects the downloaded [MS-LCID].pdf as MS-LCID.pdf
+#
+# Files created/OVERWRITTEN: MS-LCID.txt, MS-LCID.lst, MS-LCID.lst.h
+#
+# Best invoked in a temporary directory ...
+# Layout may change, diff MS-LCID.lst with ignore spaces against the previous
+# version for changes and additions, e.g.
+# gvimdiff -c 'set diffopt+=iwhite' ../MS-LCID.lst MS-LCID.lst
+# The generated MS-LCID.lst.h file is only a copy&paste help to add entries in
+# isolang.cxx and not to be committed, the #define names have to be adapted for
+# lang.h and isolang.cxx
pdftotext -layout MS-LCID.pdf
grep '^ *0x[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F] ' MS-LCID.txt > MS-LCID.lst
@@ -39,18 +50,18 @@ gawk -e '
{
case 1:
# lll
- mapping = sprintf( " { %-36s %5s, \"\" , false },", usedef, "\"" arr[1] "\"");
+ mapping = sprintf( " { %-36s %5s, \"\" , 0 },", usedef, "\"" arr[1] "\"");
break;
case 2:
if (length(arr[2]) == 2)
{
# lll-CC
- mapping = sprintf( " { %-36s %5s, \"%s\", false },", usedef, "\"" arr[1] "\"", arr[2]);
+ mapping = sprintf( " { %-36s %5s, \"%s\", 0 },", usedef, "\"" arr[1] "\"", arr[2]);
}
else if (length(arr[2]) == 4)
{
# lll-Ssss
- mapping = sprintf( " { %-44s %10s, \"\" },", usedef, "\"" tag "\"");
+ mapping = sprintf( " { %-44s %10s, \"\" , 0 },", usedef, "\"" tag "\"");
}
else
{
@@ -67,7 +78,7 @@ gawk -e '
else if (length(arr[2]) == 4)
{
# lll-Ssss-CC
- mapping = sprintf( " { %-44s %10s, \"%s\" },", usedef, "\"" arr[1] "-" arr[2] "\"", arr[3]);
+ mapping = sprintf( " { %-44s %10s, \"%s\", 0 },", usedef, "\"" arr[1] "-" arr[2] "\"", arr[3]);
}
else
{