forked from electricitymaps/electricitymaps-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise bundle size with locales (electricitymaps#2099)
* Add react * Fix bindings * Optimise bundle with locale * Clean up * Remove timeout * Fixes * Fixes * Fix build * Fix links
- Loading branch information
Showing
17 changed files
with
298 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<html> | ||
<script> | ||
document.addEventListener('deviceready', onDeviceReady, false); | ||
// Warning: those locales are duplicated from server.js | ||
var locales = ['ar', 'cs', 'da', 'de', 'en', 'es', 'fr', 'hr', 'it', 'ja', 'nl', 'pl', 'pt-br', 'ru', 'sv', 'sk', 'zh-cn', 'zh-hk', 'zh-tw']; | ||
// Warning: those locales are duplicated from locales-config.json | ||
var locales = ['ar', 'cs', 'da', 'de', 'en', 'es', 'fr', 'hr', 'it', 'ja', 'nl', 'pl', 'pt-br', 'ru', 'sk', 'sv', 'vi', 'zh-cn', 'zh-hk', 'zh-tw']; | ||
function onDeviceReady() { | ||
var Sentry = cordova.require("sentry-cordova.Sentry"); | ||
Sentry.init({ dsn: 'https://[email protected]/1829181' }); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"localeToFacebookLocale": { | ||
"ar": "ar_AR", | ||
"cs": "cs_CZ", | ||
"da": "da_DK", | ||
"de": "de_DE", | ||
"en": "en_US", | ||
"es": "es_ES", | ||
"fr": "fr_FR", | ||
"hr": "hr_HR", | ||
"it": "it_IT", | ||
"ja": "ja_JP", | ||
"kr": "kr_KR", | ||
"nl": "nl_NL", | ||
"pt-br": "pt_BR", | ||
"pl": "pl_PL", | ||
"ru": "ru_RU", | ||
"sk": "sk_SK", | ||
"sv": "sv_SE", | ||
"vn": "vi_VN", | ||
"zh-cn": "zh_CN", | ||
"zh-hk": "zh_HK", | ||
"zh-tw": "zh_TW" | ||
}, | ||
"supportedFacebookLocales": [ | ||
"ar_AR", | ||
"cs_CZ", | ||
"da_DK", | ||
"de_DE", | ||
"es_ES", | ||
"es_LA", | ||
"es_MX", | ||
"en_GB", | ||
"en_PI", | ||
"en_UD", | ||
"en_US", | ||
"fr_CA", | ||
"fr_FR", | ||
"hr_HR", | ||
"it_IT", | ||
"ja_JP", | ||
"kr_KR", | ||
"nl_BE", | ||
"nl_NL", | ||
"pl_PL", | ||
"pt_BR", | ||
"ru_RU", | ||
"sk_SK", | ||
"sv_SE", | ||
"vi_VN", | ||
"zh_CN", | ||
"zh_HK", | ||
"zh_TW" | ||
], | ||
"languageNames": { | ||
"ar": "اللغة العربية الفصحى", | ||
"cs": "Čeština", | ||
"da": "Dansk", | ||
"de": "Deutsch", | ||
"en": "English", | ||
"es": "Español", | ||
"fr": "Français", | ||
"hr": "Hrvatski", | ||
"it": "Italiano", | ||
"ja": "日本語", | ||
"kr": "한국어", | ||
"nl": "Nederlands", | ||
"pl": "Polski", | ||
"pt-br": "Português (Brazilian)", | ||
"ru": "Русский язык", | ||
"sk": "Slovenčina", | ||
"sv": "Svenska", | ||
"vi": "Tiếng Việt", | ||
"zh-cn": "中文 (Mainland China)", | ||
"zh-hk": "中文 (Hong Kong)", | ||
"zh-tw": "中文 (Taiwan)" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.