~ubuntu-langpack/langpack-o-matic/main

« back to all changes in this revision

Viewing changes to update-maps

  • Committer: Arne Goetje
  • Date: 2009-07-06 03:29:55 UTC
  • Revision ID: arne@canonical.com-20090706032955-256u755hd24tlpav
* added split for zh into zh-hans and zh-hant. zh-hans contains zh_CN and ZH_SG, while zh-hant contains zh_HK and zh_TW. This is only done for releases >= 9.10
* disable creation of language-support-translation-* and language-support-extra-* for releases >= 9.10
* add ISO-15924 (script codes) mapping for future variant based package splits
* bugfix: language-support-extra* should not be in SUPDEPS, but in SUGDEPS

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# (C) 2006 Canonical Ltd.
6
6
# Author: Martin Pitt <martin.pitt@canonical.com>
7
7
#
8
 
# Update maps/{languages,countries} from currently installed iso-codes package.
 
8
# Update maps/{languages,countries,scripts} from currently installed iso-codes package.
9
9
 
10
10
import xml.dom.minidom
11
11
 
39
39
        entry.attributes['name'].nodeValue.encode("UTF-8")
40
40
 
41
41
write_sorted_dict('maps/countries', iso3166)
 
42
 
 
43
# ISO-15924: List of scripts, create maps/scripts
 
44
iso15924 = {}
 
45
dom = xml.dom.minidom.parse('/usr/share/xml/iso-codes/iso_15924.xml')
 
46
for entry in dom.getElementsByTagName('iso_15924_entry'):
 
47
    iso15924[entry.attributes['alpha_4_code'].nodeValue.encode("UTF-8")] = \
 
48
        entry.attributes['name'].nodeValue.encode("UTF-8")
 
49
 
 
50
write_sorted_dict('maps/scripts', iso15924)