Skip to content
Browse files

reverse localisation bugfix

  • Loading branch information...
1 parent d1f3ea3 commit c59b56c6381bd8d01e59db9948049003f68d5e7c @kig committed Aug 2, 2012
Showing with 6 additions and 2 deletions.
  1. +3 −1 index.html
  2. +3 −1 js-i18n.js
View
4 index.html
@@ -303,7 +303,9 @@
var id = LocaleMappings['en-US'][token.id];
if (id !== undefined) {
if (locale) {
- string = token.value.replace(/\S+/, iloc[token.id]);
+ if (iloc[token.id]) {
+ string = token.value.replace(/\S+/, iloc[token.id]);
+ }
} else {
string = token.value.replace(/\S+/, id);
}
View
4 js-i18n.js
@@ -232,7 +232,9 @@
var id = LocaleMappings['en-US'][token.id];
if (id !== undefined) {
if (locale) {
- string = token.value.replace(/\S+/, iloc[token.id]);
+ if (iloc[token.id]) {
+ string = token.value.replace(/\S+/, iloc[token.id]);
+ }
} else {
string = token.value.replace(/\S+/, id);
}

0 comments on commit c59b56c

Please sign in to comment.
Something went wrong with that request. Please try again.