This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
mappers.py
208 lines (198 loc) · 5.84 KB
/
mappers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
from cc.i18n.gettext_i18n import fake_ugettext as _
COUNTRY_MAP = {
"ar": _("Argentina"),
"at": _("Austria"),
"au": _("Australia"),
"be": _("Belgium"),
"bg": _("Bulgaria"),
"br": _("Brazil"),
"ca": _("Canada"),
"ch": _("Switzerland"),
"cl": _("Chile"),
"cn": _("China Mainland"),
"co": _("Colombia"),
"cr": _("Costa Rica"),
"cz": _("Czech Republic"),
"de": _("Germany"),
"dk": _("Denmark"),
"ec": _("Ecuador"),
"ee": _("Estonia"),
"eg": _("Egypt"),
"es": _("Spain"),
"es-ca": _("Catalonia"),
"fi": _("Finland"),
"fr": _("France"),
"gr": _("Greece"),
"gt": _("Guatemala"),
"hk": _("Hong Kong"),
"hr": _("Croatia"),
"hu": _("Hungary"),
"ie": _("Ireland"),
"il": _("Israel"),
"igo": _("IGO"),
"in": _("India"),
"it": _("Italy"),
"jo": _("Jordan"),
"jp": _("Japan"),
"kr": _("South Korea"),
"lu": _("Luxembourg"),
"mk": _("Macedonia"),
"mt": _("Malta"),
"mx": _("Mexico"),
"my": _("Malaysia"),
"ng": _("Nigeria"),
"nl": _("Netherlands"),
"no": _("Norway"),
"nz": _("New Zealand"),
"pe": _("Peru"),
"ph": _("Philippines"),
"pl": _("Poland"),
"pr": _("Puerto Rico"),
"pt": _("Portugal"),
"ro": _("Romania"),
"rs": _("Serbia"),
"scotland": _("UK: Scotland"),
"se": _("Sweden"),
"sg": _("Singapore"),
"si": _("Slovenia"),
"sk": _("Slovak Republic"),
"th": _("Thailand"),
"tw": _("Taiwan"),
"ua": _("Ukraine"),
"ug": _("Uganda"),
"uk": _("UK: England & Wales"),
"us": _("United States"),
"ve": _("Venezuela"),
"vn": _("Vietnam"),
"za": _("South Africa")}
LANG_MAP = {
"af": _("Afrikaans"),
"ar": _("Arabic"),
"as": _("Assamese"),
"ast": _("Asturian"),
"az": _("Azerbaijani"),
"be": _("Belarusian"),
"bg": _("Bulgarian"),
"bn": _("Bengali"),
"ca": _("Catalan"),
"cs": _("Czech"),
"da": _("Danish"),
"de": _("German"),
"el": _("Greek"),
"en": _("English"),
"en_CA": _("English (CA)"),
"en_GB": _("English (GB)"),
"en_HK": _("English (Hong Kong)"),
"en_SG": _("English (Singapore)"),
"en_US": _("English (US)"),
"eo": _("Esperanto"),
"es": _("Spanish"),
"es_AR": _("Spanish (AR)"),
"es_CL": _("Spanish (CL)"),
"es_CO": _("Spanish (CO)"),
"es_EC": _("Spanish (Ecuador)"),
"es_ES": _("Spanish (Spain)"),
"es_GT": _("Spanish (Guatemala)"),
"es_MX": _("Spanish (MX)"),
"es_PE": _("Spanish (PE)"),
"et": _("Estonian"),
"eu": _("Basque"),
"fa": _("Persian"),
"fi": _("Finnish"),
"fr": _("French"),
"fr_CA": _("French (CA)"),
"fy": "Frysk", # non-translated string is a stopgap solution until ccEngine is replaced
"ga": _("Irish"),
"gl": _("Galician"),
"he": _("Hebrew"),
"hi": _("Hindi"),
"hr": _("Croatian"),
"hu": _("Hungarian"),
"hy": _("Armenian"),
"id": _("Indonesian"),
"is": _("Icelandic"),
"it": _("Italian"),
"ja": _("Japanese"),
"ka": _("Georgian"),
"kk": _("Kazakh"),
"ko": _("Korean"),
"lt": _("Lithuanian"),
"lv": _("Latvian"),
"mk": _("Macedonian"),
"ml": _("Malayalam"),
"mn": _("Mongolian"),
"ms": _("Malay"),
"nl": _("Dutch"),
"no": _("Norwegian"),
"nso": _("Northern Sotho"),
"oci_ES": _("Aranese"),
"pl": _("Polish"),
"pt": _("Portuguese"),
"pt_BR": _("Portuguese (BR)"),
#"pt_PT": _("Portuguese (Portugal)"),
"ro": _("Romanian"),
"ru": _("Russian"),
"si_LK": _("Sinhala"),
"sl": _("Slovenian"),
"sr": _("Serbian"),
"sr_LATN": _("Serbian (Latin)"),
"st": _("Sotho"),
"sv": _("Swedish"),
"ta": _("Tamil"),
"te": _("Telugu"),
"th": _("Thai"),
"tr": _("Turkish"),
"uk": _("Ukranian"),
"ur": _("Urdu"),
"vi": _("Vietnamese"),
"zh": _("Chinese"),
"zh_CN": _("Chinese"),
"zh_HK": _("Chinese (Hong Kong)"),
"zh_TW": _("Chinese (Taiwan)"),
"zu": _("Zulu")}
LICENSE_NAME_MAP = {
"GPL": _("GPL"),
"LGPL": _("LGPL"),
"by": _("Attribution"),
"by-nc": _("Attribution-NonCommercial"),
"by-nc-nd": _("Attribution-NonCommercial-NoDerivs"),
"by-nc-sa": _("Attribution-NonCommercial-ShareAlike"),
"by-nd": _("Attribution-NoDerivs"),
"by-nd-nc": _("Attribution-NoDerivs-NonCommercial"),
"by-sa": _("Attribution-ShareAlike"),
"mark": _("Public Domain Mark"),
"nc": _("NonCommercial"),
"nc-sa": _("NonCommercial-ShareAlike"),
"nc-sampling+": _("NonCommercial Sampling Plus"),
"nd": _("NoDerivs"),
"nd-nc": _("NoDerivs-NonCommercial"),
"publicdomain": _("Public Domain"),
"sa": _("ShareAlike"),
"sampling": _("Sampling"),
"sampling+": _("Sampling Plus")}
CHARACTERISTIC_TITLE_MAP = {
"by": _("Attribution"),
"nc": _("Noncommercial"),
"nd": _("No Derivative Works"),
"sa": _("Share Alike")}
CHARACTERISTIC_BRIEF_DESC_MAP = {
"by": _(
"You must attribute the work in the manner specified by the author "
"or licensor (but not in any way that suggests that they endorse you "
"or your use of the work)."),
"na": _(
"You may not use this work to advertise for or promote anything but "
"the work you create from it."),
"nc": _("You may not use this work for commercial purposes."),
"nd": _("You may not alter, transform, or build upon this work."),
"no": _(
"You may not perform, display, or distribute copies of this whole "
"work for any purpose."),
"sa": _(
"If you alter, transform, or build upon this work, you may "
"distribute the resulting work only under the same or similar "
"license to this one."),
"sa_bysa30": _(
"If you alter, transform, or build upon this work, you may "
"distribute the resulting work only under the same, similar "
"or a compatible license.")}