Skip to content

Commit

Permalink
feat: reoder language-switcher choice
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin authored and yannbertrand committed Jan 16, 2023
1 parent 1c6fc20 commit a109284
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
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

0 comments on commit a109284

Please sign in to comment.