From b55d5b5de7b674dd95aedb36bc3077f48810d194 Mon Sep 17 00:00:00 2001 From: shprink Date: Mon, 21 Sep 2015 12:07:13 -0500 Subject: [PATCH] Closes #57 --- CHANGELOG.md | 2 ++ config.json.dist | 1 - lib/config/ionic.config.coffee | 2 -- lib/language/language.provider.coffee | 3 ++- lib/translations/en.json | 1 + lib/translations/es.json | 1 + lib/translations/fr.json | 1 + lib/translations/pl.json | 1 + lib/translations/zh.json | 1 + 9 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f09c78596..de5914b5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * Update dependencies: Angular 1.4, Ionic 1.1 etc * Translation: Use wildcarts to cover all regions (e.g: en_* will use en.json) * iOS9 support: +* [SEARCH] Empty input button not aligned: +* Translate back button: ### 1.5.1 (2015-09-03) diff --git a/config.json.dist b/config.json.dist index f3eee4686..f854defc7 100644 --- a/config.json.dist +++ b/config.json.dist @@ -17,7 +17,6 @@ }, "backButton": { "icon": null, - "text": null, "previousTitleText": null }, "form": { diff --git a/lib/config/ionic.config.coffee b/lib/config/ionic.config.coffee index 89b9791fa..bab94d0ed 100644 --- a/lib/config/ionic.config.coffee +++ b/lib/config/ionic.config.coffee @@ -5,7 +5,6 @@ module.exports = ($WPHCConfig, $ionicConfigProvider) -> viewsForwardCache = _.get $WPHCConfig, 'ionicConfig.views.forwardCache' scrollingJsScrolling = _.get $WPHCConfig, 'ionicConfig.scrolling.jsScrolling' backButtonIcon = _.get $WPHCConfig, 'ionicConfig.backButton.icon' - backButtonText = _.get $WPHCConfig, 'ionicConfig.backButton.text' backButtonPreviousTitleText = _.get $WPHCConfig, 'ionicConfig.backButton.previousTitleText' formCheckbox = _.get $WPHCConfig, 'ionicConfig.form.checkbox' formToggle = _.get $WPHCConfig, 'ionicConfig.form.toggle' @@ -22,7 +21,6 @@ module.exports = ($WPHCConfig, $ionicConfigProvider) -> $ionicConfigProvider.views.forwardCache viewsForwardCache if _.isBoolean viewsForwardCache $ionicConfigProvider.scrolling.jsScrolling scrollingJsScrolling if _.isBoolean scrollingJsScrolling $ionicConfigProvider.backButton.icon backButtonIcon if _.isString backButtonIcon - $ionicConfigProvider.backButton.text backButtonText if _.isString backButtonText $ionicConfigProvider.backButton.previousTitleText backButtonPreviousTitleText if _.isBoolean backButtonPreviousTitleText $ionicConfigProvider.form.checkbox formCheckbox if _.isString formCheckbox $ionicConfigProvider.form.toggle formToggle if _.isString formToggle diff --git a/lib/language/language.provider.coffee b/lib/language/language.provider.coffee index c6562e67a..1e9bb9cf0 100644 --- a/lib/language/language.provider.coffee +++ b/lib/language/language.provider.coffee @@ -24,7 +24,7 @@ module.exports = angular.module 'wordpress-hybrid-client.language' getLanguages : getLanguages getLanguagesMapping: getLanguagesMapping - $get : (amMoment) -> + $get : (amMoment, $ionicConfig, $filter) -> locale: localStorage.getItem("locale") || 'en' getPreferedLanguage : getPreferedLanguage getLanguages : getLanguages @@ -38,6 +38,7 @@ module.exports = angular.module 'wordpress-hybrid-client.language' setLocale: (@locale) -> localStorage.setItem "locale", @locale $translateProvider.use @locale + $ionicConfig.backButton.text $filter('translate') 'back' # specific to chinese so far if @locale is 'zh' amMoment.changeLocale 'zh-cn' diff --git a/lib/translations/en.json b/lib/translations/en.json index 5582b1ce6..4ed24ed50 100644 --- a/lib/translations/en.json +++ b/lib/translations/en.json @@ -1,6 +1,7 @@ { "pullToRefresh": "Pull to refresh!", "retry": "Retry", + "back": "Back", "error": "Something wrong happened, please try again.", "attemptToConnect": "Attempt to connect {{attempt}} of {{attemptMax}}.", "yes": "Yes", diff --git a/lib/translations/es.json b/lib/translations/es.json index f76d5e3ca..d059e5225 100644 --- a/lib/translations/es.json +++ b/lib/translations/es.json @@ -1,6 +1,7 @@ { "pullToRefresh": "Desliza para refrescar", "retry": "Reintentar", + "back": "Regresar", "error": "Ha ocurrido un error, inténtalo de nuevo.", "attemptToConnect": "Attempt to connect {{attempt}} of {{attemptMax}}.", "yes": "Sí", diff --git a/lib/translations/fr.json b/lib/translations/fr.json index d2030c6fe..ea440d566 100644 --- a/lib/translations/fr.json +++ b/lib/translations/fr.json @@ -1,6 +1,7 @@ { "pullToRefresh": "Tirer pour rafraîchir!", "retry": "Réessayez", + "back": "Retour", "error": "Quelque chose d'inattendu est survenu, veuillez réessayer.", "attemptToConnect": "Tentative de connection {{attempt}} sur {{attemptMax}}.", "yes": "Oui", diff --git a/lib/translations/pl.json b/lib/translations/pl.json index 28ae311e1..ec81b8b53 100644 --- a/lib/translations/pl.json +++ b/lib/translations/pl.json @@ -1,6 +1,7 @@ { "pullToRefresh": "Pociągnij aby odświeżyć.", "retry": "Spróbuj ponownie.", + "back": "Back", "error": "O nie! Stało się coś strasznego! Spróbuj ponownie..", "attemptToConnect": "{{attempt}} próba połączenia z {{attemptMax}}.", "yes": "Tak", diff --git a/lib/translations/zh.json b/lib/translations/zh.json index 3de2242bc..b6c03451c 100644 --- a/lib/translations/zh.json +++ b/lib/translations/zh.json @@ -1,6 +1,7 @@ { "pullToRefresh": "下拉刷新!", "retry": "重试", + "back": "Back", "error": "系统遭遇未知错误,请重试。", "attemptToConnect": "正在尝试第 {{attempt}} 次连接(最多 {{attemptMax}} 次)", "yes": "是",