~yerinalexey/gtranslate

b0c5f2c81dc80cb1c281c753b49659c6afa50bf1 — Alexey Yerin a month ago c792f7f master
*: run go fmt
2 files changed, 108 insertions(+), 108 deletions(-)

M languages.go
M web.go
M languages.go => languages.go +107 -107
@@ 1,111 1,111 @@
// Language code to name map lifted from py-googletrans: https://github.com/ssut/py-googletrans
package main

var Languages = map[string]string {
    "af": "afrikaans",
    "sq": "albanian",
    "am": "amharic",
    "ar": "arabic",
    "hy": "armenian",
    "az": "azerbaijani",
    "eu": "basque",
    "be": "belarusian",
    "bn": "bengali",
    "bs": "bosnian",
    "bg": "bulgarian",
    "ca": "catalan",
    "ceb": "cebuano",
    "ny": "chichewa",
    "zh-CN": "chinese (simplified)",
    "co": "corsican",
    "hr": "croatian",
    "cs": "czech",
    "da": "danish",
    "nl": "dutch",
    "en": "english",
    "eo": "esperanto",
    "et": "estonian",
    "tl": "filipino",
    "fi": "finnish",
    "fr": "french",
    "fy": "frisian",
    "gl": "galician",
    "ka": "georgian",
    "de": "german",
    "el": "greek",
    "gu": "gujarati",
    "ht": "haitian creole",
    "ha": "hausa",
    "haw": "hawaiian",
    "iw": "hebrew",
    "he": "hebrew",
    "hi": "hindi",
    "hmn": "hmong",
    "hu": "hungarian",
    "is": "icelandic",
    "ig": "igbo",
    "id": "indonesian",
    "ga": "irish",
    "it": "italian",
    "ja": "japanese",
    "jw": "javanese",
    "kn": "kannada",
    "kk": "kazakh",
    "km": "khmer",
    "ko": "korean",
    "ku": "kurdish (kurmanji)",
    "ky": "kyrgyz",
    "lo": "lao",
    "la": "latin",
    "lv": "latvian",
    "lt": "lithuanian",
    "lb": "luxembourgish",
    "mk": "macedonian",
    "mg": "malagasy",
    "ms": "malay",
    "ml": "malayalam",
    "mt": "maltese",
    "mi": "maori",
    "mr": "marathi",
    "mn": "mongolian",
    "my": "myanmar (burmese)",
    "ne": "nepali",
    "no": "norwegian",
    "or": "odia",
    "ps": "pashto",
    "fa": "persian",
    "pl": "polish",
    "pt": "portuguese",
    "pa": "punjabi",
    "ro": "romanian",
    "ru": "russian",
    "sm": "samoan",
    "gd": "scots gaelic",
    "sr": "serbian",
    "st": "sesotho",
    "sn": "shona",
    "sd": "sindhi",
    "si": "sinhala",
    "sk": "slovak",
    "sl": "slovenian",
    "so": "somali",
    "es": "spanish",
    "su": "sundanese",
    "sw": "swahili",
    "sv": "swedish",
    "tg": "tajik",
    "ta": "tamil",
    "te": "telugu",
    "th": "thai",
    "tr": "turkish",
    "uk": "ukrainian",
    "ur": "urdu",
    "ug": "uyghur",
    "uz": "uzbek",
    "vi": "vietnamese",
    "cy": "welsh",
    "xh": "xhosa",
    "yi": "yiddish",
    "yo": "yoruba",
    "zu": "zulu",
var Languages = map[string]string{
	"af":    "afrikaans",
	"sq":    "albanian",
	"am":    "amharic",
	"ar":    "arabic",
	"hy":    "armenian",
	"az":    "azerbaijani",
	"eu":    "basque",
	"be":    "belarusian",
	"bn":    "bengali",
	"bs":    "bosnian",
	"bg":    "bulgarian",
	"ca":    "catalan",
	"ceb":   "cebuano",
	"ny":    "chichewa",
	"zh-CN": "chinese (simplified)",
	"co":    "corsican",
	"hr":    "croatian",
	"cs":    "czech",
	"da":    "danish",
	"nl":    "dutch",
	"en":    "english",
	"eo":    "esperanto",
	"et":    "estonian",
	"tl":    "filipino",
	"fi":    "finnish",
	"fr":    "french",
	"fy":    "frisian",
	"gl":    "galician",
	"ka":    "georgian",
	"de":    "german",
	"el":    "greek",
	"gu":    "gujarati",
	"ht":    "haitian creole",
	"ha":    "hausa",
	"haw":   "hawaiian",
	"iw":    "hebrew",
	"he":    "hebrew",
	"hi":    "hindi",
	"hmn":   "hmong",
	"hu":    "hungarian",
	"is":    "icelandic",
	"ig":    "igbo",
	"id":    "indonesian",
	"ga":    "irish",
	"it":    "italian",
	"ja":    "japanese",
	"jw":    "javanese",
	"kn":    "kannada",
	"kk":    "kazakh",
	"km":    "khmer",
	"ko":    "korean",
	"ku":    "kurdish (kurmanji)",
	"ky":    "kyrgyz",
	"lo":    "lao",
	"la":    "latin",
	"lv":    "latvian",
	"lt":    "lithuanian",
	"lb":    "luxembourgish",
	"mk":    "macedonian",
	"mg":    "malagasy",
	"ms":    "malay",
	"ml":    "malayalam",
	"mt":    "maltese",
	"mi":    "maori",
	"mr":    "marathi",
	"mn":    "mongolian",
	"my":    "myanmar (burmese)",
	"ne":    "nepali",
	"no":    "norwegian",
	"or":    "odia",
	"ps":    "pashto",
	"fa":    "persian",
	"pl":    "polish",
	"pt":    "portuguese",
	"pa":    "punjabi",
	"ro":    "romanian",
	"ru":    "russian",
	"sm":    "samoan",
	"gd":    "scots gaelic",
	"sr":    "serbian",
	"st":    "sesotho",
	"sn":    "shona",
	"sd":    "sindhi",
	"si":    "sinhala",
	"sk":    "slovak",
	"sl":    "slovenian",
	"so":    "somali",
	"es":    "spanish",
	"su":    "sundanese",
	"sw":    "swahili",
	"sv":    "swedish",
	"tg":    "tajik",
	"ta":    "tamil",
	"te":    "telugu",
	"th":    "thai",
	"tr":    "turkish",
	"uk":    "ukrainian",
	"ur":    "urdu",
	"ug":    "uyghur",
	"uz":    "uzbek",
	"vi":    "vietnamese",
	"cy":    "welsh",
	"xh":    "xhosa",
	"yi":    "yiddish",
	"yo":    "yoruba",
	"zu":    "zulu",
}

M web.go => web.go +1 -1
@@ 33,7 33,7 @@ func CreateWebHandler(tmpl *template.Template, settings *TranslateSettings) func
		translation, err := Translate(settings, from, to, text)
		if err != nil {
			w.WriteHeader(500)
			tmpl.ExecuteTemplate(w, "error", err);
			tmpl.ExecuteTemplate(w, "error", err)
			return
		}