From 63091d1d8f51bd040895aed541bdcc8b08c9cefc Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 19 Sep 2014 18:19:09 +0400 Subject: [PATCH] Added Spanish localization Fixed unathorized request. Closes #465 --- app/css/desktop.css | 3 - app/js/controllers.js | 6 +- app/js/i18n.js | 11 +- app/js/init.js | 2 +- app/js/lib/config.js | 6 +- app/js/locales/en-us.json | 1 + app/js/locales/es-es.json | 555 ++++++++++++++++++++++++ app/js/services.js | 2 +- app/manifest.webapp | 2 +- app/partials/desktop/confirm_modal.html | 3 +- app/partials/desktop/lang_footer.html | 6 +- app/partials/desktop/login.html | 2 +- 12 files changed, 576 insertions(+), 23 deletions(-) create mode 100644 app/js/locales/es-es.json diff --git a/app/css/desktop.css b/app/css/desktop.css index e485a624..c493c6bf 100644 --- a/app/css/desktop.css +++ b/app/css/desktop.css @@ -128,9 +128,6 @@ a.footer_lang_link.active:active { .footer_link_divider { padding: 0 5px; } -/*.footer_link_divider:last-child { - display: none; -}*/ .im_dialogs_col { margin-right: -7px; diff --git a/app/js/controllers.js b/app/js/controllers.js index 06937a0d..1c9f6181 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1456,8 +1456,9 @@ angular.module('myApp.controllers', ['myApp.i18n']) }) .controller('AppLangFooterController', function ($scope, _, Storage, ErrorService) { - $scope.supportedLangs = _.supported(); - $scope.curLocale = _.locale(); + $scope.supportedLocales = Config.I18n.supported; + $scope.langNames = Config.I18n.languages; + $scope.curLocale = Config.I18n.locale; $scope.localeSelect = function localeSelect (newLocale) { Storage.set({i18n_locale: newLocale}); @@ -2048,7 +2049,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) $scope.notify = {}; $scope.send = {}; - $scope.i18n = {supported: _.supported()}; $scope.$watch('photo.file', onPhotoSelected); diff --git a/app/js/i18n.js b/app/js/i18n.js index 0fbfb0f6..a6dd6cbc 100644 --- a/app/js/i18n.js +++ b/app/js/i18n.js @@ -24,7 +24,7 @@ angular.module('myApp.i18n', ['izhukov.utils']) function encodeEntities(value) { return value. replace(/&/g, '&'). - replace(/([^\#-~| |!])/g, function (value) { // non-alphanumeric + replace(/([^\#-~| |!\n\*])/g, function (value) { // non-alphanumeric return '&#' + value.charCodeAt(0) + ';'; }). replace(/ +
- + diff --git a/app/partials/desktop/lang_footer.html b/app/partials/desktop/lang_footer.html index f8e78b1b..30ce4811 100644 --- a/app/partials/desktop/lang_footer.html +++ b/app/partials/desktop/lang_footer.html @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/app/partials/desktop/login.html b/app/partials/desktop/login.html index 402b532f..a95ce0ef 100644 --- a/app/partials/desktop/login.html +++ b/app/partials/desktop/login.html @@ -83,4 +83,4 @@ -
\ No newline at end of file + \ No newline at end of file