diff --git a/omega-locales/en_US/LC_MESSAGES/omega-web.po b/omega-locales/en_US/LC_MESSAGES/omega-web.po index 11dd9fd..e923c4e 100644 --- a/omega-locales/en_US/LC_MESSAGES/omega-web.po +++ b/omega-locales/en_US/LC_MESSAGES/omega-web.po @@ -32,9 +32,15 @@ msgstr "Auto Switch" msgid "profile_direct" msgstr "[Direct]" +msgid "profile_direct_badge_text" +msgstr "Direct" + msgid "profile_system" msgstr "[System Proxy]" +msgid "profile_system_badge_text" +msgstr "System" + msgid "condition_HostWildcardCondition" msgstr "Host wildcard" @@ -267,7 +273,7 @@ msgid "options_addConditionsToBottom" msgstr "Put new conditions added using the popup to the bottom of the list." msgid "options_showResultProfileOnActionBadgeText" -msgstr "show the result profile's name on the action badge text." +msgstr "Show the result profile's name on the action badge text." msgid "options_group_keyboardShortcut" msgstr "Keyboard Shortcut" diff --git a/omega-locales/zh_CN/LC_MESSAGES/omega-web.po b/omega-locales/zh_CN/LC_MESSAGES/omega-web.po index 3958438..f1c0fb7 100644 --- a/omega-locales/zh_CN/LC_MESSAGES/omega-web.po +++ b/omega-locales/zh_CN/LC_MESSAGES/omega-web.po @@ -32,9 +32,15 @@ msgstr "自动切换" msgid "profile_direct" msgstr "[直接连接]" +msgid "profile_direct_badge_text" +msgstr "直连" + msgid "profile_system" msgstr "[系统代理]" +msgid "profile_system_badge_text" +msgstr "系统" + msgid "condition_HostWildcardCondition" msgstr "域名通配符" diff --git a/omega-locales/zh_TW/LC_MESSAGES/omega-web.po b/omega-locales/zh_TW/LC_MESSAGES/omega-web.po index 9125430..d204372 100644 --- a/omega-locales/zh_TW/LC_MESSAGES/omega-web.po +++ b/omega-locales/zh_TW/LC_MESSAGES/omega-web.po @@ -32,9 +32,15 @@ msgstr "自動切換" msgid "profile_direct" msgstr "[直接連線]" +msgid "profile_direct_badge_text" +msgstr "直連" + msgid "profile_system" msgstr "[系統代理]" +msgid "profile_system_badge_text" +msgstr "系統" + msgid "condition_HostWildcardCondition" msgstr "網域萬用字元" diff --git a/omega-target-chromium-extension/src/coffee/background.coffee b/omega-target-chromium-extension/src/coffee/background.coffee index 9e1623c..e6efe7a 100644 --- a/omega-target-chromium-extension/src/coffee/background.coffee +++ b/omega-target-chromium-extension/src/coffee/background.coffee @@ -195,10 +195,10 @@ zeroBackground = (zeroStorage, opts) -> if profile.name != currentName shortTitle += ' => ' + profile.name # TODO: I18n. if options._options['-showResultProfileOnActionBadgeText'] + badgeText = profile.name or '' if profile.builtin - badgeText = profile.name - else - badgeText = profile.name?.substring(0, 4) + badgeText = dispName(profile.name + '_badge_text') + badgeText = badgeText.substring(0, 4) return { title: chrome.i18n.getMessage('browserAction_titleWithResult', [ diff --git a/omega-target-chromium-extension/src/module/proxy/proxy_impl.coffee b/omega-target-chromium-extension/src/module/proxy/proxy_impl.coffee index f03b148..e52c748 100644 --- a/omega-target-chromium-extension/src/module/proxy/proxy_impl.coffee +++ b/omega-target-chromium-extension/src/module/proxy/proxy_impl.coffee @@ -42,7 +42,7 @@ class ProxyImpl _profile = OmegaPac.Profiles.byName(name, options) if _profile referenced_profiles.push(_profile) - cachedProfiles = profilePacCache.keys().toArray() + cachedProfiles = Array.from(profilePacCache.keys()) allProfiles = Object.values(options) cachedProfiles.forEach((cachedProfile) -> if allProfiles.indexOf(cachedProfile) < 0