Skip to content

Persian language with exact structure has been added. - #427

Open
saratehran wants to merge 1 commit into
CherryHQ:mainfrom
saratehran:add/languages-farsi
Open

Persian language with exact structure has been added.#427
saratehran wants to merge 1 commit into
CherryHQ:mainfrom
saratehran:add/languages-farsi

Conversation

@saratehran

Copy link
Copy Markdown

Changes:

  1. New translation file 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 — import faIR and add 'fa-IR' to resources.
  3. Language type in src/types/index.ts — add 'fa-IR' to LanguageVarious.
  4. Language selection option in src/config/languages.ts — { value: 'fa-IR', label: 'Persian', flag: '🇮🇷' }.
  5. Persian experience improvement: detect 'fa' in src/config/assistants.ts for the name and commands of default assistants, and map 'fa-IR' in src/hooks/useSpeechRecognition.ts.

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.

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.
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