Persian language with exact structure has been added. - #427
Open
saratehran wants to merge 1 commit into
Open
Conversation
Changes:
1. New translation file [`src/i18n/locales/fa-ir.json`](src/i18n/locales/fa-ir.json) — a complete Persian translation of the exact structure of en-us.json (733 keys, same nesting and placeholders), with sorted keys.
2. Source registration in [`src/i18n/index.ts`](src/i18n/index.ts:9) — import faIR and add 'fa-IR' to resources.
3. Language type in [`src/types/index.ts`](src/types/index.ts:7) — add 'fa-IR' to LanguageVarious.
4. Language selection option in [`src/config/languages.ts`](src/config/languages.ts:3) — { value: 'fa-IR', label: 'Persian', flag: '🇮🇷' }.
5. Persian experience improvement: detect 'fa' in [`src/config/assistants.ts`](src/config/assistants.ts:18) for the name and commands of default assistants, and map 'fa-IR' in [`src/hooks/useSpeechRecognition.ts`](src/hooks/useSpeechRecognition.ts:24).
Approvals:
- npx tsx scripts/check-i18n.ts → i18n check has passed
- npx tsc --noEmit → no type errors in the modified files
Note: Right-to-left (RTL) layout of the interface is handled separately in the UI layer and is beyond the scope of language registration in i18n; it will be implemented if needed.
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.
Changes:
src/i18n/locales/fa-ir.json— a complete Persian translation of the exact structure of en-us.json (733 keys, same nesting and placeholders), with sorted keys.src/i18n/index.ts— import faIR and add 'fa-IR' to resources.src/types/index.ts— add 'fa-IR' to LanguageVarious.src/config/languages.ts— { value: 'fa-IR', label: 'Persian', flag: '🇮🇷' }.src/config/assistants.tsfor the name and commands of default assistants, and map 'fa-IR' insrc/hooks/useSpeechRecognition.ts.Approvals:
Note: Right-to-left (RTL) layout of the interface is handled separately in the UI layer and is beyond the scope of language registration in i18n; it will be implemented if needed.