Webserver: -fix: Messages with dots were not translated

-fix: request extrenal may not work
This commit is contained in:
lukeIam committed 2013-12-13 18:03:13 +01:00
1 parent 6c6a6578bd
commit f00f3eb5ad
1 file changed
+10 -5
+10 -5
View File
@@ -1062,12 +1062,13 @@ function request(data, message) {
} }
if (message != "noOverlay") { if (message != "noOverlay") {
var message2 = message;
if (i18n.t) { if (i18n.t) {
message = i18n.t(message) || message; message2 = i18n.t(message2);
} }
$('div[data-role="content"]').wrap('<div class="overlay" />'); $('div[data-role="content"]').wrap('<div class="overlay" />');
$.mobile.loading('show', { $.mobile.loading('show', {
text: message, text: message2,
textVisible: true textVisible: true
}); });
} }
@@ -1306,7 +1307,8 @@ function initTranslation() {
'discoverConnectHeader': 'Connect to server', 'discoverConnectHeader': 'Connect to server',
'discoverConnectServerAddress': 'Serveraddress:', 'discoverConnectServerAddress': 'Serveraddress:',
'discoverConnectButton': 'Connect', 'discoverConnectButton': 'Connect',
'Checking...': 'Checking...' 'Checking...': 'Checking...',
'timeout': 'Timeout'
} }
}, },
"de": { "de": {
@@ -1386,14 +1388,17 @@ function initTranslation() {
'discoverConnectHeader': 'Verbinde zum Server', 'discoverConnectHeader': 'Verbinde zum Server',
'discoverConnectServerAddress': 'Serveradresse:', 'discoverConnectServerAddress': 'Serveradresse:',
'discoverConnectButton': 'Verbinden', 'discoverConnectButton': 'Verbinden',
'Checking...': 'Prüfen...' 'Checking...': 'Prüfen...',
'timeout': 'Zeitüberschreitung'
} }
} }
}; };
$.i18n.init({ $.i18n.init({
resStore: translations, resStore: translations,
lng: "de", lng: "de",
fallbackLng: 'en' fallbackLng: 'en',
keyseparator: '::',
nsseparator: ':::'
}).done(function () { }).done(function () {
$('body').i18n(); $('body').i18n();
}); });