Skip to content

[FEATURE]: i18n usage in frontend #170

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maelaubert56
Copy link
Member

This pull request introduces localization support for the Vitality application, adding translations in both English and French, and updating tests to use localization keys instead of hardcoded strings. Below are the most important changes grouped by theme:

Localization Support

  • Added English translations for various pages in v6y-apps/front/public/locales/en/common.json.
  • Added French translations for the same pages in v6y-apps/front/public/locales/fr/common.json.

Test Updates for Localization

  • Updated tests to verify the presence of localization keys (e.g., vitality.appDetailsPage.evolutions.title) instead of hardcoded strings.

Mock Updates for Testing

  • Added useTranslationProvider mock to setupTests.tsx to simulate translation behavior in tests.

@maelaubert56 maelaubert56 added this to the Vitality 1.1 milestone Apr 23, 2025
@maelaubert56 maelaubert56 requested a review from padupuy April 23, 2025 09:20
@maelaubert56 maelaubert56 self-assigned this Apr 23, 2025
@maelaubert56 maelaubert56 linked an issue Apr 23, 2025 that may be closed by this pull request
@maelaubert56 maelaubert56 changed the title Feature/issue 49/i18n usage in frontend [FEATURE]: i18n usage in frontend Apr 23, 2025
@@ -0,0 +1,36 @@
'use client';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maelaubert56 why do we need the use client directive ? Is it because of the LanguageDetector middleware ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: i18n usage in Frontend
2 participants