diff options
author | Marcel Klehr <mklehr@gmx.net> | 2012-12-19 17:04:36 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2012-12-23 18:16:48 +0100 |
commit | a2b225785133593f8b6bb7e3e52a8267e7300378 (patch) | |
tree | f56659aa9cf58384e9fd983f13510a4c1175af34 /src/static/js/html10n.js | |
parent | e3f9ed37b4b6417f822b83211ca2e1d068898119 (diff) | |
download | etherpad-lite-a2b225785133593f8b6bb7e3e52a8267e7300378.zip |
Fix html10n cache and lang fallback
Diffstat (limited to 'src/static/js/html10n.js')
-rw-r--r-- | src/static/js/html10n.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index 8029b8d6..834e3782 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -92,8 +92,7 @@ window.html10n = (function(window, document, undefined) { var that = this if (this.cache[href]) { - this.parse(this.cache[href]) - cb() + this.parse(lang, this.cache[href], cb) return; } @@ -123,6 +122,7 @@ window.html10n = (function(window, document, undefined) { return } + if (!data[lang]) lang = lang.substr(0,2) if (!data[lang]) { cb(new Error('Couldn\'t find translations for '+lang)) return |