commit 27a7635660c10fb136ba425225f37567a0071cee Author: Arlo Breault arlolra@gmail.com Date: Sun Mar 23 11:28:19 2014 -0700
Regional translation names in their language
* Warn if we're missing any. --- utils.go | 98 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 40 deletions(-)
diff --git a/utils.go b/utils.go index 1c85b28..737aa29 100644 --- a/utils.go +++ b/utils.go @@ -126,47 +126,64 @@ type locale struct {
func GetLocaleList(base string) map[string]string { // populated from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + // and https://sites.google.com/site/opti365/translate_codes haveTranslatedNames := map[string]string{ - "ar": "العربية", - "bs": "Bosanski jezik", - "ca": "Català", - "cs": "čeština", - "cy": "Cymraeg", - "da": "Dansk", - "de": "Deutsch", - "el": "ελληνικά", - "es": "Español", - "et": "Eesti", - "eu": "Euskara", - "fa": "فارسی", - "fi": "Suomi", - "fr": "Français", - "gl": "Galego", - "he": "עברית", - "hi": "हिन्दी, हिंदी", - "hr": "Hrvatski jezik", - "hu": "Magyar", - "id": "Bahasa Indonesia", - "it": "Italiano", - "ja": "日本語", - "km": "មែរ", - "kn": "ಕನ್ನಡ", - "ko": "한국어", - "lv": "Latviešu valoda", - "my": "ဗမာစာ", - "nb": "Norsk bokmål", - "nl": "Nederlands", - "pa": "ਪੰਜਾਬੀ", - "pl": "Język polski", - "pt": "Português", - "ru": "русский язык", - "sk": "Slovenčina", - "sl": "Slovenski jezik", - "sr": "српски језик", - "sv": "Svenska", - "th": "ไทย", - "tr": "Türkçe", - "uk": "українська мова", + "af": "Afrikaans", + "ar": "العربية", + "bs": "Bosanski jezik", + "ca": "Català", + "cs": "Čeština", + "cy": "Cymraeg", + "da": "Dansk", + "de": "Deutsch", + "el": "ελληνικά", + "eo": "Esperanto", + "es": "Español", + "es_AR": "Español (Argentina)", + "et": "Eesti", + "eu": "Euskara", + "fa": "فارسی", + "fi": "Suomi", + "fr": "Français", + "fr_CA": "Français (Canadien)", + "gl": "Galego", + "he": "עברית", + "hi": "हिन्दी", + "hr": "Hrvatski jezik", + "hr_HR": "Hrvatski jezik (Croatia)", + "hu": "Magyar", + "id": "Bahasa Indonesia", + "it": "Italiano", + "ja": "日本語", + "km": "មែរ", + "kn": "ಕನ್ನಡ", + "ko": "한국어", + "ko_KR": "한국어 (South Korea)", + "lv": "Latviešu valoda", + "mk": "македонски јазик", + "ms_MY": "Bahasa Melayu", + "my": "ဗမာစာ", + "nb": "Norsk bokmål", + "nl": "Nederlands", + "nl_BE": "Vlaams", + "pa": "ਪੰਜਾਬੀ", + "pl": "Język polski", + "pl_PL": "Język polski (Poland)", + "pt": "Português", + "pt_BR": "Português do Brasil", + "ru": "русский язык", + "si_LK": "සිංහල", + "sk": "Slovenčina", + "sl": "Slovenski jezik", + "sl_SI": "Slovenski jezik (Slovenia)", + "sr": "српски језик", + "sv": "Svenska", + "te_IN": "తెలుగు", + "th": "ไทย", + "tr": "Türkçe", + "uk": "українська мова", + "zh_CN": "中文简体", + "zh_TW": "中文繁體", }
// for all folders in locale which match a locale from https://www.transifex.com/api/2/languages/ @@ -235,6 +252,7 @@ func GetInstalledLocales(base string, webLocales map[string]locale, nameTranslat if transName := nameTranslations[code]; transName != "" { locales[code] = transName } else { + log.Print("No translated name for code: " + code) locales[code] = webLocales[code].Name } }