Get language names from iso-codes.

This commit is contained in:
Huang Peng 2008-09-18 19:16:11 +08:00
Родитель b43b31301d
Коммит 5e233e2d3e
6 изменённых файлов: 64 добавлений и 859 удалений

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

@ -23,6 +23,7 @@ Requires: pygtk2
Requires: dbus-python >= 0.83.0
Requires: pyxdg
Requires: gnome-python2-gconf
Requires: iso-codes
%description
IBus means the Input Bus. It is a new input framework for Linux OS. It provides
@ -41,6 +42,7 @@ This package contains ibus im module for gtk2
Summary: IBus im module for qt4
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt >= 4.4.1
%description qt
This package contains ibus im module for qt4

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

@ -20,119 +20,45 @@
# Boston, MA 02111-1307 USA
__all__ = (
"LANGUAGES",
"get_language_name",
)
N_ = lambda a: a
import locale
import xml.parsers.expat
LANGUAGES = {
"C" : N_("English/Keyboard"),
"am_ET" : N_("Amharic"),
"ar" : N_("Arabic"),
"ar_EG" : N_("Arabic (Egypt)"),
"ar_LB" : N_("Arabic (Lebanon)"),
"as_IN" : N_("Assamese"),
"az_AZ" : N_("Azerbaijani"),
"be_BY" : N_("Belarusian"),
"bg_BG" : N_("Bulgarian"),
"bn" : N_("Bengali"),
"bn_BD" : N_("Bengali"),
"bn_IN" : N_("Bengali (India)"),
"bo" : N_("Tibetan"),
"bs_BA" : N_("Bosnian"),
"ca_ES" : N_("Catalan"),
"cs_CZ" : N_("Czech"),
"cy_GB" : N_("Welsh"),
"da_DK" : N_("Danish"),
"de_DE" : N_("German"),
"dv_MV" : N_("Dhivehi"),
"el_GR" : N_("Greek"),
"en" : N_("English"),
"en_AU" : N_("English (Australian)"),
"en_CA" : N_("English (Canadian)"),
"en_GB" : N_("English (British)"),
"en_IE" : N_("English (Ireland)"),
"en_US" : N_("English (American)"),
"es" : N_("Spanish"),
"es_ES" : N_("Spanish"),
"es_MX" : N_("Spanish (Mexico)"),
"et_EE" : N_("Estonian"),
"eu_ES" : N_("Basque"),
"fa_IR" : N_("Persian"),
"fi_FI" : N_("Finnish"),
"fr_FR" : N_("French"),
"ga_IE" : N_("Irish"),
"gl_ES" : N_("Galician"),
"gu_IN" : N_("Gujarati"),
"he_IL" : N_("Hebrew"),
"hi_IN" : N_("Hindi"),
"hr_HR" : N_("Croatian"),
"hu_HU" : N_("Hungarian"),
"hy_AM" : N_("Armenian"),
"ia" : N_("Interlingua"),
"id_ID" : N_("Indonesian"),
"is_IS" : N_("Icelandic"),
"it_IT" : N_("Italian"),
"iw_IL" : N_("Hebrew"),
"ja_JP" : N_("Japanese"),
"ka_GE" : N_("Georgian"),
"kk_KZ" : N_("Kazakh"),
"km" : N_("Cambodian"),
"kn_IN" : N_("Kannada"),
"ko_KR" : N_("Korean"),
"lo_LA" : N_("Laothian"),
"lt_LT" : N_("Lithuanian"),
"lv_LV" : N_("Latvian"),
"mk_MK" : N_("Macedonian"),
"ml_IN" : N_("Malayalam"),
"mn_MN" : N_("Mongolian"),
"mr_IN" : N_("Marathi"),
"ms_MY" : N_("Malay"),
"my_MM" : N_("Burmese"),
"ne_NP" : N_("Nepali"),
"nl_NL" : N_("Dutch"),
"nn_NO" : N_("Norwegian (nynorsk)"),
"no_NO" : N_("Norwegian (bokmal)"),
"or_IN" : N_("Oriya"),
"pa_IN" : N_("Punjabi"),
"pl_PL" : N_("Polish"),
"pt" : N_("Portuguese"),
"pt_BR" : N_("Portuguese (Brazil)"),
"pt_PT" : N_("Portuguese"),
"ro_RO" : N_("Romanian"),
"ru_RU" : N_("Russian"),
"si_LK" : N_("Sinhala"),
"sk_SK" : N_("Slovak"),
"sl_SI" : N_("Slovenian"),
"sq_AL" : N_("Albanian"),
"sr" : N_("Serbian"),
"sr_CS" : N_("Serbian"),
"sr_YU" : N_("Serbian"),
"sv" : N_("Swedish"),
"sv_FI" : N_("Swedish (Finland)"),
"sv_SE" : N_("Swedish"),
"ta_IN" : N_("Tamil"),
"te_IN" : N_("Telugu"),
"th_TH" : N_("Thai"),
"tr_TR" : N_("Turkish"),
"ug" : N_("Uighur"),
"uk_UA" : N_("Ukrainian"),
"ur_PK" : N_("Urdu"),
"uz_UZ" : N_("Uzbek"),
"vi_VN" : N_("Vietnamese"),
"wa_BE" : N_("Walloon"),
"yi" : N_("Yiddish"),
"yi_US" : N_("Yiddish"),
"zh" : N_("Chinese"),
"zh_CN" : N_("Chinese (simplified)"),
"zh_HK" : N_("Chinese (traditional)"),
"zh_TW" : N_("Chinese (traditional)"),
}
_ = lambda a: locale.dgettext("ibus", a)
__languages_dict = {}
locale.setlocale(locale.LC_ALL, "")
for k in LANGUAGES.keys():
def get_language_name(_locale):
lang = _locale.split("_")[0]
lang = lang.lower()
if lang in __languages_dict:
lang = __languages_dict[lang]
lang = locale.dgettext("iso_639", lang)
else:
lang = _(u"Other")
lang = locale.dgettext("ibus", lang)
return lang
def __start_element(name, attrs):
global __languages_dict
try:
lang, local = k.split("_")
if lang not in LANGUAGES:
LANGUAGES[lang] = LANGUAGES[k]
iso_639_1_code = attrs["iso_639_1_code"].decode("utf-8")
name = attrs["name"].decode("utf-8")
__languages_dict[iso_639_1_code] = name
except:
pass
def __end_element(name):
pass
def __char_data(data):
pass
iso_639_xml = "/usr/share/xml/iso-codes/iso_639.xml"
p = xml.parsers.expat.ParserCreate()
p.StartElementHandler = __start_element
p.EndElementHandler = __end_element
p.CharacterDataHandler = __char_data
p.ParseFile(file(iso_639_xml))

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

