Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 2dfd617

Browse files
fix(settings): i18n of the restart buttons
1 parent a5369a1 commit 2dfd617

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

js/languages/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@
726726
},
727727
"langChangeRestartTitle": "Restart needed for language change",
728728
"langChangeRestartMessage": "In order for your language change to fully take effect, you must restart the app.",
729+
"restartNow": "Restart Now",
730+
"restartLater": "Restart Later",
729731
"countries": {
730732
"AFGHANISTAN": "Afghanistan",
731733
"ALAND_ISLANDS": "Aland Islands",

js/languages/fr-CA.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@
725725
},
726726
"langChangeRestartTitle": "Redémarrage requis pour le changement de langue",
727727
"langChangeRestartMessage": "Vous devez redémarrer l'application pour que le changement de langue soit pleinement effectif.",
728+
"restartNow": "Redémarrer maintenant",
729+
"restartLater": "Redémarrer plus tard",
728730
"countries": {
729731
"AFGHANISTAN": "Afghanistan",
730732
"ALAND_ISLANDS": "Aland Islands",
@@ -1138,4 +1140,4 @@
11381140
"ZMW": "Zambian Kwacha",
11391141
"ZWL": "Zimbabwe Dollar"
11401142
}
1141-
}
1143+
}

js/languages/fr.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@
725725
},
726726
"langChangeRestartTitle": "Redémarrage requis pour le changement de langue",
727727
"langChangeRestartMessage": "Vous devez redémarrer l'application pour que le changement de langue soit pleinement effectif.",
728+
"restartNow": "Redémarrer maintenant",
729+
"restartLater": "Redémarrer plus tard",
728730
"countries": {
729731
"AFGHANISTAN": "Afghanistan",
730732
"ALAND_ISLANDS": "Aland Islands",
@@ -1138,4 +1140,4 @@
11381140
"ZMW": "Zambian Kwacha",
11391141
"ZWL": "Zimbabwe Dollar"
11401142
}
1141-
}
1143+
}

js/languages/pt-BR.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@
725725
},
726726
"langChangeRestartTitle": "Reinicialização necessária para a mudança de idioma.",
727727
"langChangeRestartMessage": "Para mudar o seu idioma, você precisa reinicializar o aplicativo.",
728+
"restartNow": "Recomece agora",
729+
"restartLater": "Recomeçar depois",
728730
"countries": {
729731
"AFGHANISTAN": "Afeganistão",
730732
"ALAND_ISLANDS": "Ilhas da Åland",
@@ -1138,4 +1140,4 @@
11381140
"ZMW": "Kwacha zambiano",
11391141
"ZWL": "Dólar do Zimbábue"
11401142
}
1141-
}
1143+
}

js/start.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ $(document).on('mouseleave', 'a[data-href-tooltip]', function() {
259259

260260
//record changes to the app state
261261
$(window).bind('hashchange', function(){
262-
const host = encodeURIComponent(app.serverConfigs.getActive().getServerBaseUrl());
263-
const route = Backbone.history.getFragment();
262+
const host = encodeURIComponent(app.serverConfigs.getActive().getServerBaseUrl());
263+
const route = Backbone.history.getFragment();
264264
localStorage.setItem(host, route);
265265
});
266266

@@ -391,7 +391,7 @@ var profileLoaded;
391391
var loadProfile = function(landingRoute, onboarded) {
392392
var externalRoute = remote.getGlobal('externalRoute');
393393

394-
landingRoute = landingRoute && landingRoute != undefined ? landingRoute : '#';
394+
landingRoute = landingRoute || '#';
395395

396396
profileLoaded = true;
397397

@@ -408,7 +408,7 @@ var loadProfile = function(landingRoute, onboarded) {
408408
var userLang = model.get('language');
409409
cCode = model.get('currency_code');
410410

411-
if(userLang != window.polyglot.currentLocale){
411+
if (userLang != window.polyglot.currentLocale) {
412412
//when switching nodes, the language saved in localStorage can be different than the language in the
413413
// user model, but the user model does not trigger a change because it hasn't changed
414414
updatePolyglot(userLang);
@@ -465,10 +465,10 @@ var loadProfile = function(landingRoute, onboarded) {
465465
title: window.polyglot.t('langChangeRestartTitle'),
466466
message: window.polyglot.t('langChangeRestartMessage'),
467467
buttons: [{
468-
text: 'Restart Later',
468+
text: window.polyglot.t('restartLater'),
469469
fragment: 'restart-later'
470470
}, {
471-
text: 'Restart Now',
471+
text: window.polyglot.t('restartNow'),
472472
fragment: 'restart-now'
473473
}]
474474
}).on('click-restart-later', () => {

0 commit comments

Comments
 (0)