Skip to content

docs(i18n): drop the nonexistent plugin-translation section and bring locale lists current in TRANSLATION_GUIDE - #485

Open
Mohammed Alkindi (MohammedAlkindi) wants to merge 1 commit into
microsoft:devfrom
MohammedAlkindi:docs/i18n-translation-guide-drift
Open

Mohammed Alkindi (MohammedAlkindi) wants to merge 1 commit into
microsoft:devfrom
MohammedAlkindi:docs/i18n-translation-guide-drift

Conversation

@MohammedAlkindi

Copy link
Copy Markdown

src/i18n/TRANSLATION_GUIDE.md has drifted from the code. Its section 6 tells contributors to add translations under src/plugins/ and register them with registerPluginTranslations(), but src/plugins does not exist and no file in src defines that function. The locale examples also show export { en, zh, ja } and seven domain files, while src/i18n/locales/index.ts exports eight languages and en/index.ts imports ten files.

This removes the plugin section, renumbers the sections after it, adds dataLoading, loader and errors to the file lists, shows all eight languages in Step 4, and points the language-switcher step at LANGUAGE_LABELS in src/app/App.tsx.

before: grep -E 'src/plugins|registerPluginTranslations' TRANSLATION_GUIDE.md  -> 8 lines
after:  -> 0 lines

Separately, common.json and dataLoading.json both define a top-level dataLoading key, which breaks the guide's no-overlap rule. I left that for a follow-up.

… locale lists current in TRANSLATION_GUIDE

src/plugins, DataSourcePluginModule and registerPluginTranslations do not exist in src/, so section 6 described code that is not there. Update the locale registry and resources examples to all eight languages, the domain file list to the ten files that en/index.ts imports, and point the language-switcher step at LANGUAGE_LABELS in src/app/App.tsx.

This branch has not been deployed

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

1 participant