fix: translate backend asset includes in native
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m36s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m36s
This commit is contained in:
@@ -671,12 +671,14 @@ export async function initCompetitionApi(apiUrlRoot_, host) {
|
||||
.use(i18nextHttpBackend)
|
||||
.use(i18nextBrowserLanguagedetector)
|
||||
.init({
|
||||
supportedLngs: ['fr', 'en'],
|
||||
fallbackLng: 'fr',
|
||||
debug: true,
|
||||
debug: host.startsWith('http://localhost'),
|
||||
interpolation: {
|
||||
escapeValue: true,
|
||||
},
|
||||
detection: options,
|
||||
backend: backend,
|
||||
ns: ['result'],
|
||||
defaultNS: 'result',
|
||||
})
|
||||
|
||||
@@ -3,6 +3,8 @@ import Backend from 'i18next-http-backend';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import {initReactI18next} from 'react-i18next';
|
||||
|
||||
const vite_url = import.meta.env.VITE_URL;
|
||||
|
||||
const options = {
|
||||
order: [ 'querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
|
||||
caches: [],
|
||||
@@ -20,8 +22,9 @@ i18n
|
||||
// init i18next
|
||||
// for all options read: https://www.i18next.com/overview/configuration-options
|
||||
.init({
|
||||
supportedLngs: ['fr', 'en'],
|
||||
fallbackLng: 'fr',
|
||||
debug: true,
|
||||
debug: vite_url.startsWith('http://localhost'),
|
||||
interpolation: {
|
||||
escapeValue: false, // not needed for react as it escapes by default
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user