From f64acb68c72869a7461757668d5c4c0ceb30ee96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sat, 6 Jul 2024 02:33:49 +0200 Subject: [PATCH] fix: stop using flag image, use emoji instead --- components/Header/Locales/LocaleFlag.tsx | 19 ++++--------------- i18n/translations/en-US/common.json | 4 ++-- i18n/translations/fr-FR/common.json | 4 ++-- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/components/Header/Locales/LocaleFlag.tsx b/components/Header/Locales/LocaleFlag.tsx index 117acb3..9a7f519 100644 --- a/components/Header/Locales/LocaleFlag.tsx +++ b/components/Header/Locales/LocaleFlag.tsx @@ -1,7 +1,5 @@ -import Image from "next/image" - -import type { CookiesStore } from "@/utils/constants" import { useI18n } from "@/i18n/i18n.client" +import type { CookiesStore } from "@/utils/constants" export interface LocaleFlagProps { locale: string @@ -14,17 +12,8 @@ export const LocaleFlag = (props: LocaleFlagProps): JSX.Element => { const i18n = useI18n(cookiesStore) return ( - <> - {locale} -

- {i18n.translate(`common.${locale}`)} -

- +

+ {i18n.translate(`common.${locale}`)} +

) } diff --git a/i18n/translations/en-US/common.json b/i18n/translations/en-US/common.json index 73b24b5..19b968d 100644 --- a/i18n/translations/en-US/common.json +++ b/i18n/translations/en-US/common.json @@ -1,6 +1,6 @@ { - "en-US": "English", - "fr-FR": "French", + "en-US": "🇺🇸 English", + "fr-FR": "🇫🇷 French", "all-rights-reserved": "All rights reserved", "home": "Home" } diff --git a/i18n/translations/fr-FR/common.json b/i18n/translations/fr-FR/common.json index 7d6de06..7f602a2 100644 --- a/i18n/translations/fr-FR/common.json +++ b/i18n/translations/fr-FR/common.json @@ -1,6 +1,6 @@ { - "en-US": "Anglais", - "fr-FR": "Français", + "en-US": "🇺🇸 Anglais", + "fr-FR": "🇫🇷 Français", "all-rights-reserved": "Tous droits réservés", "home": "Accueil" }