[tor-commits] [check/master] Display translation names in their language
arlo at torproject.org
arlo at torproject.org
Tue Feb 25 22:39:02 UTC 2014
commit dcd2a0e506d6350f2989c50f0797a5ed0a0adcee
Author: Arlo Breault <arlolra at gmail.com>
Date: Tue Feb 25 22:36:41 2014 +0000
Display translation names in their language
Part of trac 10171.
---
public/index.html | 2 +-
utils.go | 68 ++++++++++++++++++++++++++++++++---------------------
2 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/public/index.html b/public/index.html
index eb81799..dec740a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -90,7 +90,7 @@
{{ GetText .Lang "If you are attempting to use a Tor client, please refer to the <a href=\"https://www.torproject.org/\">Tor website</a> and specifically the <a href=\"https://www.torproject.org/docs/faq#DoesntWork\">instructions for configuring your Tor client</a>." | UnEscaped }}
{{ end }}
</p>
- <a id="donate" href="https://www.torproject.org/donate/donate.html">Donate to Support Tor</a>
+ <a id="donate" href="https://www.torproject.org/donate/donate.html">{{ GetText .Lang "Donate to Support Tor" }}</a>
<ul id="links">
<li>
<a href="https://torproject.org/dist/manual/short-user-manual_{{ UserManual .Lang }}.xhtml">{{ GetText .Lang "Short User Manual" }}</a>
diff --git a/utils.go b/utils.go
index d4912e7..1c85b28 100644
--- a/utils.go
+++ b/utils.go
@@ -125,34 +125,48 @@ type locale struct {
}
func GetLocaleList(base string) map[string]string {
- // TODO: This should be it's own translation file
+ // populated from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
haveTranslatedNames := map[string]string{
- "ar": "عربية (Arabiya)",
- "bms": "Burmese",
- "cs": "česky",
- "da": "Dansk",
- "de": "Deutsch",
- "el": "Ελληνικά (Ellinika)",
- "en_US": "English",
- "es": "Español",
- "et": "Estonian",
- "fa_IR": "فارسی (Fārsī)",
- "fr": "Français",
- "it_IT": "Italiano",
- "ja": "日本語 (Nihongo)",
- "nb": "Norsk (Bokmål)",
- "nl": "Nederlands",
- "pl": "Polski",
- "pt": "Português",
- "pt_BR": "Português do Brasil",
- "ro": "Română",
- "fi": "Suomi",
- "ru": "Русский (Russkij)",
- "th": "Thai",
- "tr": "Türkçe",
- "uk": "українська (Ukrajins\"ka)",
- "vi": "Vietnamese",
- "zh_CN": "中文(简)",
+ "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": "ÑкÑаÑнÑÑка мова",
}
// for all folders in locale which match a locale from https://www.transifex.com/api/2/languages/
More information about the tor-commits
mailing list