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

Add i18n (internationalisation) frontend translations via paraglide js #2155

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

spwoodcock
Copy link
Member

@spwoodcock spwoodcock commented Feb 5, 2025

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Work towards #1169

Describe this PR

  • Added paraglide libraries + Vite config.
  • Added some basic translations to test with English and Brazillian Portuguese.
  • Added a locale switcher in the sidebar.
  • Reactive locale switching is now possible throughout the app!
  • We just need translations and to add the placeholders.

@DanielJDufour I spend the time researching & implemented something πŸ‘
Let me know if you have any thoughts on my analysis here

Screenshots

image

image

Alternative Approaches Considered

Many options described in https://docs.fmtm.dev/decisions/0005-translations/

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@spwoodcock spwoodcock requested a review from NSUWAL123 February 5, 2025 23:07
@github-actions github-actions bot added enhancement New feature or request frontend Related to frontend code labels Feb 5, 2025
@spwoodcock spwoodcock changed the title Feat/i18n Add i18n (internationalisation) frontend translations via parachute js Feb 5, 2025
@spwoodcock spwoodcock self-assigned this Feb 5, 2025
@spwoodcock spwoodcock marked this pull request as ready for review February 6, 2025 00:13
@DanielJDufour
Copy link
Collaborator

I gave it a quick review. Haven't tested it locally yet. Overall, looks awesome.

@NSUWAL123
Copy link
Contributor

Works fine but there are some import errors by typescript.
image

@spwoodcock
Copy link
Member Author

Works fine but there are some import errors by typescript.
image

Hmm that should be generated on the first pnpm run dev or build

@spwoodcock spwoodcock changed the title Add i18n (internationalisation) frontend translations via parachute js Add i18n (internationalisation) frontend translations via paraglide js Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Related to frontend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants