mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Importing the langs is now done in the lingui config
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
"compilerBabelOptions": {},
|
"compilerBabelOptions": {},
|
||||||
"fallbackLocales": { default: "en"},
|
"fallbackLocales": { default: "en"},
|
||||||
"format": "po",
|
"format": "po",
|
||||||
"locales": ["en","es","fr","nl","zh","ja", "zu"],
|
"locales": ["en","es","fr","nl","zh","ja","zu"],
|
||||||
"orderBy": "messageId",
|
"orderBy": "messageId",
|
||||||
"pseudoLocale": "zu",
|
"pseudoLocale": "zu",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
|
|||||||
@@ -17,12 +17,6 @@ import Background from './components/Background';
|
|||||||
import NotFound from './screens/NotFound';
|
import NotFound from './screens/NotFound';
|
||||||
import Login from './screens/Login';
|
import Login from './screens/Login';
|
||||||
|
|
||||||
import en from './locales/en/messages';
|
|
||||||
import es from './locales/es/messages';
|
|
||||||
import fr from './locales/fr/messages';
|
|
||||||
import ja from './locales/ja/messages';
|
|
||||||
import nl from './locales/nl/messages';
|
|
||||||
import zh from './locales/zh/messages';
|
|
||||||
import { isAuthenticated } from './util/auth';
|
import { isAuthenticated } from './util/auth';
|
||||||
import { getLanguageWithoutRegionCode } from './util/language';
|
import { getLanguageWithoutRegionCode } from './util/language';
|
||||||
import { dynamicActivate, locales } from './i18nLoader';
|
import { dynamicActivate, locales } from './i18nLoader';
|
||||||
@@ -84,7 +78,6 @@ const ProtectedRoute = ({ children, ...rest }) =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const catalogs = { en, es, fr, ja, nl, zh };
|
|
||||||
let language = getLanguageWithoutRegionCode(navigator);
|
let language = getLanguageWithoutRegionCode(navigator);
|
||||||
if (!Object.keys(locales).includes(language)) {
|
if (!Object.keys(locales).includes(language)) {
|
||||||
// If there isn't a string catalog available for the browser's
|
// If there isn't a string catalog available for the browser's
|
||||||
|
|||||||
Reference in New Issue
Block a user