chore: extract strings#245
Merged
camrun91 merged 3 commits intoMay 27, 2026
Merged
Conversation
|
bmanquen
requested changes
May 26, 2026
Collaborator
bmanquen
left a comment
There was a problem hiding this comment.
Just need to ensure that 'YouVersion' does not get translated. Besides that it looks good!
Collaborator
Author
|
@bmanquen updated so that it now uses a var to make sure its not translated. |
bmanquen
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR puts in place the localization strings in the react repo
Greptile Summary
This PR extracts all hardcoded English strings from UI components into
react-i18nexttranslations, adding 55+ keys toen.jsonand wiring every component through the sharedi18nsingleton viauseTranslation(undefined, { i18n }).t()calls; static-string utility files likebible-text-error.tsnow accept aTFunctionparameter instead of owning the constants.BibleAppLogoLockupandVotdare refactored from arrow-function exports to named function exports so they can call theuseTranslationhook, and theYouVersionAuthButtonnow uses theTranscomponent for JSX-interpolated strings like "Sign in with YouVersion".Confidence Score: 5/5
Safe to merge — the change is a straightforward string extraction with no behavioral changes; all hook usage and dependency arrays look correct.
Every component correctly subscribes via useTranslation rather than the module-level singleton, the Trans component is wired to the same i18n instance, and the useMemo in YouVersionAuthButton properly includes t in its dependency array. The only findings are advisory — font names that probably shouldn't be marked as translatable and a pluralization contract for allLanguagesTab that will need attention when non-English locales are added.
packages/ui/src/i18n/locales/en.json — two keys (font names and allLanguagesTab) have translation semantics worth clarifying before other locales are introduced.
Important Files Changed
Sequence Diagram
sequenceDiagram participant App as Host App participant i18n as i18n singleton participant Component as UI Component participant t as TFunction App->>i18n: "module load → i18n.init({ resources: en.json, defaultVariables: { brandName } })" Component->>i18n: "useTranslation(undefined, { i18n })" i18n-->>Component: "{ t }" Component->>t: t('signInWithYouVersion') → Sign in with YouVersion Component->>t: "t('allLanguagesTab', { count: n }) → All (n)" Note over Component,t: Trans component renders JSX with bold interpolation via i18n prop Component->>t: t('invalidAppKeyError') via getBibleTextErrorMessage(error, t) t-->>Component: localized error stringPrompt To Fix All With AI
Reviews (3): Last reviewed commit: "fix: brand name" | Re-trigger Greptile