Skip to content

Commit db6ceb8

Browse files
committed
loading-screen: Make translations regionless
This allows matching a much wider set of locales without depending on the browser to build `navigator.languages` as we expect it. Furthermore, we're not actually providing regional translation variation and probably never will. Fixes: #893
1 parent bb79c4c commit db6ceb8

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

packages/loading-screen/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "yarn run compile-messages && vue-cli-service build --no-module && yarn zip",
88
"lint": "vue-cli-service lint",
99
"zip": "../../scripts/bundle_zip.py loading-screen.zip",
10-
"extract-messages": "formatjs extract 'src/**/*.{js,vue}' --format transifex --out-file lang/en-US.json",
10+
"extract-messages": "formatjs extract 'src/**/*.{js,vue}' --format transifex --out-file lang/en.json",
1111
"compile-messages": "formatjs compile-folder --format transifex lang compiled-lang"
1212
},
1313
"dependencies": {

packages/loading-screen/src/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import LoadingRetry from '@/views/LoadingRetry.vue';
1111
import store from "@/store";
1212

1313
// Language codes are RFC 5646 (https://datatracker.ietf.org/doc/html/rfc5646)
14-
const supportedLocales = ['en-US', 'es-419'];
15-
const defaultLocale = 'en-US';
14+
const supportedLocales = ['en', 'es'];
15+
const defaultLocale = 'en';
1616
const requestedLocales = navigator.languages;
1717

1818
function loadLocaleData(locale) {

0 commit comments

Comments
 (0)