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:
parent
c456fdae8b
commit
0150c4fac2
@ -21,15 +21,11 @@ public class UserInfoProvider implements ContainerRequestFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void filter(ContainerRequestContext requestContext) {
|
public void filter(ContainerRequestContext requestContext) {
|
||||||
System.out.println(requestContext.getHeaders());
|
|
||||||
|
|
||||||
List<Locale> acceptableLanguages = requestContext.getAcceptableLanguages();
|
List<Locale> acceptableLanguages = requestContext.getAcceptableLanguages();
|
||||||
System.out.println(acceptableLanguages);
|
|
||||||
Locale selectedLocale = findFirstSupportedLanguage(acceptableLanguages);
|
Locale selectedLocale = findFirstSupportedLanguage(acceptableLanguages);
|
||||||
|
|
||||||
if (selectedLocale == null)
|
if (selectedLocale == null)
|
||||||
selectedLocale = TradService.fallbackLocale;
|
selectedLocale = TradService.fallbackLocale;
|
||||||
System.out.println(selectedLocale);
|
|
||||||
requestContext.setProperty("userLocale", selectedLocale);
|
requestContext.setProperty("userLocale", selectedLocale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ quarkus.http.auth.permission.public.policy=permit
|
|||||||
quarkus.keycloak.admin-client.server-url=https://auth.safca.fr
|
quarkus.keycloak.admin-client.server-url=https://auth.safca.fr
|
||||||
|
|
||||||
|
|
||||||
quarkus.native.resources.includes=asset/**
|
quarkus.native.resources.includes=asset/**,lang/**
|
||||||
|
|
||||||
# HelloAsso Connector
|
# HelloAsso Connector
|
||||||
helloasso.api=https://api.helloasso.com
|
helloasso.api=https://api.helloasso.com
|
||||||
|
|||||||
@ -671,12 +671,14 @@ export async function initCompetitionApi(apiUrlRoot_, host) {
|
|||||||
.use(i18nextHttpBackend)
|
.use(i18nextHttpBackend)
|
||||||
.use(i18nextBrowserLanguagedetector)
|
.use(i18nextBrowserLanguagedetector)
|
||||||
.init({
|
.init({
|
||||||
|
supportedLngs: ['fr', 'en'],
|
||||||
fallbackLng: 'fr',
|
fallbackLng: 'fr',
|
||||||
debug: true,
|
debug: host.startsWith('http://localhost'),
|
||||||
interpolation: {
|
interpolation: {
|
||||||
escapeValue: true,
|
escapeValue: true,
|
||||||
},
|
},
|
||||||
detection: options,
|
detection: options,
|
||||||
|
backend: backend,
|
||||||
ns: ['result'],
|
ns: ['result'],
|
||||||
defaultNS: 'result',
|
defaultNS: 'result',
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,8 @@ import Backend from 'i18next-http-backend';
|
|||||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||||
import {initReactI18next} from 'react-i18next';
|
import {initReactI18next} from 'react-i18next';
|
||||||
|
|
||||||
|
const vite_url = import.meta.env.VITE_URL;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
order: [ 'querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
|
order: [ 'querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
|
||||||
caches: [],
|
caches: [],
|
||||||
@ -20,8 +22,9 @@ i18n
|
|||||||
// init i18next
|
// init i18next
|
||||||
// for all options read: https://www.i18next.com/overview/configuration-options
|
// for all options read: https://www.i18next.com/overview/configuration-options
|
||||||
.init({
|
.init({
|
||||||
|
supportedLngs: ['fr', 'en'],
|
||||||
fallbackLng: 'fr',
|
fallbackLng: 'fr',
|
||||||
debug: true,
|
debug: vite_url.startsWith('http://localhost'),
|
||||||
interpolation: {
|
interpolation: {
|
||||||
escapeValue: false, // not needed for react as it escapes by default
|
escapeValue: false, // not needed for react as it escapes by default
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user