~ubuntu-branches/ubuntu/natty/miro/natty

« back to all changes in this revision

Viewing changes to osx/plat/script_codes.py

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2011-01-22 02:46:33 UTC
  • mfrom: (1.4.10 upstream) (1.7.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110122024633-kjme8u93y2il5nmf
Tags: 3.5.1-1ubuntu1
* Merge from debian.  Remaining ubuntu changes:
  - Use python 2.7 instead of python 2.6
  - Relax dependency on python-dbus to >= 0.83.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Miro - an RSS based video player application
 
2
# Copyright (C) 2005-2010 Participatory Culture Foundation
 
3
#
 
4
# This program is free software; you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; either version 2 of the License, or
 
7
# (at your option) any later version.
 
8
#
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
17
#
 
18
# In addition, as a special exception, the copyright holders give
 
19
# permission to link the code of portions of this program with the OpenSSL
 
20
# library.
 
21
#
 
22
# You must obey the GNU General Public License in all respects for all of
 
23
# the code used other than OpenSSL. If you modify file(s) with this
 
24
# exception, you may extend this exception to your version of the file(s),
 
25
# but you are not obligated to do so. If you do not wish to do so, delete
 
26
# this exception statement from your version. If you delete this exception
 
27
# statement from all source files in the program, then also delete it here.
 
28
 
 
29
def map_to_two_letters_code(code):
 
30
    for pair in OSX_SCRIPT_CODES_LIST:
 
31
        if pair[0] == code and pair[1] is not None:
 
32
            return pair[1]
 
33
    return None
 
34
 
 
35
OSX_SCRIPT_CODES_LIST = [
 
36
    (0,   "en"),  # English
 
37
    (1,   "fr"),  # French
 
38
    (2,   "de"),  # German
 
39
    (3,   "it"),  # Italian
 
40
    (4,   "nl"),  # Dutch
 
41
    (5,   "sv"),  # Swedish
 
42
    (6,   "es"),  # Spanish
 
43
    (7,   "da"),  # Danish
 
44
    (8,   "pt"),  # Portuguese
 
45
    (9,   "no"),  # Norwegian
 
46
    (10,  "he"),  # Hebrew
 
47
    (11,  "ja"),  # Japanese
 
48
    (12,  "ar"),  # Arabic
 
49
    (13,  "fi"),  # Finnish
 
50
    (14,  "el"),  # Greek
 
51
    (15,  "is"),  # Icelandic
 
52
    (16,  "mt"),  # Maltese
 
53
    (17,  "tr"),  # Turkish
 
54
    (18,  "hr"),  # Croatian
 
55
    (19,  "zh"),  # TradChinese
 
56
    (20,  "ur"),  # Urdu
 
57
    (21,  "hi"),  # Hindi
 
58
    (22,  "th"),  # Thai
 
59
    (23,  "ko"),  # Korean
 
60
    (24,  "lt"),  # Lithuanian
 
61
    (25,  "pl"),  # Polish
 
62
    (26,  "hu"),  # Hungarian
 
63
    (27,  "et"),  # Estonian
 
64
    (28,  "lv"),  # Latvian
 
65
    (29,  "se"),  # Sami
 
66
    (30,  "fo"),  # Faroese
 
67
    (31,  None),  # Farsi
 
68
    (31,  "fa"),  # Persian
 
69
    (32,  "ru"),  # Russian
 
70
    (33,  None),  # SimpChinese
 
71
    (34,  None),  # Flemish
 
72
    (35,  "ga"),  # IrishGaelic
 
73
    (36,  "sq"),  # Albanian
 
74
    (37,  "ro"),  # Romanian
 
75
    (38,  "cz"),  # Czech
 
76
    (39,  "sk"),  # Slovak
 
77
    (40,  "sl"),  # Slovenian
 
78
    (41,  "yi"),  # Yiddish
 
79
    (42,  "sr"),  # Serbian
 
80
    (43,  "mk"),  # Macedonian
 
81
    (44,  "bg"),  # Bulgarian
 
82
    (45,  "uk"),  # Ukrainian
 
83
    (46,  None),  # Belorussian
 
84
    (47,  "uz"),  # Uzbek
 
85
    (48,  "kk"),  # Kazakh
 
86
    (49,  "az"),  # Azerbaijani
 
87
    (50,  None),  # AzerbaijanAr
 
88
    (51,  "hy"),  # Armenian
 
89
    (52,  "ka"),  # Georgian
 
90
    (53,  "mo"),  # Moldavian
 
91
    (54,  "ky"),  # Kirghiz
 
92
    (55,  "tg"),  # Tajiki
 
93
    (56,  "tk"),  # Turkmen
 
94
    (57,  "mn"),  # Mongolian
 
95
    (58,  None),  # MongolianCyr
 
96
    (59,  None),  # Pashto
 
97
    (60,  "ku"),  # Kurdish
 
98
    (61,  "ks"),  # Kashmiri
 
99
    (62,  "sd"),  # Sindhi
 
100
    (63,  "bo"),  # Tibetan
 
101
    (64,  "ne"),  # Nepali
 
102
    (65,  "sa"),  # Sanskrit
 
103
    (66,  "mr"),  # Marathi
 
104
    (67,  "bn"),  # Bengali
 
105
    (68,  "as"),  # Assamese
 
106
    (69,  "gu"),  # Gujarati
 
107
    (70,  "pa"),  # Punjabi
 
108
    (71,  "or"),  # Oriya
 
109
    (72,  "ml"),  # Malayalam
 
110
    (73,  "kn"),  # Kannada
 
111
    (74,  "ta"),  # Tamil
 
112
    (75,  "te"),  # Telugu
 
113
    (76,  "si"),  # Sinhalese
 
114
    (77,  "my"),  # Burmese
 
115
    (78,  "km"),  # Khmer
 
116
    (79,  "lo"),  # Lao
 
117
    (80,  "vi"),  # Vietnamese
 
118
    (81,  "id"),  # Indonesian
 
119
    (82,  "tl"),  # Tagalog
 
120
    (83,  "ms"),  # MalayRoman
 
121
    (84,  "ml"),  # MalayArabic
 
122
    (85,  "am"),  # Amharic
 
123
    (86,  "ti"),  # Tigrinya
 
124
    (87,  "om"),  # Oromo
 
125
    (88,  "so"),  # Somali
 
126
    (89,  "sw"),  # Swahili
 
127
    (90,  "rw"),  # Kinyarwanda
 
128
    (90,  None),  # Ruanda
 
129
    (91,  "rn"),  # Rundi
 
130
    (92,  "ny"),  # Nyanja
 
131
    (92,  None),  # Chewa
 
132
    (93,  "mg"),  # Malagasy
 
133
    (94,  "eo"),  # Esperanto
 
134
    (128, "cy"),  # Welsh
 
135
    (129, "eu"),  # Basque
 
136
    (130, "ca"),  # Catalan
 
137
    (131, "la"),  # Latin
 
138
    (132, "qu"),  # Quechua
 
139
    (133, "gn"),  # Guarani
 
140
    (134, "ay"),  # Aymara
 
141
    (135, "tt"),  # Tatar
 
142
    (136, "ug"),  # Uighur
 
143
    (137, "dz"),  # Dzongkha
 
144
    (138, "jv"),  # JavaneseRom
 
145
    (139, "su"),  # SundaneseRom
 
146
    (140, "gl"),  # Galician
 
147
    (141, "af"),  # Afrikaans
 
148
    (142, "br"),  # Breton
 
149
    (143, None),  # Inuktitut
 
150
    (144, "gd"),  # ScottishGaelic
 
151
    (145, "gv"),  # ManxGaelic
 
152
    (146, "ga"),  # IrishGaelicScript
 
153
    (147, "tog"), # Tongan
 
154
    (148, "grc"), # GreekAncient
 
155
    (149, "kl"),  # Greenlandic
 
156
    (150, None),  # AzerbaijanRoman
 
157
    (151, "nn")   # Nynorsk
 
158
]