[bug 624459] Trim down languages.json and add iso639_1 attribute (used in customercare app).

This commit is contained in:
Paul Craciunoiu 2011-01-20 17:40:48 -08:00
Родитель e302c1cfd4
Коммит af7e88f813
5 изменённых файлов: 526 добавлений и 738 удалений

Просмотреть файл

@ -63,7 +63,7 @@ class ImageForm(forms.ModelForm):
max_length=settings.MAX_FILENAME_LENGTH)
locale = forms.ChoiceField(
label=_lazy(u'Locale'),
choices=[(LOCALES[k].external, LOCALES[k].native) for
choices=[(k, LOCALES[k].native) for
k in settings.SUMO_LANGUAGES],
initial=settings.WIKI_DEFAULT_LANGUAGE)
title = StrippedCharField(
@ -143,7 +143,7 @@ class VideoForm(forms.ModelForm):
max_length=settings.MAX_FILENAME_LENGTH)
locale = forms.ChoiceField(
label=_lazy(u'Locale'),
choices=[(LOCALES[k].external, LOCALES[k].native) for
choices=[(k, LOCALES[k].native) for
k in settings.SUMO_LANGUAGES],
initial=settings.WIKI_DEFAULT_LANGUAGE)
title = StrippedCharField(

Просмотреть файл

@ -13,7 +13,7 @@ from sumo_locales import LOCALES
from wiki.models import CATEGORIES, FIREFOX_VERSIONS, OPERATING_SYSTEMS
SEARCH_LANGUAGES = [(LOCALES[k].external, LOCALES[k].native) for
SEARCH_LANGUAGES = [(k, LOCALES[k].native) for
k in settings.SUMO_LANGUAGES]

Просмотреть файл

@ -59,4 +59,4 @@ def locale_or_default(locale):
def sphinx_locale(locale):
"""Given a locale string like 'en-US', return a Sphinx-ready locale."""
return crc32(LOCALES[locale].internal)
return crc32(locale)

Просмотреть файл

@ -1,730 +1,522 @@
{
"pa-IN": {
"English":"Punjabi",
"internal":"pa-IN",
"external":"pa-IN",
"dictionary":"pa-IN",
"iso639_1": "pa",
"english": "Punjabi",
"native": "\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40"
},
"gd": {
"dictionary":"gd-GB",
"English":"Scottish Gaelic",
"internal":"gd",
"external":"gd",
"iso639_1": "gd",
"english": "Scottish Gaelic",
"native": "G\u00e0idhlig"
},
"gl": {
"English":"Galician",
"internal":"gl",
"external":"gl",
"dictionary":"gl",
"iso639_1": "gl",
"english": "Galician",
"native": "Galego"
},
"ne-NP": {
"English":"Nepali",
"internal":"ne-NP",
"external":"ne-NP",
"dictionary":"ne-NP",
"iso639_1": "ne",
"english": "Nepali",
"native": "\u0928\u0947\u092a\u093e\u0932\u0940"
},
"tr": {
"English":"Turkish",
"internal":"tr",
"external":"tr",
"dictionary":"tr",
"iso639_1": "tr",
"english": "Turkish",
"native": "T\u00fcrk\u00e7e"
},
"ts": {
"English":"Tsonga",
"internal":"ts",
"external":"ts",
"dictionary":"ts",
"iso639_1": "ts",
"english": "Tsonga",
"native": "Xitsonga"
},
"tn": {
"English":"Tswana",
"internal":"tn",
"external":"tn",
"dictionary":"tn",
"iso639_1": "tn",
"english": "Tswana",
"native": "Setswana"
},
"lt": {
"English":"Lithuanian",
"internal":"lt",
"external":"lt",
"dictionary":"lt",
"iso639_1": "lt",
"english": "Lithuanian",
"native": "lietuvi\u0173 kalba"
},
"th": {
"English":"Thai",
"internal":"th",
"external":"th",
"dictionary":"th",
"iso639_1": "th",
"english": "Thai",
"native": "\u0e44\u0e17\u0e22"
},
"te": {
"English":"Telugu",
"internal":"te",
"external":"te",
"dictionary":"te",
"iso639_1": "te",
"english": "Telugu",
"native": "\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41"
},
"ta": {
"English":"Tamil",
"internal":"ta",
"external":"ta",
"dictionary":"ta",
"iso639_1": "ta",
"english": "Tamil",
"native": "\u0ba4\u0bae\u0bbf\u0bb4\u0bcd"
},
"bn-IN": {
"English":"Bengali (India)",
"internal":"bn-IN",
"external":"bn-IN",
"dictionary":"bn-IN",
"iso639_1": "bn",
"english": "Bengali (India)",
"native": "\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)"
},
"de": {
"English":"German",
"internal":"de",
"external":"de",
"dictionary":"de-DE",
"iso639_1": "de",
"english": "German",
"native": "Deutsch"
},
"da": {
"English":"Danish",
"internal":"da",
"external":"da",
"dictionary":"da",
"iso639_1": "da",
"english": "Danish",
"native": "Dansk"
},
"pt-BR": {
"English":"Portuguese (Brazilian)",
"internal":"pt-BR",
"external":"pt-BR",
"dictionary":"pt-BR",
"iso639_1": "pt",
"english": "Portuguese (Brazilian)",
"native": "Portugu\u00eas (do Brasil)"
},
"nb-NO": {
"English":"Norwegian (Bokm\u00e5l)",
"internal":"nb-NO",
"external":"nb-NO",
"dictionary":"nb-NO",
"iso639_1": "nb",
"english": "Norwegian (Bokm\u00e5l)",
"native": "Norsk bokm\u00e5l"
},
"gu-IN": {
"English":"Gujarati",
"internal":"gu-IN",
"external":"gu-IN",
"dictionary":"gu-IN",
"iso639_1": "gu",
"english": "Gujarati",
"native": "\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0"
},
"sr-CYRL": {
"English":"Serbian",
"internal":"sr-CYRL",
"external":"sr-CYRL",
"dictionary":"sr-Cyrl",
"iso639_1": "sr",
"english": "Serbian",
"native": "\u0421\u0440\u043f\u0441\u043a\u0438"
},
"ga-IE": {
"English":"Irish (Ireland)",
"internal":"ga-IE",
"external":"ga-IE",
"dictionary":"ga-IE",
"iso639_1": "ga",
"english": "Irish (Ireland)",
"native": "Gaeilge (\u00c9ire)"
},
"el": {
"English":"Greek",
"internal":"el",
"external":"el",
"dictionary":"el",
"iso639_1": "el",
"english": "Greek",
"native": "\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"
},
"eo": {
"English":"Esperanto",
"internal":"eo",
"external":"eo",
"dictionary":"eo",
"iso639_1": "eo",
"english": "Esperanto",
"native": "Esperanto"
},
"eu": {
"English":"Basque",
"internal":"eu",
"external":"eu",
"dictionary":"eu",
"iso639_1": "eu",
"english": "Basque",
"native": "Euskara"
},
"et": {
"English":"Estonian",
"internal":"et",
"external":"et",
"dictionary":"et",
"iso639_1": "et",
"english": "Estonian",
"native": "eesti keel"
},
"es": {
"English":"Spanish",
"internal":"es",
"external":"es",
"dictionary":"es-ES",
"iso639_1": "es",
"english": "Spanish",
"native": "Espa\u00f1ol"
},
"ru": {
"English":"Russian",
"internal":"ru",
"external":"ru",
"dictionary":"ru",
"iso639_1": "ru",
"english": "Russian",
"native": "\u0420\u0443\u0441\u0441\u043a\u0438\u0439"
},
"rw": {
"English":"Kinyarwanda",
"internal":"rw",
"external":"rw",
"dictionary":"rw",
"iso639_1": "rw",
"english": "Kinyarwanda",
"native": "Ikinyarwanda"
},
"wo": {
"English":"Wolof",
"internal":"wo",
"external":"wo",
"dictionary":"wo",
"iso639_1": "wo",
"english": "Wolof",
"native": "Wolof"
},
"rm": {
"English":"Romansh",
"internal":"rm",
"external":"rm",
"dictionary":"rm",
"iso639_1": "rm",
"english": "Romansh",
"native": "rumantsch"
},
"ro": {
"English":"Romanian",
"internal":"ro",
"external":"ro",
"dictionary":"ro",
"iso639_1": "ro",
"english": "Romanian",
"native": "rom\u00e2n\u0103"
},
"dsb": {
"English":"Lower Sorbian",
"internal":"dsb",
"external":"dsb",
"dictionary":"dsb",
"iso639_1": null,
"english": "Lower Sorbian",
"native": "Dolnoserb\u0161\u0107ina"
},
"hsb": {
"English":"Upper Sorbian",
"internal":"hsb",
"external":"hsb",
"dictionary":"hsb",
"iso639_1": null,
"english": "Upper Sorbian",
"native": "Hornjoserbsce"
},
"be": {
"English":"Belarusian",
"internal":"be",
"external":"be",
"dictionary":"be",
"iso639_1": "be",
"english": "Belarusian",
"native": "\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f"
},
"bg": {
"English":"Bulgarian",
"internal":"bg",
"external":"bg",
"dictionary":"bg",
"iso639_1": "bg",
"english": "Bulgarian",
"native": "\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"
},
"uk": {
"English":"Ukrainian",
"internal":"uk",
"external":"uk",
"dictionary":"uk",
"iso639_1": "uk",
"english": "Ukrainian",
"native": "\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"
},
"ast": {
"English":"Asturian",
"internal":"ast",
"external":"ast",
"dictionary":"ast-ES",
"iso639_1": null,
"english": "Asturian",
"native": "Asturianu"
},
"br-FR": {
"English":"Breton",
"internal":"br-FR",
"external":"br-FR",
"dictionary":"br-FR",
"iso639_1": "br",
"english": "Breton",
"native": "Brezhoneg"
},
"tt-RU":{
"English":"Tatar",
"internal":"tt-RU",
"external":"tt-RU",
"dictionary":"tt-RU",
"native":"Tatar\u00e7a"
"bs": {
"iso639_1": "bs",
"english": "Bosnian",
"native": "Bosanski"
},
"ss": {
"English":"Siswati",
"internal":"ss",
"external":"ss",
"dictionary":"ss",
"iso639_1": "ss",
"english": "Siswati",
"native": "siSwati"
},
"ja": {
"English":"Japanese",
"internal":"ja",
"external":"ja",
"dictionary":"ja",
"iso639_1": "ja",
"english": "Japanese",
"native": "\u65e5\u672c\u8a9e"
},
"ta-IN": {
"English":"Tamil (India)",
"internal":"ta-IN",
"external":"ta-IN",
"dictionary":"ta-IN",
"iso639_1": "ta",
"english": "Tamil (India)",
"native": "\u0ba4\u0bae\u0bbf\u0bb4\u0bcd (\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe)"
},
"hy-AM": {
"English":"Armenian",
"internal":"hy-AM",
"external":"hy-AM",
"dictionary":"hy-AM",
"iso639_1": "hy",
"english": "Armenian",
"native": "\u0540\u0561\u0575\u0565\u0580\u0565\u0576"
},
"pt-PT": {
"English":"Portuguese (Portugal)",
"internal":"pt-PT",
"external":"pt-PT",
"dictionary":"pt-PT",
"iso639_1": "pt",
"english": "Portuguese (Portugal)",
"native": "Portugu\u00eas (Europeu)"
},
"ilo": {
"iso639_1": null,
"english": "Iloko",
"native": "Iloko"
},
"oc": {
"English":"Occitan (Lengadocian)",
"internal":"oc",
"external":"oc",
"dictionary":"oc",
"iso639_1": "oc",
"english": "Occitan (Lengadocian)",
"native": "occitan (lengadocian)"
},
"no":{
"dictionary":"nn-NO",
"English":"Norwegian (Nynorsk)",
"internal":"no",
"external":"no",
"native":"Norsk nynorsk"
},
"fy-NL": {
"English":"Frisian",
"internal":"fy-NL",
"external":"fy-NL",
"dictionary":"fy-NL",
"iso639_1": "fy",
"english": "Frisian",
"native": "Frysk"
},
"or": {
"English":"Oriya",
"internal":"or",
"external":"or",
"dictionary":"or",
"iso639_1": "or",
"english": "Oriya",
"native": "\u0b13\u0b21\u0b3c\u0b3f\u0b06"
},
"xh": {
"English":"Xhosa",
"internal":"xh",
"external":"xh",
"dictionary":"xh",
"iso639_1": "xh",
"english": "Xhosa",
"native": "isiXhosa"
},
"nso": {
"English":"Northern Sotho",
"internal":"nso",
"external":"nso",
"dictionary":"nso",
"iso639_1": null,
"english": "Northern Sotho",
"native": "Sepedi"
},
"ta-LK": {
"English":"Tamil (Sri Lanka)",
"internal":"ta-LK",
"external":"ta-LK",
"dictionary":"ta-LK",
"iso639_1": "ta",
"english": "Tamil (Sri Lanka)",
"native": "\u0ba4\u0bae\u0bbf\u0bb4\u0bcd (\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8)"
},
"ca": {
"English":"Catalan",
"internal":"ca",
"external":"ca",
"dictionary":"ca",
"iso639_1": "ca",
"english": "Catalan",
"native": "catal\u00e0"
},
"tt-RU": {
"iso639_1": "tt",
"english": "Tatar",
"native": "Tatar\u00e7a"
},
"cy": {
"English":"Welsh",
"internal":"cy",
"external":"cy",
"dictionary":"cy",
"iso639_1": "cy",
"english": "Welsh",
"native": "Cymraeg"
},
"cs": {
"English":"Czech",
"internal":"cs",
"external":"cs",
"dictionary":"cs",
"iso639_1": "cs",
"english": "Czech",
"native": "\u010ce\u0161tina"
},
"lv": {
"English":"Latvian",
"internal":"lv",
"external":"lv",
"dictionary":"lv",
"iso639_1": "lv",
"english": "Latvian",
"native": "Latvie\u0161u"
},
"hi-IN": {
"English":"Hindi (India)",
"internal":"hi-IN",
"external":"hi-IN",
"dictionary":"hi-IN",
"iso639_1": "hi",
"english": "Hindi (India)",
"native": "\u0939\u093f\u0928\u094d\u0926\u0940 (\u092d\u093e\u0930\u0924)"
},
"fj-FJ": {
"English":"Fijian",
"internal":"fj-FJ",
"external":"fj-FJ",
"dictionary":"fj-FJ",
"iso639_1": "fj",
"english": "Fijian",
"native": "Vosa vaka-Viti"
},
"is": {
"English":"Icelandic",
"internal":"is",
"external":"is",
"dictionary":"is",
"iso639_1": "is",
"english": "Icelandic",
"native": "\u00edslenska"
},
"pl": {
"English":"Polish",
"internal":"pl",
"external":"pl",
"dictionary":"pl",
"iso639_1": "pl",
"english": "Polish",
"native": "Polski"
},
"hr": {
"English":"Croatian",
"internal":"hr",
"external":"hr",
"dictionary":"hr",
"iso639_1": "hr",
"english": "Croatian",
"native": "Hrvatski"
},
"en-US": {
"English":"English",
"internal":"en-US",
"external":"en-US",
"dictionary":"en-US",
"iso639_1": "en",
"english": "English",
"native": "English"
},
"hu": {
"English":"Hungarian",
"internal":"hu",
"external":"hu",
"dictionary":"hu",
"iso639_1": "hu",
"english": "Hungarian",
"native": "Magyar"
},
"hi": {
"English":"Hindi",
"internal":"hi",
"external":"hi",
"dictionary":"hi",
"iso639_1": "hi",
"english": "Hindi",
"native": "\u0939\u093f\u0928\u094d\u0926\u0940"
},
"he": {
"English":"Hebrew",
"internal":"he",
"external":"he",
"dictionary":"he",
"iso639_1": "he",
"english": "Hebrew",
"native": "\u05e2\u05d1\u05e8\u05d9\u05ea"
},
"mg": {
"English":"Malagasy",
"internal":"mg",
"external":"mg",
"dictionary":"mg",
"iso639_1": "mg",
"english": "Malagasy",
"native": "Malagasy"
},
"fur": {
"dictionary":"fur-IT",
"English":"Friulian",
"internal":"fur",
"external":"fur",
"iso639_1": null,
"english": "Friulian",
"native": "Furlan"
},
"ml": {
"English":"Malayalam",
"internal":"ml",
"external":"ml",
"dictionary":"ml",
"iso639_1": "ml",
"english": "Malayalam",
"native": "\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02"
},
"mn": {
"English":"Mongolian",
"internal":"mn",
"external":"mn",
"dictionary":"mn",
"iso639_1": "mn",
"english": "Mongolian",
"native": "\u041c\u043e\u043d\u0433\u043e\u043b"
},
"mi": {
"English":"Maori (Aotearoa)",
"internal":"mi",
"external":"mi",
"dictionary":"mi",
"iso639_1": "mi",
"english": "Maori (Aotearoa)",
"native": "M\u0101ori (Aotearoa)"
},
"mk": {
"English":"Macedonian",
"internal":"mk",
"external":"mk",
"dictionary":"mk",
"iso639_1": "mk",
"english": "Macedonian",
"native": "\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438"
},
"ur": {
"English":"Urdu",
"internal":"ur",
"external":"ur",
"dictionary":"ur",
"iso639_1": "ur",
"english": "Urdu",
"native": "\u0627\u064f\u0631\u062f\u0648"
},
"zh-CN": {
"English":"Chinese (Simplified)",
"internal":"zh-CN",
"external":"zh-CN",
"dictionary":"zh-CN",
"iso639_1": "zh",
"english": "Chinese (Simplified)",
"native": "\u4e2d\u6587 (\u7b80\u4f53)"
},
"ms": {
"English":"Malay",
"internal":"ms",
"external":"ms",
"dictionary":"ms",
"iso639_1": "ms",
"english": "Malay",
"native": "\ufe90\ufeeb\ufe8e\ufeb3 \ufee1\ufefc\ufef3\ufeed"
},
"mr": {
"English":"Marathi",
"internal":"mr",
"external":"mr",
"dictionary":"mr",
"iso639_1": "mr",
"english": "Marathi",
"native": "\u092e\u0930\u093e\u0920\u0940"
},
"my": {
"iso639_1": "my",
"english": "Burmese",
"native": "\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c"
},
"ve": {
"English":"Venda",
"internal":"ve",
"external":"ve",
"dictionary":"ve",
"iso639_1": "ve",
"english": "Venda",
"native": "Tshiven\u1e13a"
},
"af": {
"English":"Afrikaans",
"internal":"af",
"external":"af",
"dictionary":"af-NA",
"iso639_1": "af",
"english": "Afrikaans",
"native": "Afrikaans"
},
"vi": {
"English":"Vietnamese",
"internal":"vi",
"external":"vi",
"dictionary":"vi",
"iso639_1": "vi",
"english": "Vietnamese",
"native": "Ti\u1ebfng Vi\u1ec7t"
},
"ak": {
"English":"Akan",
"internal":"ak",
"external":"ak",
"dictionary":"ak-GH",
"iso639_1": "ak",
"english": "Akan",
"native": "Akan"
},
"it": {
"English":"Italian",
"internal":"it",
"external":"it",
"dictionary":"it",
"iso639_1": "it",
"english": "Italian",
"native": "Italiano"
},
"as": {
"English":"Assamese",
"internal":"as",
"external":"as",
"dictionary":"as-IN",
"iso639_1": "as",
"english": "Assamese",
"native": "\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be"
},
"ar": {
"English":"Arabic",
"internal":"ar",
"external":"ar",
"dictionary":"ar",
"iso639_1": "ar",
"english": "Arabic",
"native": "\u0639\u0631\u0628\u064a"
},
"sr-LATN": {
"English":"Serbian",
"internal":"sr-LATN",
"external":"sr-LATN",
"dictionary":"sr-Latn",
"iso639_1": "sr",
"english": "Serbian",
"native": "Srpski"
},
"bn-BD": {
"English":"Bengali (Bangladesh)",
"internal":"bn-BD",
"external":"bn-BD",
"dictionary":"bn-BD",
"iso639_1": "bn",
"english": "Bengali (Bangladesh)",
"native": "\u09ac\u09be\u0982\u09b2\u09be (\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)"
},
"sv-SE": {
"English":"Swedish",
"internal":"sv-SE",
"external":"sv-SE",
"dictionary":"sv-SE",
"iso639_1": "sv",
"english": "Swedish",
"native": "Svenska"
},
"id": {
"English":"Indonesian",
"internal":"id",
"external":"id",
"dictionary":"id",
"iso639_1": "id",
"english": "Indonesian",
"native": "Bahasa Indonesia"
},
"nl": {
"English":"Dutch",
"internal":"nl",
"external":"nl",
"dictionary":"nl",
"iso639_1": "nl",
"english": "Dutch",
"native": "Nederlands"
},
"no": {
"iso639_1": "no",
"english": "Norwegian (Nynorsk)",
"native": "Norsk nynorsk"
},
"zu": {
"English":"Zulu",
"internal":"zu",
"external":"zu",
"dictionary":"zu",
"iso639_1": "zu",
"english": "Zulu",
"native": "isiZulu"
},
"nr": {
"English":"Ndebele, South",
"internal":"nr",
"external":"nr",
"dictionary":"nr",
"iso639_1": "nr",
"english": "Ndebele, South",
"native": "isiNdebele"
},
"fr": {
"English":"French",
"internal":"fr",
"external":"fr",
"dictionary":"fr-FR",
"iso639_1": "fr",
"english": "French",
"native": "Fran\u00e7ais"
},
"fa": {
"English":"Persian",
"internal":"fa",
"external":"fa",
"dictionary":"fa",
"iso639_1": "fa",
"english": "Persian",
"native": "\u0641\u0627\u0631\u0633\u06cc"
},
"mai": {
"iso639_1": "bh",
"english": "Maithili",
"native": "\u092e\u0948\u0925\u093f\u0932\u0940"
},
"fi": {
"English":"Finnish",
"internal":"fi",
"external":"fi",
"dictionary":"fi",
"iso639_1": "fi",
"english": "Finnish",
"native": "suomi"
},
"ka": {
"English":"Georgian",
"internal":"ka",
"external":"ka",
"dictionary":"ka",
"iso639_1": "ka",
"english": "Georgian",
"native": "\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8"
},
"kk": {
"English":"Kazakh",
"internal":"kk",
"external":"kk",
"dictionary":"kk",
"iso639_1": "kk",
"english": "Kazakh",
"native": "\u049a\u0430\u0437\u0430\u049b"
},
"zh-TW": {
"English":"Chinese (Traditional)",
"internal":"zh-TW",
"external":"zh-TW",
"dictionary":"zh-TW",
"iso639_1": "zh",
"english": "Chinese (Traditional)",
"native": "\u6b63\u9ad4\u4e2d\u6587 (\u7e41\u9ad4)"
},
"sq": {
"English":"Albanian",
"internal":"sq",
"external":"sq",
"dictionary":"sq",
"iso639_1": "sq",
"english": "Albanian",
"native": "Shqip"
},
"ko": {
"English":"Korean",
"internal":"ko",
"external":"ko",
"dictionary":"ko",
"iso639_1": "ko",
"english": "Korean",
"native": "\ud55c\uad6d\uc5b4"
},
"kn": {
"English":"Kannada",
"internal":"kn",
"external":"kn",
"dictionary":"kn",
"iso639_1": "kn",
"english": "Kannada",
"native": "\u0c95\u0ca8\u0ccd\u0ca8\u0ca1"
},
"st": {
"English":"Southern Sotho",
"internal":"st",
"external":"st",
"dictionary":"st",
"iso639_1": "st",
"english": "Southern Sotho",
"native": "Sesotho"
},
"sk": {
"English":"Slovak",
"internal":"sk",
"external":"sk",
"dictionary":"sk",
"iso639_1": "sk",
"english": "Slovak",
"native": "sloven\u010dina"
},
"si": {
"English":"Sinhala",
"internal":"si",
"external":"si",
"dictionary":"si",
"iso639_1": "si",
"english": "Sinhala",
"native": "\u0dc3\u0dd2\u0d82\u0dc4\u0dbd"
},
"ku": {
"English":"Kurdish",
"internal":"ku",
"external":"ku",
"dictionary":"ku",
"iso639_1": "ku",
"english": "Kurdish",
"native": "Kurd\u00ee"
},
"sl": {
"English":"Slovenian",
"internal":"sl",
"external":"sl",
"dictionary":"sl",
"iso639_1": "sl",
"english": "Slovenian",
"native": "slovensko"
},
"ilo":{
"English":"Iloko",
"internal":"ilo",
"external":"ilo",
"dictionary":"ilo",
"native":"Iloko"
},
"mai":{
"English":"Maithili",
"internal":"mai",
"external":"mai",
"dictionary":"mai",
"native":"\u092E\u0948\u0925\u093F\u0932\u0940"
},
"bs":{
"English":"Bosnian",
"internal":"bs",
"external":"bs",
"dictionary":"bs_BA",
"native":"Bosanski"
},
"my":{
"English":"Burmese",
"internal":"my",
"external":"my",
"dictionary":"my",
"native":"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"
}
}

Просмотреть файл

@ -2,8 +2,7 @@ from collections import namedtuple
import json
import os
Language = namedtuple(u'Language',
u'external internal english native dictionary')
Language = namedtuple(u'Language', u'english native iso639_1')
file = os.path.join(os.path.dirname(__file__), 'languages.json')
locales = json.loads(open(file, 'r').read())
@ -11,8 +10,5 @@ locales = json.loads(open(file, 'r').read())
LOCALES = {}
for k in locales:
LOCALES[k] = Language(locales[k]['external'], locales[k]['internal'],
locales[k]['English'], locales[k]['native'],
locales[k]['dictionary'])
INTERNAL_MAP = dict([(LOCALES[k].internal, k) for k in LOCALES])
LOCALES[k] = Language(locales[k]['english'], locales[k]['native'],
locales[k]['iso639_1'])