Skip to content

Commit

Permalink
[BUGFIX] Supprimer l'initialisation en lang fr par défaut de l'applic…
Browse files Browse the repository at this point in the history
…ation (PIX-14387) (#10143)
  • Loading branch information
er-lim authored Sep 24, 2024
1 parent 705c75a commit ead5ab8
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 29 deletions.
2 changes: 1 addition & 1 deletion admin/app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html>
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
Expand Down
2 changes: 1 addition & 1 deletion certif/app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down
2 changes: 1 addition & 1 deletion mon-pix/app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down
11 changes: 0 additions & 11 deletions mon-pix/app/routes/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ export default class ApplicationRoute extends Route {
async beforeModel(transition) {
this.metrics.initialize();
await this.session.setup();
/*
Ce code permet de définir une locale par défaut différente de celle d'ember-intl.
Ember-intl utilise "en-us" comme locale par défaut.
Si aucun fichier de traduction n'existe dans le dossier spécifié dans la configuration d'ember-intl,
on obtient une URL de ce type : "/?lang=Missing%20translation%20%22current-lang%22%20for%20locale%20%22en-us%22".
Pour régler ce problème, il faut définir une locale ayant un fichier dans le dossier de traduction.
*/
this.intl.setLocale('fr');

await this.featureToggles.load().catch();

Expand Down
14 changes: 0 additions & 14 deletions mon-pix/tests/unit/routes/application-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ module('Unit | Route | application', function (hooks) {
assert.ok(true);
});

test('should set "fr" locale as default', async function (assert) {
// given
const route = this.owner.lookup('route:application');
route.set('featureToggles', featureTogglesServiceStub);
route.set('session', sessionServiceStub);
route.set('oidcIdentityProviders', oidcIdentityProvidersStub);

// when
await route.beforeModel();

// then
assert.strictEqual(this.intl.primaryLocale, 'fr');
});

test('should get feature toogles', async function (assert) {
// given
const route = this.owner.lookup('route:application');
Expand Down
2 changes: 1 addition & 1 deletion orga/app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down

0 comments on commit ead5ab8

Please sign in to comment.