mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Fix startup for clients using Finnish and Chinese.
This commit is contained in:
parent
afca7ce6da
commit
1c206d0d36
1 changed files with 9 additions and 3 deletions
|
@ -14,8 +14,14 @@ Tracker.autorun(() => {
|
|||
if (language) {
|
||||
TAPi18n.setLanguage(language);
|
||||
|
||||
// XXX
|
||||
const shortLanguage = language.split('-')[0];
|
||||
T9n.setLanguage(shortLanguage);
|
||||
// For languages such as Finnish (Suomi) that are not supported by meteor-accounts-t9n,
|
||||
// the following may throw an exception. On the initial run of this `autorun()` callback,
|
||||
// such an exception could cause the entire app to fail to load. Therefore, we catch
|
||||
// the exception and log it as an error.
|
||||
try {
|
||||
T9n.setLanguage(language);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue