diff --git a/googletrans/constants.py b/googletrans/constants.py index d419433..c5099e7 100644 --- a/googletrans/constants.py +++ b/googletrans/constants.py @@ -19,8 +19,8 @@ LANGUAGES = { 'ca': 'catalan', 'ceb': 'cebuano', 'ny': 'chichewa', - 'zh-CN': 'chinese_simplified', - 'zh-TW': 'chinese_traditional', + 'zh-cn': 'chinese (simplified)', + 'zh-tw': 'chinese (traditional)', 'co': 'corsican', 'hr': 'croatian', 'cs': 'czech', @@ -38,7 +38,7 @@ LANGUAGES = { 'de': 'german', 'el': 'greek', 'gu': 'gujarati', - 'ht': 'haitian_creole', + 'ht': 'haitian creole', 'ha': 'hausa', 'haw': 'hawaiian', 'iw': 'hebrew', @@ -56,7 +56,7 @@ LANGUAGES = { 'kk': 'kazakh', 'km': 'khmer', 'ko': 'korean', - 'ku': 'kurdish', + 'ku': 'kurdish (kurmanji)', 'ky': 'kyrgyz', 'lo': 'lao', 'la': 'latin', @@ -71,7 +71,7 @@ LANGUAGES = { 'mi': 'maori', 'mr': 'marathi', 'mn': 'mongolian', - 'my': 'myanmar', + 'my': 'myanmar (burmese)', 'ne': 'nepali', 'no': 'norwegian', 'ps': 'pashto', @@ -82,7 +82,7 @@ LANGUAGES = { 'ro': 'romanian', 'ru': 'russian', 'sm': 'samoan', - 'gd': 'scots_gaelic', + 'gd': 'scots gaelic', 'sr': 'serbian', 'st': 'sesotho', 'sn': 'shona', diff --git a/tests/test_client.py b/tests/test_client.py index f913e3e..4370c52 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -42,6 +42,11 @@ def test_language_name(translator): assert result.text == u'Dia dhuit' +def test_language_name_with_space(translator): + result = translator.translate(u'Hello', src='en', dest='chinese (simplified)') + assert result.dest == 'zh-cn' + + def test_language_rfc1766(translator): result = translator.translate(u'luna', src='it_ch@euro', dest='en') assert result.text == u'moon'