Compare commits
No commits in common. "cad6d14ba8f9ce8ef6b39374fa50b9e7aff263dd" and "4bf07cc8f87ffb128c2ac716f7847adab0430e47" have entirely different histories.
cad6d14ba8
...
4bf07cc8f8
@ -21,15 +21,11 @@ public class UserInfoProvider implements ContainerRequestFilter {
|
||||
|
||||
@Override
|
||||
public void filter(ContainerRequestContext requestContext) {
|
||||
System.out.println(requestContext.getHeaders());
|
||||
|
||||
List<Locale> acceptableLanguages = requestContext.getAcceptableLanguages();
|
||||
System.out.println(acceptableLanguages);
|
||||
Locale selectedLocale = findFirstSupportedLanguage(acceptableLanguages);
|
||||
|
||||
if (selectedLocale == null)
|
||||
selectedLocale = TradService.fallbackLocale;
|
||||
System.out.println(selectedLocale);
|
||||
requestContext.setProperty("userLocale", selectedLocale);
|
||||
}
|
||||
|
||||
|
||||
@ -655,7 +655,7 @@ function combsPage() {
|
||||
rootDiv.append(content)
|
||||
}
|
||||
|
||||
export async function initCompetitionApi(apiUrlRoot_, host) {
|
||||
export async function initCompetitionApi(apiUrlRoot_) {
|
||||
apiUrlRoot = apiUrlRoot_;
|
||||
|
||||
const options = {
|
||||
@ -663,10 +663,6 @@ export async function initCompetitionApi(apiUrlRoot_, host) {
|
||||
caches: [],
|
||||
}
|
||||
|
||||
const backend = {
|
||||
loadPath: `${host}/locales/{{lng}}/{{ns}}.json`,
|
||||
}
|
||||
|
||||
await i18next
|
||||
.use(i18nextHttpBackend)
|
||||
.use(i18nextBrowserLanguagedetector)
|
||||
|
||||
@ -225,7 +225,7 @@ function Menu({menuActions, compUuid}) {
|
||||
<div id='safca_api_data'></div>
|
||||
<script type="module">
|
||||
import {initCompetitionApi} from '${vite_url}/competition.js';
|
||||
initCompetitionApi("${vite_url}/api/public/result/${compUuid}", "${vite_url}")
|
||||
initCompetitionApi("${vite_url}/api/public/result/${compUuid}")
|
||||
</script>`
|
||||
).then(() => {
|
||||
toast.success(t('texteCopiéDansLePresse'));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user