Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Reordonner les choix du language-switcher pour être iso avec la page d'accueil de Pix.org (PIX-6833). #468

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions config/localization/pix-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ export const localization = {
},
],
},
{
name: 'france',
localeCode: 'fr-fr',
icon: 'flag-fr.svg',
subtitle: null,
},
{
name: 'fwb-acronym',
localeCode: 'fr-be',
icon: 'flag-be.svg',
subtitle: 'fwb',
},
{
name: 'france',
localeCode: 'fr-fr',
icon: 'flag-fr.svg',
subtitle: null,
},
],
locales: availableLocales,
localesForCurrentSite: getLocalesForCurrentSite(),
Expand Down
56 changes: 28 additions & 28 deletions tests/components/__snapshots__/LocaleSwitcher.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ exports[`Component: LocaleSwitcher when site is pix-pro should render the locale
</div>
</li>
<li
class="locale-switcher__dropdown-menu--active"
class=""
>
<div
class="locale-switcher__locale"
>
<a
href="http://example.fr/"
href="http://example.org/fr-be"
>
<img
alt=""
class="locale-switcher__img"
src="/images/flag-fr.svg"
src="/images/flag-be.svg"
/>

<div
Expand All @@ -106,24 +106,30 @@ exports[`Component: LocaleSwitcher when site is pix-pro should render the locale

</div>

<!---->
<div
class="locale-switcher__subtitle"
>



</div>
</div>
</a>
</div>
</li>
<li
class=""
class="locale-switcher__dropdown-menu--active"
>
<div
class="locale-switcher__locale"
>
<a
href="http://example.org/fr-be"
href="http://example.fr/"
>
<img
alt=""
class="locale-switcher__img"
src="/images/flag-be.svg"
src="/images/flag-fr.svg"
/>

<div
Expand All @@ -133,13 +139,7 @@ exports[`Component: LocaleSwitcher when site is pix-pro should render the locale

</div>

<div
class="locale-switcher__subtitle"
>



</div>
<!---->
</div>
</a>
</div>
Expand Down Expand Up @@ -237,18 +237,18 @@ exports[`Component: LocaleSwitcher when site is pix-site should render the local
</div>
</li>
<li
class="locale-switcher__dropdown-menu--active"
class=""
>
<div
class="locale-switcher__locale"
>
<a
href="http://example.fr/"
href="http://example.org/fr-be"
>
<img
alt=""
class="locale-switcher__img"
src="/images/flag-fr.svg"
src="/images/flag-be.svg"
/>

<div
Expand All @@ -258,24 +258,30 @@ exports[`Component: LocaleSwitcher when site is pix-site should render the local

</div>

<!---->
<div
class="locale-switcher__subtitle"
>



</div>
</div>
</a>
</div>
</li>
<li
class=""
class="locale-switcher__dropdown-menu--active"
>
<div
class="locale-switcher__locale"
>
<a
href="http://example.org/fr-be"
href="http://example.fr/"
>
<img
alt=""
class="locale-switcher__img"
src="/images/flag-be.svg"
src="/images/flag-fr.svg"
/>

<div
Expand All @@ -285,13 +291,7 @@ exports[`Component: LocaleSwitcher when site is pix-site should render the local

</div>

<div
class="locale-switcher__subtitle"
>



</div>
<!---->
</div>
</a>
</div>
Expand Down
12 changes: 6 additions & 6 deletions tests/config/localization/pix-site.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ describe('#localization', () => {
},
],
},
{
name: 'france',
localeCode: 'fr-fr',
icon: 'flag-fr.svg',
subtitle: null,
},
{
name: 'fwb-acronym',
localeCode: 'fr-be',
icon: 'flag-be.svg',
subtitle: 'fwb',
},
{
name: 'france',
localeCode: 'fr-fr',
icon: 'flag-fr.svg',
subtitle: null,
},
]

// when & then
Expand Down