summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-03 11:48:23 +0000
committerwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-03 11:48:23 +0000
commita85e768a029af79ddb0cb0c33a632e0706d526d5 (patch)
treea5031c093d0939c512b9acd59a6dbc66fd886c79
parenta70f588db6ca2d5c26454704c14926736d4f57cb (diff)
downloadvdr-plugin-muggle-a85e768a029af79ddb0cb0c33a632e0706d526d5.tar.gz
vdr-plugin-muggle-a85e768a029af79ddb0cb0c33a632e0706d526d5.tar.bz2
up to date language codes
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.3-wr@530 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--scripts/COPYRIGHT31
-rwxr-xr-xscripts/iso639tab.py60
-rwxr-xr-xscripts/languages.txt25
3 files changed, 89 insertions, 27 deletions
diff --git a/scripts/COPYRIGHT b/scripts/COPYRIGHT
index 9b0e8cb..e41ca51 100644
--- a/scripts/COPYRIGHT
+++ b/scripts/COPYRIGHT
@@ -1,16 +1,15 @@
-# the content of languages.txt is taken from the file
-# iso_639.tab which contains this copyright:
-
-
-## iso-639.tab
-##
-## Copyright (C) 2004 Alastair McKinstry <mckinstry@computer.org>
-## Released under the GNU License; see file COPYING for details
-##
-## Last update: 2004-03-29
-##
-## This file gives a list of all languages in the ISO-639
-## standard, and is used to provide translations (via gettext)
-##
-## Status: ISO 639-2:1998 + additions and changes until 2003-03-05
-## Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html
+# the content of languages.txt is generated by iso639tab.py from
+# the file iso_639.xml. iso_639.xml contains this copyright note:
+#
+# <!-- iso-639.tab -->
+# <!-- -->
+# <!-- Copyright (C) 2004 Alastair McKinstry <mckinstry@computer.org> -->
+# <!-- Released under the GNU License; see file COPYING for details -->
+# <!-- -->
+# <!-- Last update: 2004-10-27 -->
+# <!-- -->
+# <!-- This file gives a list of all languages in the ISO-639 -->
+# <!-- standard, and is used to provide translations (via gettext) -->
+# <!-- -->
+# <!-- Status: ISO 639-2:1998 + additions and changes until 2004-03-05 -->
+# <!-- Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html -->
diff --git a/scripts/iso639tab.py b/scripts/iso639tab.py
new file mode 100755
index 0000000..d9d0b86
--- /dev/null
+++ b/scripts/iso639tab.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+#
+# Read iso-codes iso_639.xml data file and output a .tab file
+#
+# Copyright (C) 2005 Alastair McKinstry <mckinstry@debian.org>
+# Released under the GPL.
+# $Id: iso639tab.py,v 1.1 2005/03/02 07:24:51 mckinstry Exp $
+
+# modified by Wolfgang Rohdewald such that it only converts the
+# iso-639-2 bibliography code and the name without comments
+
+from xml.sax import saxutils, make_parser, saxlib, saxexts, ContentHandler
+from xml.sax.handler import feature_namespaces
+import sys, os, getopt, urllib2
+
+class printLines(saxutils.DefaultHandler):
+ def __init__(self, ofile):
+ self.ofile = ofile
+
+ def startElement(self, name, attrs):
+ if name != 'iso_639_entry':
+ return
+ t_code = attrs.get('iso_639_2T_code', None)
+ if t_code == None:
+ raise RunTimeError, "Bad file"
+ if type(t_code) == unicode:
+ t_code = t_code.encode('UTF-8')
+ b_code = attrs.get('iso_639_2B_code', None)
+ if b_code == None:
+ raise RunTimeError, "Bad file"
+ if type(b_code) == unicode:
+ b_code = b_code.encode('UTF-8')
+ name = attrs.get('name', None)
+ if name == None:
+ raise RunTimeError, " BadFile"
+ short_code=attrs.get('iso_639_1_code','XX')
+ short_code=short_code.encode('UTF-8')
+ if type(name) == unicode:
+ name = name.encode('UTF-8')
+ self.ofile.write (b_code + '\t' + name + '\n')
+
+
+##
+## MAIN
+##
+
+
+ofile = sys.stdout
+p = make_parser()
+p.setErrorHandler(saxutils.ErrorPrinter())
+try:
+ dh = printLines(ofile)
+ p.setContentHandler(dh)
+ p.parse(sys.argv[1])
+except IOError,e:
+ print in_sysID+": "+str(e)
+except saxlib.SAXException,e:
+ print str(e)
+
+ofile.close()
diff --git a/scripts/languages.txt b/scripts/languages.txt
index 69ab08c..6378dcc 100755
--- a/scripts/languages.txt
+++ b/scripts/languages.txt
@@ -10,8 +10,6 @@ afr Afrikaans
aka Akan
akk Akkadian
alb Albanian
-ale Aleut
-alg Algonquian languages
amh Amharic
ang English, Old (ca.450-1100)
apa Apache languages
@@ -99,7 +97,6 @@ cze Czech
dak Dakota
dan Danish
dar Dargwa
-dsb Lower Sorbian
del Delaware
den Slave (Athapascan)
dgr Dogrib
@@ -107,6 +104,7 @@ din Dinka
div Divehi
doi Dogri
dra Dravidian (Other)
+dsb Lower Sorbian
dua Duala
dum Dutch, Middle (ca. 1050-1350)
dut Dutch
@@ -126,6 +124,7 @@ fan Fang
fao Faroese
fat Fanti
fij Fijian
+fil Filipino; Pilipino
fin Finnish
fiu Finno-Ugrian (Other)
fon Fon
@@ -261,11 +260,12 @@ mao Maori
map Austronesian (Other)
mar Marathi
mas Masai
+may Malay
mdf Moksha
mdr Mandar
men Mende
mga Irish, Middle (900-1200)
-mic Micmac
+mic Mi'kmaq; Micmac
min Minangkabau
mis Miscellaneous languages
mkh Mon-Khmer (Other)
@@ -280,6 +280,7 @@ mos Mossi
mul Multiple languages
mun Munda languages
mus Creek
+mwl Mirandese
mwr Marwari
myn Mayan languages
myv Erzya
@@ -298,15 +299,16 @@ nia Nias
nic Niger-Kordofanian (Other)
niu Niuean
nno Norwegian Nynorsk
-nob Bøkmal, Norwegian
+nob Bokmål, Norwegian
nog Nogai
non Norse, Old
nor Norwegian
-nso Sotho, Northern
+nso Northern Sotho; Pedi; Sepedi
nub Nubian languages
+nym Nyamwezi
nwc Classical Newari; Old Newari
nya Chewa; Chichewa; Nyanja
-nym Nyankole
+nyn Nyankole
nyo Nyoro
nzi Nzima
oci Occitan (post 1500)
@@ -333,7 +335,7 @@ pol Polish
por Portuguese
pon Pohnpeian
pra Prakrit languages
-pro Proveçal, Old (to 1500)
+pro Provençal, Old (to 1500)
pus Pushto
que Quechua
raj Rajasthani
@@ -355,6 +357,7 @@ san Sanskrit
sas Sasak
sat Santali
scc Serbian
+scn Sicilian
sco Scots
scr Croatian
sel Selkup
@@ -363,7 +366,7 @@ sga Irish, Old (to 900)
sgn Sign languages
shn Shan
sid Sidamo
-sin Sinhalese
+sin Sinhala; Sinhalese
sio Siouan languages
sit Sino-Tibetan (Other)
sla Slavic (Other)
@@ -383,7 +386,7 @@ sog Sogdian
som Somali
son Songhai
sot Sotho, Southern
-spa Spanish (Castilian)
+spa Spanish
srd Sardinian
srr Serer
ssa Nilo-Saharan (Other)
@@ -411,8 +414,8 @@ tib Tibetan
tig Tigre
tir Tigrinya
tiv Tiv
-tkl Tokelau
tlh Klingon; tlhIngan-Hol
+tkl Tokelau
tli Tlinglit
tmh Tamashek
tog Tonga (Nyasa)