feat/add-kinyarwanda-translation#367
Conversation
- Add rw.json with full Kinyarwanda translation - Register Kinyarwanda in meta.json and LanguageSwitcher dropdown - Fix missing 'Simulations'/'About' nav keys (were falling back to raw key) - Wire GitHubHeaderBadge into the translation system (was fully unwired) - Add corresponding empty English keys for the above fixes
|
@Randall-Muana-Sheriff is attempting to deploy a commit to the PhysicsHub's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds a completed Kinyarwanda (rw) UI translation to PhysicsHub’s i18n system and wires a few remaining UI strings into the translation workflow so they no longer render as hardcoded English.
Changes:
- Added a full
rw.jsontranslation file and markedrwas completed inlocales/meta.json. - Updated the language switcher to include
rwand to set the document<html lang="...">to the selected language code. - Moved
GitHubHeaderBadge’s rotating label strings into thet()translation system; added missing translation keys (including nav items).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/(core)/locales/rw.json | Adds a complete Kinyarwanda translation map for existing UI keys, plus new keys used by nav/badge. |
| app/(core)/locales/meta.json | Registers rw as a completed (hand-translated) locale. |
| app/(core)/locales/en.json | Adds empty-string entries for newly referenced keys so t() can resolve consistently (falls back to key text). |
| app/(core)/components/LanguageSwitcher.jsx | Adds rw to the selectable languages and updates the <html lang> behavior. |
| app/(core)/components/GitHubHeaderBadge.jsx | Uses t() for the badge’s rotating “Open source / stars / contributors” style strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const LANGUAGES = { | ||
| en: "English", | ||
| ru: "Русский", | ||
| rw: "Kinyarwanda", | ||
| }; |
There was a problem hiding this comment.
Can you please make this change as copilot says?
|
Hey @Randall-Muana-Sheriff really appreciate your PR, can you please make the changes suggested by copilot? |
Addresses Copilot review feedback - LANGUAGES was hardcoded and required manual updates for every new locale, even though meta.json already contains the canonical language code -> name mapping.
|
Done! Refactored LanguageSwitcher to derive the language list from meta.json instead of hardcoding it, as Copilot suggested. Tested all 7 languages locally to confirm the dropdown and translations still work correctly. |
|
Thank you! Really appreciate it |
|
Hey @mattqdev! Had fun working on the Kinyarwanda translation today, appreciate the quick review Looking to jump into something else if you've got anything in mind, doesn't need to be a formal issue, just let me know what'd actually be useful right now! |
|
Really appreciate your help! If you want to work to something else, right now the most useful issue you can resolve is this: #350 |
|
🎉 This PR is included in version 3.30.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Adds a full Kinyarwanda (
rw) translation to the site, as described in #249.Changes
app/(core)/locales/rw.jsonwith a complete hand-translation of all existing translation keyslocales/meta.json(completed: true)LanguageSwitchercomponent's language list (it wasn't reading frommeta.json, so this was required for the language to actually appear in the dropdown)en.jsonand translated values torw.jsonGitHubHeaderBadge.jsxinto the translation system — it previously rendered "Open source", "Built in public", "Star the repo", "stars", and "contributors" as raw hardcoded English strings with not()call at all, for any languageTesting
Tested locally across Home, Simulations, Blog, About, and Contribute pages with the language switcher set to Kinyarwanda. All UI strings render correctly; blog post content itself remains in its original language as expected (out of scope — that's content, not UI).
Notes for reviewer
I'm not a native Kinyarwanda speaker beyond conversational fluency from Rwanda — happy to have a native speaker double-check nuance on a few technical UI terms (e.g. "modal", "clipboard") if that would help before merging.