Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

reverse localisation bugfix

  • Loading branch information...
commit c59b56c6381bd8d01e59db9948049003f68d5e7c 1 parent d1f3ea3
Ilmari Heikkinen authored

Showing 2 changed files with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 1 index.html
  2. +3 1 js-i18n.js
4 index.html
@@ -303,7 +303,9 @@
303 303 var id = LocaleMappings['en-US'][token.id];
304 304 if (id !== undefined) {
305 305 if (locale) {
306   - string = token.value.replace(/\S+/, iloc[token.id]);
  306 + if (iloc[token.id]) {
  307 + string = token.value.replace(/\S+/, iloc[token.id]);
  308 + }
307 309 } else {
308 310 string = token.value.replace(/\S+/, id);
309 311 }
4 js-i18n.js
@@ -232,7 +232,9 @@
232 232 var id = LocaleMappings['en-US'][token.id];
233 233 if (id !== undefined) {
234 234 if (locale) {
235   - string = token.value.replace(/\S+/, iloc[token.id]);
  235 + if (iloc[token.id]) {
  236 + string = token.value.replace(/\S+/, iloc[token.id]);
  237 + }
236 238 } else {
237 239 string = token.value.replace(/\S+/, id);
238 240 }

0 comments on commit c59b56c

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