From 88a822204dcf1dd7adc12c511e36870af8ceac3a Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Tue, 12 Jun 2018 19:36:56 -0700 Subject: [PATCH] Add message for unsupported proxy authentication by browser. Fix #1512. --- omega-locales/ach/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/cs/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/de/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/en_GB/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/en_US/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/es/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/es_AR/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/fa/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/fr/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/is/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/ja/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/nb_NO/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/nl/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/pt_BR/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/ru/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/sk/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/sl/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/tr/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/uk/LC_MESSAGES/omega-web.po | 5 +++++ omega-locales/zh_CN/LC_MESSAGES/omega-web.po | 4 ++++ omega-locales/zh_TW/LC_MESSAGES/omega-web.po | 4 ++++ omega-web/src/omega/controllers/fixed_profile.coffee | 4 +++- omega-web/src/partials/fixed_auth_edit.jade | 5 +++++ omega-web/src/partials/profile_fixed.jade | 2 +- 24 files changed, 112 insertions(+), 2 deletions(-) diff --git a/omega-locales/ach/LC_MESSAGES/omega-web.po b/omega-locales/ach/LC_MESSAGES/omega-web.po index 1ae84bb..ae28b87 100644 --- a/omega-locales/ach/LC_MESSAGES/omega-web.po +++ b/omega-locales/ach/LC_MESSAGES/omega-web.po @@ -554,6 +554,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/cs/LC_MESSAGES/omega-web.po b/omega-locales/cs/LC_MESSAGES/omega-web.po index 225eee3..c31149b 100644 --- a/omega-locales/cs/LC_MESSAGES/omega-web.po +++ b/omega-locales/cs/LC_MESSAGES/omega-web.po @@ -559,6 +559,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Ověřování" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Varování: Uživatelské jméno a heslo může být nečekané serverům zaslána " diff --git a/omega-locales/de/LC_MESSAGES/omega-web.po b/omega-locales/de/LC_MESSAGES/omega-web.po index fff3c8e..9f1bd4c 100644 --- a/omega-locales/de/LC_MESSAGES/omega-web.po +++ b/omega-locales/de/LC_MESSAGES/omega-web.po @@ -559,6 +559,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/en_GB/LC_MESSAGES/omega-web.po b/omega-locales/en_GB/LC_MESSAGES/omega-web.po index de5e8e8..ed0fbf0 100644 --- a/omega-locales/en_GB/LC_MESSAGES/omega-web.po +++ b/omega-locales/en_GB/LC_MESSAGES/omega-web.po @@ -445,6 +445,11 @@ msgstr "" msgid "options_proxy_auth" msgstr "" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/en_US/LC_MESSAGES/omega-web.po b/omega-locales/en_US/LC_MESSAGES/omega-web.po index 909f3ba..fc7d8c3 100644 --- a/omega-locales/en_US/LC_MESSAGES/omega-web.po +++ b/omega-locales/en_US/LC_MESSAGES/omega-web.po @@ -548,6 +548,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/es/LC_MESSAGES/omega-web.po b/omega-locales/es/LC_MESSAGES/omega-web.po index d523008..0a6e6af 100644 --- a/omega-locales/es/LC_MESSAGES/omega-web.po +++ b/omega-locales/es/LC_MESSAGES/omega-web.po @@ -581,6 +581,11 @@ msgstr "Puerto" msgid "options_proxy_auth" msgstr "Autenticación" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Advertencia: El nombre usuario/contraseña pueden enviarse a servidores " diff --git a/omega-locales/es_AR/LC_MESSAGES/omega-web.po b/omega-locales/es_AR/LC_MESSAGES/omega-web.po index c0124f9..6194e56 100644 --- a/omega-locales/es_AR/LC_MESSAGES/omega-web.po +++ b/omega-locales/es_AR/LC_MESSAGES/omega-web.po @@ -559,6 +559,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/fa/LC_MESSAGES/omega-web.po b/omega-locales/fa/LC_MESSAGES/omega-web.po index 447d46b..469724a 100644 --- a/omega-locales/fa/LC_MESSAGES/omega-web.po +++ b/omega-locales/fa/LC_MESSAGES/omega-web.po @@ -561,6 +561,11 @@ msgstr "پورت" msgid "options_proxy_auth" msgstr "تصدیق" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "اخطار : نام کاربری / رمز عبور ممکن است برای سرور های غیرمنتظره توسط اسکریپت " diff --git a/omega-locales/fr/LC_MESSAGES/omega-web.po b/omega-locales/fr/LC_MESSAGES/omega-web.po index d5044e7..e389a31 100644 --- a/omega-locales/fr/LC_MESSAGES/omega-web.po +++ b/omega-locales/fr/LC_MESSAGES/omega-web.po @@ -561,6 +561,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/is/LC_MESSAGES/omega-web.po b/omega-locales/is/LC_MESSAGES/omega-web.po index e68dfa1..2765637 100644 --- a/omega-locales/is/LC_MESSAGES/omega-web.po +++ b/omega-locales/is/LC_MESSAGES/omega-web.po @@ -474,6 +474,11 @@ msgstr "" msgid "options_proxy_auth" msgstr "" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/ja/LC_MESSAGES/omega-web.po b/omega-locales/ja/LC_MESSAGES/omega-web.po index 5c2686b..a2f1d82 100644 --- a/omega-locales/ja/LC_MESSAGES/omega-web.po +++ b/omega-locales/ja/LC_MESSAGES/omega-web.po @@ -549,6 +549,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/nb_NO/LC_MESSAGES/omega-web.po b/omega-locales/nb_NO/LC_MESSAGES/omega-web.po index 9196653..1cf1a44 100644 --- a/omega-locales/nb_NO/LC_MESSAGES/omega-web.po +++ b/omega-locales/nb_NO/LC_MESSAGES/omega-web.po @@ -490,6 +490,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Identitetsbekreftelse" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + #, fuzzy msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/nl/LC_MESSAGES/omega-web.po b/omega-locales/nl/LC_MESSAGES/omega-web.po index f2efb95..9361938 100644 --- a/omega-locales/nl/LC_MESSAGES/omega-web.po +++ b/omega-locales/nl/LC_MESSAGES/omega-web.po @@ -464,6 +464,11 @@ msgstr "" msgid "options_proxy_auth" msgstr "" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/pt_BR/LC_MESSAGES/omega-web.po b/omega-locales/pt_BR/LC_MESSAGES/omega-web.po index defe030..c39907a 100644 --- a/omega-locales/pt_BR/LC_MESSAGES/omega-web.po +++ b/omega-locales/pt_BR/LC_MESSAGES/omega-web.po @@ -556,6 +556,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/ru/LC_MESSAGES/omega-web.po b/omega-locales/ru/LC_MESSAGES/omega-web.po index a0887d9..3b80d57 100644 --- a/omega-locales/ru/LC_MESSAGES/omega-web.po +++ b/omega-locales/ru/LC_MESSAGES/omega-web.po @@ -564,6 +564,11 @@ msgstr "Порт" msgid "options_proxy_auth" msgstr "Аутентификация" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/sk/LC_MESSAGES/omega-web.po b/omega-locales/sk/LC_MESSAGES/omega-web.po index 55848bd..4acb76c 100644 --- a/omega-locales/sk/LC_MESSAGES/omega-web.po +++ b/omega-locales/sk/LC_MESSAGES/omega-web.po @@ -473,6 +473,11 @@ msgstr "" msgid "options_proxy_auth" msgstr "" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/sl/LC_MESSAGES/omega-web.po b/omega-locales/sl/LC_MESSAGES/omega-web.po index ee61ac4..d37b93f 100644 --- a/omega-locales/sl/LC_MESSAGES/omega-web.po +++ b/omega-locales/sl/LC_MESSAGES/omega-web.po @@ -475,6 +475,11 @@ msgstr "" msgid "options_proxy_auth" msgstr "" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/tr/LC_MESSAGES/omega-web.po b/omega-locales/tr/LC_MESSAGES/omega-web.po index 739acbd..4be4a35 100644 --- a/omega-locales/tr/LC_MESSAGES/omega-web.po +++ b/omega-locales/tr/LC_MESSAGES/omega-web.po @@ -556,6 +556,11 @@ msgstr "Port" msgid "options_proxy_auth" msgstr "Authentication" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + msgid "options_proxy_authAllWarningPac" msgstr "" "Warning: The username/password may be sent to unexpected servers returned by " diff --git a/omega-locales/uk/LC_MESSAGES/omega-web.po b/omega-locales/uk/LC_MESSAGES/omega-web.po index 2990f66..57e42a7 100644 --- a/omega-locales/uk/LC_MESSAGES/omega-web.po +++ b/omega-locales/uk/LC_MESSAGES/omega-web.po @@ -604,6 +604,11 @@ msgstr "Порт" msgid "options_proxy_auth" msgstr "Дані для входу" +msgid "options_proxy_authNotSupported" +msgstr "Your browser DOES NOT support $PROTOCOLDISP$ proxy authentication! " +"Please do not report this issue to SwitchyOmega. Contact the support for " +"your browser instead." + #, fuzzy msgid "options_proxy_authAllWarningPac" msgstr "" diff --git a/omega-locales/zh_CN/LC_MESSAGES/omega-web.po b/omega-locales/zh_CN/LC_MESSAGES/omega-web.po index e61823c..238fe7e 100644 --- a/omega-locales/zh_CN/LC_MESSAGES/omega-web.po +++ b/omega-locales/zh_CN/LC_MESSAGES/omega-web.po @@ -499,6 +499,10 @@ msgstr "代理端口" msgid "options_proxy_auth" msgstr "代理登录" +msgid "options_proxy_authNotSupported" +msgstr "您的浏览器不支持 $PROTOCOLDISP$ 代理认证!如有问题请联系您的浏览器支持," +"请勿反馈此问题给 SwitchyOmega." + msgid "options_proxy_authAllWarningPac" msgstr "警告: 用户名密码将会提供给PAC脚本返回的任何服务器,有时目标服务器会出乎您的预料。" diff --git a/omega-locales/zh_TW/LC_MESSAGES/omega-web.po b/omega-locales/zh_TW/LC_MESSAGES/omega-web.po index d6ff7f6..24b2a23 100644 --- a/omega-locales/zh_TW/LC_MESSAGES/omega-web.po +++ b/omega-locales/zh_TW/LC_MESSAGES/omega-web.po @@ -489,6 +489,10 @@ msgstr "連接埠" msgid "options_proxy_auth" msgstr "代理認證" +msgid "options_proxy_authNotSupported" +msgstr "您的瀏覽器不支持 $PROTOCOLDISP$ 代理認證!如有問題請聯繫您的瀏覽器支持," +"請勿反饋此問題給 SwitchyOmega." + msgid "options_proxy_authAllWarningPac" msgstr "警告: 用戶名密碼將會提供給PAC指令碼返回的任何伺服器,有時目標伺服器會出乎您的預料。" diff --git a/omega-web/src/omega/controllers/fixed_profile.coffee b/omega-web/src/omega/controllers/fixed_profile.coffee index 9476ac5..1bc2333 100644 --- a/omega-web/src/omega/controllers/fixed_profile.coffee +++ b/omega-web/src/omega/controllers/fixed_profile.coffee @@ -53,10 +53,12 @@ angular.module('omega').controller 'FixedProfileCtrl', ($scope, $modal, scope.proxy = proxy auth = $scope.profile.auth?[prop] scope.auth = auth && angular.copy(auth) + scope.authSupported = $scope.authSupported[proxy.scheme] + scope.protocolDisp = proxy.scheme $modal.open( templateUrl: 'partials/fixed_auth_edit.html' scope: scope - size: 'sm' + size: if scope.authSupported then 'sm' else 'lg' ).result.then (auth) -> if not auth?.username if $scope.profile.auth diff --git a/omega-web/src/partials/fixed_auth_edit.jade b/omega-web/src/partials/fixed_auth_edit.jade index 34aa132..70067c9 100644 --- a/omega-web/src/partials/fixed_auth_edit.jade +++ b/omega-web/src/partials/fixed_auth_edit.jade @@ -5,6 +5,11 @@ form(ng-submit='authForm.$valid && $close(auth)' name='authForm') span.sr-only Close h4.modal-title {{'options_modalHeader_proxyAuth' | tr}} .modal-body(style='padding-bottom: 0;') + .form-group(ng-show='!authSupported') + .alert.alert-danger + span.glyphicon.glyphicon-warning-sign + = ' ' + | {{"options_proxy_authNotSupported" | tr:[protocolDisp]}} .form-group label.sr-only {{'options_proxyAuthUsername' | tr}} div(input-group-clear type='text' model='auth.username' autofocus diff --git a/omega-web/src/partials/profile_fixed.jade b/omega-web/src/partials/profile_fixed.jade index b30608e..0b0a4e4 100644 --- a/omega-web/src/partials/profile_fixed.jade +++ b/omega-web/src/partials/profile_fixed.jade @@ -26,7 +26,7 @@ div(ng-controller='FixedProfileCtrl') td(ng-if='!proxyEditors[scheme].scheme') input.form-control(type='number' value='' placeholder='{{proxyEditors[""].port}}' disabled) td.proxy-actions - button.btn.btn-xs.proxy-auth-toggle(ng-show='authSupported[proxyEditors[scheme].scheme]' + button.btn.btn-xs.proxy-auth-toggle( ng-class='isProxyAuthActive(scheme) ? "btn-success" : "btn-default"' type='button' role='button' ng-click='editProxyAuth(scheme)' title='{{"options_proxy_auth" | tr}}') span.glyphicon.glyphicon-lock