@ -27,7 +27,6 @@ import icon as _icon
import os
import sys
from os import path
from ibus import LANGUAGES
from ibus import interface
from languagebar import LanguageBar
from candidatepanel import CandidatePanel
@ -283,25 +282,27 @@ class Panel(ibus.PanelBase):
tmp = {}
for factory in factories:
name, lang, icon, authors, credits = self.__bus.get_factory_info(factory)
lang = LANGUAGES.get(lang, "other")
lang = ibus.get_language_name(lang)
if not icon:
icon = "engine-default"
if lang not in tmp:
tmp[lang] = []
tmp[lang].append((name, lang, icon, authors, credits, factory))
langs = tmp.keys()
langs.sort()
other = tmp.get(_("Other"), [])
if _("Other") in tmp:
langs.remove(_("Other"))
langs.append(_("Other"))
for lang in langs:
if len(tmp[lang]) == 1:
name, lang, icon, authors, credits, factory = tmp[lang][0]
item = gtk.ImageMenuItem("%s - %s" % (_(lang), name))
item = gtk.ImageMenuItem("%s - %s" % (lang, name))
size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
item.set_image (_icon.IconWidget(icon, size[0]))
item.connect("activate", self.__im_menu_item_activate_cb, factory)
menu.add(item)
else:
item = gtk.MenuItem(_(lang))
item = gtk.MenuItem(lang)
menu.add(item)
submenu = gtk.Menu()
item.set_submenu(submenu)

