Skip to content

docs: document how to add a new language#16

Merged
spathon merged 4 commits intospathon:mainfrom
wfrsilva:docs/add-language-guide
Mar 5, 2026
Merged

docs: document how to add a new language#16
spathon merged 4 commits intospathon:mainfrom
wfrsilva:docs/add-language-guide

Conversation

@wfrsilva
Copy link
Contributor

@wfrsilva wfrsilva commented Mar 3, 2026

Adds a short guide explaining how to add a new locale, using the pt implementation as reference.

wfrsilva added 2 commits March 2, 2026 21:48
Adds a short guide explaining how to add a new locale,
including required changes in context.tsx and types.ts.
References the commit that introduced the pt locale as an example.

 On branch docs/add-language-guide
 Changes to be committed:
	modified:   README.md
@spathon
Copy link
Owner

spathon commented Mar 4, 2026

That's a good idea!
I simplified so there is no need to update context.tsx it will import dynamically instead.
Now it's just the language file and types.ts that need to be updated

export const SUPPORTED_LOCALES = ['en', 'es', 'fr', 'de', 'sv', 'pt'] as const

export const LOCALES = {
  ...
  pt: 'Português',
}

Maybe use the changes url (https://github.com/spathon/Visual-JOIN/pull/15/changes) instead of commit as Locale was changed to SUPPORTED_LOCALES

spathon and others added 2 commits March 4, 2026 14:48
Adjust the README guide for adding new languages after the i18n
simplification.

Removes the step requiring changes in context.tsx and updates the
reference link to the PR that introduced the Portuguese locale.

 On branch docs/add-language-guide
 Your branch is up to date with 'origin/docs/add-language-guide'.

 Changes to be committed:
	modified:   README.md
@wfrsilva
Copy link
Contributor Author

wfrsilva commented Mar 4, 2026

Thanks! Nice improvement.

I will update the README to reflect the simplified flow (no need to modify context.tsx anymore) and replace the commit link with the PR changes link as suggested.

Copy link
Owner

@spathon spathon left a comment

Choose a reason for hiding this comment

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

Great :)

@spathon spathon merged commit 9b9e11c into spathon:main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants