gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] branch master updated: some fixes for


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated: some fixes for firefox
Date: Mon, 24 Apr 2017 16:45:46 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-webex.

The following commit(s) were added to refs/heads/master by this push:
     new b60f5cf  some fixes for firefox
b60f5cf is described below

commit b60f5cf77b8a9a25aed8976aa132a7db0a3c2e86
Author: Florian Dold <address@hidden>
AuthorDate: Mon Apr 24 16:45:40 2017 +0200

    some fixes for firefox
---
 src/i18n.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/i18n.tsx b/src/i18n.tsx
index dcc6789..ff32e62 100644
--- a/src/i18n.tsx
+++ b/src/i18n.tsx
@@ -32,11 +32,18 @@ const i18nResult = [] as any;
 let lang: string;
 try {
   lang = chrome.i18n.getUILanguage();
+  // Chrome gives e.g. "en-US", but Firefox gives us "en_US"
+  lang = lang.replace("_", "-");
 } catch (e) {
   lang = "en";
   console.warn("i18n default language not available");
 }
 
+if (!strings[lang]) {
+  lang = "en-US";
+  console.log(`language ${lang} not found, defaulting to english`);
+}
+
 let jed = new jedLib.Jed(strings[lang]);
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]