379
po/ja.po
Просмотреть файл

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ibus VERSION\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
"POT-Creation-Date: 2008-09-06 14:49+0800\n"
"POT-Creation-Date: 2008-09-18 17:49+0800\n"
"PO-Revision-Date: 2008-08-28 17:31+0900\n"
"Last-Translator: UTUMI Hirosi <utuhiro78@yahoo.co.jp>\n"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
@ -16,383 +16,20 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ibus/lang.py:29
msgid "English/Keyboard"
msgstr "英語/キーボード"
#: ibus/lang.py:40 panel/panel.py:292 panel/panel.py:293 panel/panel.py:294
#: panel/panel.py:295 setup/main.py:358 setup/main.py:359 setup/main.py:360
msgid "Other"
msgstr ""
#: ibus/lang.py:30
msgid "Amharic"
msgstr "アムハラ語"
#: ibus/lang.py:31
msgid "Arabic"
msgstr "アラビア語"
#: ibus/lang.py:32
msgid "Arabic (Egypt)"
msgstr "アラビア語 (エジプト)"
#: ibus/lang.py:33
msgid "Arabic (Lebanon)"
msgstr "アラビア語 (レバノン)"
#: ibus/lang.py:34
msgid "Assamese"
msgstr "アッサム語"
#: ibus/lang.py:35
msgid "Azerbaijani"
msgstr "アゼルバイジャン語"
#: ibus/lang.py:36
msgid "Belarusian"
msgstr "ベラルーシ語"
#: ibus/lang.py:37
msgid "Bulgarian"
msgstr "ブルガリア語"
#: ibus/lang.py:38 ibus/lang.py:39
msgid "Bengali"
msgstr "ベンガル語"
#: ibus/lang.py:40
msgid "Bengali (India)"
msgstr "ベンガル語 (インド)"
#: ibus/lang.py:41
msgid "Tibetan"
msgstr "チベット語"
#: ibus/lang.py:42
msgid "Bosnian"
msgstr "ボスニア語"
#: ibus/lang.py:43
msgid "Catalan"
msgstr "カタロニア語"
#: ibus/lang.py:44
msgid "Czech"
msgstr "チェコ語"
#: ibus/lang.py:45
msgid "Welsh"
msgstr "ウェールズ語"
#: ibus/lang.py:46
msgid "Danish"
msgstr "デンマーク語"
#: ibus/lang.py:47
msgid "German"
msgstr "ドイツ語"
#: ibus/lang.py:48
msgid "Dhivehi"
msgstr "ディベヒ語"
#: ibus/lang.py:49
msgid "Greek"
msgstr "ギリシャ語"
#: ibus/lang.py:50
msgid "English"
msgstr "英語"
#: ibus/lang.py:51
msgid "English (Australian)"
msgstr "英語 (オーストラリア)"
#: ibus/lang.py:52
msgid "English (Canadian)"
msgstr "英語 (カナダ)"
#: ibus/lang.py:53
msgid "English (British)"
msgstr "英語 (イギリス)"
#: ibus/lang.py:54
msgid "English (Ireland)"
msgstr "英語 (アイルランド)"
#: ibus/lang.py:55
msgid "English (American)"
msgstr "英語 (アメリカ)"
#: ibus/lang.py:56 ibus/lang.py:57
msgid "Spanish"
msgstr "スペイン語"
#: ibus/lang.py:58
msgid "Spanish (Mexico)"
msgstr "スペイン語 (メキシコ)"
#: ibus/lang.py:59
msgid "Estonian"
msgstr "エストニア語"
#: ibus/lang.py:60
msgid "Basque"
msgstr "バスク語"
#: ibus/lang.py:61
msgid "Persian"
msgstr "ペルシア語"
#: ibus/lang.py:62
msgid "Finnish"
msgstr "フィンランド語"
#: ibus/lang.py:63
msgid "French"
msgstr "フランス語"
#: ibus/lang.py:64
msgid "Irish"
msgstr "アイルランド語"
#: ibus/lang.py:65
msgid "Galician"
msgstr "ガリシア語"
#: ibus/lang.py:66
msgid "Gujarati"
msgstr "グジャラート語"
#: ibus/lang.py:67 ibus/lang.py:76
msgid "Hebrew"
msgstr "ヘブライ語"
#: ibus/lang.py:68
msgid "Hindi"
msgstr "ヒンディー語"
#: ibus/lang.py:69
msgid "Croatian"
msgstr "クロアチア語"
#: ibus/lang.py:70
msgid "Hungarian"
msgstr "ハンガリー語"
#: ibus/lang.py:71
msgid "Armenian"
msgstr "アルメニア語"
#: ibus/lang.py:72
msgid "Interlingua"
msgstr "インターリンガ"
#: ibus/lang.py:73
msgid "Indonesian"
msgstr "インドネシア語"
#: ibus/lang.py:74
msgid "Icelandic"
msgstr "アイスランド語"
#: ibus/lang.py:75
msgid "Italian"
msgstr "イタリア語"
#: ibus/lang.py:77
msgid "Japanese"
msgstr "日本語"
#: ibus/lang.py:78
msgid "Georgian"
msgstr "グルジア語"
#: ibus/lang.py:79
msgid "Kazakh"
msgstr "カザフスタン語"
#: ibus/lang.py:80
msgid "Cambodian"
msgstr "カンボジア語"
#: ibus/lang.py:81
msgid "Kannada"
msgstr "カンナダ語"
#: ibus/lang.py:82
msgid "Korean"
msgstr "韓国語"
#: ibus/lang.py:83
msgid "Laothian"
msgstr "ラオス語"
#: ibus/lang.py:84
msgid "Lithuanian"
msgstr "リトアニア語"
#: ibus/lang.py:85
msgid "Latvian"
msgstr "ラトビア語"
#: ibus/lang.py:86
msgid "Macedonian"
msgstr "マケドニア語"
#: ibus/lang.py:87
msgid "Malayalam"
msgstr "マラヤーラム語"
#: ibus/lang.py:88
msgid "Mongolian"
msgstr "モンゴル語"
#: ibus/lang.py:89
msgid "Marathi"
msgstr "マラーティー語"
#: ibus/lang.py:90
msgid "Malay"
msgstr "マレー語"
#: ibus/lang.py:91
msgid "Burmese"
msgstr "ビルマ語"
#: ibus/lang.py:92
msgid "Nepali"
msgstr "ネパール語"
#: ibus/lang.py:93
msgid "Dutch"
msgstr "オランダ語"
#: ibus/lang.py:94
msgid "Norwegian (nynorsk)"
msgstr "ノルウェイ語 (nynorsk)"
#: ibus/lang.py:95
msgid "Norwegian (bokmal)"
msgstr "ノルウェイ語 (bokmal)"
#: ibus/lang.py:96
msgid "Oriya"
msgstr "オリヤー語"
#: ibus/lang.py:97
msgid "Punjabi"
msgstr "パンジャブ語"
#: ibus/lang.py:98
msgid "Polish"
msgstr "ポーランド語"
#: ibus/lang.py:99 ibus/lang.py:101
msgid "Portuguese"
msgstr "ポルトガル語"
#: ibus/lang.py:100
msgid "Portuguese (Brazil)"
msgstr "ポルトガル語 (ブラジル)"
#: ibus/lang.py:102
msgid "Romanian"
msgstr "ルーマニア語"
#: ibus/lang.py:103
msgid "Russian"
msgstr "ロシア語"
#: ibus/lang.py:104
msgid "Sinhala"
msgstr "シンハラ語"
#: ibus/lang.py:105
msgid "Slovak"
msgstr "スロバキア語"
#: ibus/lang.py:106
msgid "Slovenian"
msgstr "スロベニア語"
#: ibus/lang.py:107
msgid "Albanian"
msgstr "アルバニア語"
#: ibus/lang.py:108 ibus/lang.py:109 ibus/lang.py:110
msgid "Serbian"
msgstr "セルビア語"
#: ibus/lang.py:111 ibus/lang.py:113
msgid "Swedish"
msgstr "スウェーデン語"
#: ibus/lang.py:112
msgid "Swedish (Finland)"
msgstr "スウェーデン語 (フィンランド)"
#: ibus/lang.py:114
msgid "Tamil"
msgstr "タミール語"
#: ibus/lang.py:115
msgid "Telugu"
msgstr "テルグ語"
#: ibus/lang.py:116
msgid "Thai"
msgstr "タイ語"
#: ibus/lang.py:117
msgid "Turkish"
msgstr "トルコ語"
#: ibus/lang.py:118
msgid "Uighur"
msgstr "ウイグル語"
#: ibus/lang.py:119
msgid "Ukrainian"
msgstr "ウクライナ語"
#: ibus/lang.py:120
msgid "Urdu"
msgstr "ウルドゥー語"
#: ibus/lang.py:121
msgid "Uzbek"
msgstr "ウズベク語"
#: ibus/lang.py:122
msgid "Vietnamese"
msgstr "ベトナム語"
#: ibus/lang.py:123
msgid "Walloon"
msgstr "ワロン語"
#: ibus/lang.py:124 ibus/lang.py:125
msgid "Yiddish"
msgstr "イディッシュ語"
#: ibus/lang.py:126
msgid "Chinese"
msgstr "中国語"
#: ibus/lang.py:127
msgid "Chinese (simplified)"
msgstr "中国語 (簡体)"
#: ibus/lang.py:128 ibus/lang.py:129
msgid "Chinese (traditional)"
msgstr "中国語 (繁体)"
#: panel/panel.py:96
#: panel/panel.py:99
msgid "iBus - Running"
msgstr "iBus - 実行中"
#: panel/panel.py:348
#: panel/panel.py:354
msgid "IBus is an intelligent input bus for Linux/Unix."
msgstr ""
#: panel/panel.py:352
#: panel/panel.py:358
msgid "translator-credits"
msgstr "UTUMI Hirosi <utuhiro78@yahoo.co.jp>"

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

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1.1.20080813\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
"POT-Creation-Date: 2008-09-06 14:49+0800\n"
"POT-Creation-Date: 2008-09-18 17:49+0800\n"
"PO-Revision-Date: 2008-08-13 21:59+0800\n"
"Last-Translator: Huang Peng <shawn.p.huang@gmail.com>\n"
"Language-Team: Huang Peng <shawn.p.huang@gmail.com>\n"
@ -15,383 +15,20 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ibus/lang.py:29
msgid "English/Keyboard"
msgstr "英语键盘"
#: ibus/lang.py:40 panel/panel.py:292 panel/panel.py:293 panel/panel.py:294
#: panel/panel.py:295 setup/main.py:358 setup/main.py:359 setup/main.py:360
msgid "Other"
msgstr "其他"
#: ibus/lang.py:30
msgid "Amharic"
msgstr "阿姆哈拉语"
#: ibus/lang.py:31
msgid "Arabic"
msgstr "阿拉伯语"
#: ibus/lang.py:32
msgid "Arabic (Egypt)"
msgstr "阿拉伯语(埃及)"
#: ibus/lang.py:33
msgid "Arabic (Lebanon)"
msgstr "阿拉伯语(黎巴嫩)"
#: ibus/lang.py:34
msgid "Assamese"
msgstr "阿萨姆语"
#: ibus/lang.py:35
msgid "Azerbaijani"
msgstr "阿塞拜疆语"
#: ibus/lang.py:36
msgid "Belarusian"
msgstr "白俄罗斯语"
#: ibus/lang.py:37
msgid "Bulgarian"
msgstr "保加利亚语"
#: ibus/lang.py:38 ibus/lang.py:39
msgid "Bengali"
msgstr "孟加拉语"
#: ibus/lang.py:40
msgid "Bengali (India)"
msgstr "孟加拉语(印度)"
#: ibus/lang.py:41
msgid "Tibetan"
msgstr "西藏语"
#: ibus/lang.py:42
msgid "Bosnian"
msgstr "波斯尼亚语"
#: ibus/lang.py:43
msgid "Catalan"
msgstr "加泰罗尼亚语"
#: ibus/lang.py:44
msgid "Czech"
msgstr "捷克语"
#: ibus/lang.py:45
msgid "Welsh"
msgstr "威尔士语"
#: ibus/lang.py:46
msgid "Danish"
msgstr "丹麦语"
#: ibus/lang.py:47
msgid "German"
msgstr "德语"
#: ibus/lang.py:48
msgid "Dhivehi"
msgstr "迪维希语"
#: ibus/lang.py:49
msgid "Greek"
msgstr "希腊语"
#: ibus/lang.py:50
msgid "English"
msgstr "英语"
#: ibus/lang.py:51
msgid "English (Australian)"
msgstr "英语(澳大利亚)"
#: ibus/lang.py:52
msgid "English (Canadian)"
msgstr "英语(加拿大)"
#: ibus/lang.py:53
msgid "English (British)"
msgstr "英语(不列颠)"
#: ibus/lang.py:54
msgid "English (Ireland)"
msgstr "英语(爱尔兰)"
#: ibus/lang.py:55
msgid "English (American)"
msgstr "英语(美国)"
#: ibus/lang.py:56 ibus/lang.py:57
msgid "Spanish"
msgstr "西班牙语"
#: ibus/lang.py:58
msgid "Spanish (Mexico)"
msgstr "西班牙语(墨西哥)"
#: ibus/lang.py:59
msgid "Estonian"
msgstr "爱沙尼亚语"
#: ibus/lang.py:60
msgid "Basque"
msgstr "巴斯克语"
#: ibus/lang.py:61
msgid "Persian"
msgstr "波斯语"
#: ibus/lang.py:62
msgid "Finnish"
msgstr "芬兰语"
#: ibus/lang.py:63
msgid "French"
msgstr "法语"
#: ibus/lang.py:64
msgid "Irish"
msgstr "爱尔兰语"
#: ibus/lang.py:65
msgid "Galician"
msgstr "加利西亚语"
#: ibus/lang.py:66
msgid "Gujarati"
msgstr "古吉拉特语"
#: ibus/lang.py:67 ibus/lang.py:76
msgid "Hebrew"
msgstr "希伯来语"
#: ibus/lang.py:68
msgid "Hindi"
msgstr "印地语"
#: ibus/lang.py:69
msgid "Croatian"
msgstr "克罗地亚语"
#: ibus/lang.py:70
msgid "Hungarian"
msgstr "匈牙利语"
#: ibus/lang.py:71
msgid "Armenian"
msgstr "亚美尼亚语"
#: ibus/lang.py:72
msgid "Interlingua"
msgstr "拉丁国际语"
#: ibus/lang.py:73
msgid "Indonesian"
msgstr "印度尼西亚语"
#: ibus/lang.py:74
msgid "Icelandic"
msgstr "冰岛语"
#: ibus/lang.py:75
msgid "Italian"
msgstr "意大利语"
#: ibus/lang.py:77
msgid "Japanese"
msgstr "日语"
#: ibus/lang.py:78
msgid "Georgian"
msgstr "乔治亚语"
#: ibus/lang.py:79
msgid "Kazakh"
msgstr "哈萨克语"
#: ibus/lang.py:80
msgid "Cambodian"
msgstr "柬埔寨语"
#: ibus/lang.py:81
msgid "Kannada"
msgstr "卡纳达语"
#: ibus/lang.py:82
msgid "Korean"
msgstr "韩语"
#: ibus/lang.py:83
msgid "Laothian"
msgstr "老挝语"
#: ibus/lang.py:84
msgid "Lithuanian"
msgstr "立陶宛语"
#: ibus/lang.py:85
msgid "Latvian"
msgstr "拉脱维亚语"
#: ibus/lang.py:86
msgid "Macedonian"
msgstr "马其顿语"
#: ibus/lang.py:87
msgid "Malayalam"
msgstr "马拉雅拉姆语"
#: ibus/lang.py:88
msgid "Mongolian"
msgstr "蒙古语"
#: ibus/lang.py:89
msgid "Marathi"
msgstr "马拉地语"
#: ibus/lang.py:90
msgid "Malay"
msgstr "马来语"
#: ibus/lang.py:91
msgid "Burmese"
msgstr "缅甸语"
#: ibus/lang.py:92
msgid "Nepali"
msgstr "尼泊尔语"
#: ibus/lang.py:93
msgid "Dutch"
msgstr "荷兰语"
#: ibus/lang.py:94
msgid "Norwegian (nynorsk)"
msgstr "挪威语(尼诺斯克语)"
#: ibus/lang.py:95
msgid "Norwegian (bokmal)"
msgstr "挪威语(博克马尔语)"
#: ibus/lang.py:96
msgid "Oriya"
msgstr "奥里雅语"
#: ibus/lang.py:97
msgid "Punjabi"
msgstr "旁遮普语"
#: ibus/lang.py:98
msgid "Polish"
msgstr "波兰语"
#: ibus/lang.py:99 ibus/lang.py:101
msgid "Portuguese"
msgstr "葡萄牙语"
#: ibus/lang.py:100
msgid "Portuguese (Brazil)"
msgstr "葡萄牙语(巴西)"
#: ibus/lang.py:102
msgid "Romanian"
msgstr "罗马尼亚语"
#: ibus/lang.py:103
msgid "Russian"
msgstr "俄语"
#: ibus/lang.py:104
msgid "Sinhala"
msgstr "僧伽罗语"
#: ibus/lang.py:105
msgid "Slovak"
msgstr "斯洛伐克语"
#: ibus/lang.py:106
msgid "Slovenian"
msgstr "斯洛文尼亚语"
#: ibus/lang.py:107
msgid "Albanian"
msgstr "阿尔巴尼亚语"
#: ibus/lang.py:108 ibus/lang.py:109 ibus/lang.py:110
msgid "Serbian"
msgstr "塞尔维亚语"
#: ibus/lang.py:111 ibus/lang.py:113
msgid "Swedish"
msgstr "瑞典语"
#: ibus/lang.py:112
msgid "Swedish (Finland)"
msgstr "瑞典语(芬兰)"
#: ibus/lang.py:114
msgid "Tamil"
msgstr "泰米尔语"
#: ibus/lang.py:115
msgid "Telugu"
msgstr "泰卢固语"
#: ibus/lang.py:116
msgid "Thai"
msgstr "泰语"
#: ibus/lang.py:117
msgid "Turkish"
msgstr "土耳其语"
#: ibus/lang.py:118
msgid "Uighur"
msgstr "维吾尔语"
#: ibus/lang.py:119
msgid "Ukrainian"
msgstr "乌克兰语"
#: ibus/lang.py:120
msgid "Urdu"
msgstr "乌尔都语"
#: ibus/lang.py:121
msgid "Uzbek"
msgstr "乌兹别克语"
#: ibus/lang.py:122
msgid "Vietnamese"
msgstr "越南语"
#: ibus/lang.py:123
msgid "Walloon"
msgstr "瓦龙语"
#: ibus/lang.py:124 ibus/lang.py:125
msgid "Yiddish"
msgstr "意第绪语"
#: ibus/lang.py:126
msgid "Chinese"
msgstr "中文"
#: ibus/lang.py:127
msgid "Chinese (simplified)"
msgstr "简体中文"
#: ibus/lang.py:128 ibus/lang.py:129
msgid "Chinese (traditional)"
msgstr "繁体中文"
#: panel/panel.py:96
#: panel/panel.py:99
msgid "iBus - Running"
msgstr "iBus - 运行"
#: panel/panel.py:348
#: panel/panel.py:354
msgid "IBus is an intelligent input bus for Linux/Unix."
msgstr ""
#: panel/panel.py:352
#: panel/panel.py:358
msgid "translator-credits"
msgstr "Huang Peng <shawn.p.huang@gmail.com>"

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

@ -348,14 +348,16 @@ class Setup(object):
self.__bus.register_reload_engines()
for name, local_name, lang, icon, author, credits, _exec, started in self.__bus.register_list_engines():
_lang = ibus.LANGUAGES.get(lang, "other")
_lang = _(_lang)
_lang = ibus.get_language_name(lang)
if _lang not in langs:
langs[_lang] = list()
langs[_lang].append([name, local_name, lang, icon, author, credits, _exec, started])
keys = langs.keys()
keys.sort()
if _("Other") in keys:
keys.remove(_("Other"))
keys.append(_("Other"))
icon_size = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)[0]
pixbuf_missing = self.__load_icon("engine-default", icon_size)