Document how i18n messages are extracted - #220
Open
greatest0fallt1me wants to merge 1 commit into
Open
Conversation
There's no automated extraction tool (no CLI scanning for t(...) calls) -- messages are added by hand to lib/i18n/messages.ts. Writes down the process that replaces a tool: never hardcode user-facing copy, key naming convention, the es partial-translation convention, the three-step fallback chain (own locale -> DEFAULT_LOCALE -> raw key) and its dev-only warnings, DEFAULT_LOCALE's env override, and a checklist for adding a new string. Cross-linked from the README.
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.
Summary
No i18n workflow was written down. There's no automated extraction tool -- messages are added by hand to `lib/i18n/messages.ts` -- so without docs, a contributor has to reverse-engineer the convention from `t.ts`/`messages.ts` and their tests every time.
Change
Adds `docs/i18n-message-extraction.md` (audience: contributors adding/changing user-facing copy):
Cross-linked from the README.
Closes #106