Skip to content

feat(i18n): Add German (de) and Bosnian (bs) UI translations - #3280

Open
Emcooo wants to merge 3 commits into
quran:productionfrom
Emcooo:feat/add-german-bosnian-locales
Open

feat(i18n): Add German (de) and Bosnian (bs) UI translations#3280
Emcooo wants to merge 3 commits into
quran:productionfrom
Emcooo:feat/add-german-bosnian-locales

Conversation

@Emcooo

@Emcooo Emcooo commented Apr 8, 2026

Copy link
Copy Markdown

Summary

This PR adds complete UI translations for German (de) and Bosnian (bs), covering all 37 locale files (~914 strings each).

Why these languages?

  • German: ~5 million Muslims in the DACH region (Germany, Austria, Switzerland). No German UI translation currently exists.
  • Bosnian: Bosniaks are one of the largest Muslim ethnic groups in Europe. Bosnian Islamic terminology has its own distinct tradition (Sura, Ajet, Džuz, Kur'an, Ramazan).

What's included

  • locales/de/ — 37 JSON files, fully translated to German
  • locales/bs/ — 37 JSON files, fully translated to Bosnian
  • i18n.json — registered de and bs locales
  • types/Language.ts — added BS = 'bs' enum value
  • src/utils/locale.ts — added locale names (Bosanski, Deutsch) and LANG_LOCALE_MAP entries (bs-BA, de-DE)

Translation conventions

German Bosnian
Quran Quran (not Koran) Kur'an
Surah Surah (kept as-is) Sura
Ayah Ayah (kept as-is) Ajet
Juz Juz (kept as-is) Džuz
Ramadan Ramadan Ramazan
Sajdah Sajdah (kept as-is) Sedžda
  • All {{template variables}} and HTML-like tags (<0>, </0>, <br/>) preserved exactly
  • Natural, fluent translations — not word-for-word
  • Standard UI terminology for each language

About the translator

I am a native speaker of both German and Bosnian, born in Bosnia and raised in Germany. I am happy to iterate on any strings that need adjustment.

Closes #3279

Test plan

  • Verify JSON files are valid and match the English key structure
  • Switch locale to de and verify German UI renders correctly
  • Switch locale to bs and verify Bosnian UI renders correctly
  • Verify RTL is not affected (both are LTR languages)
  • Spot-check translations for accuracy and natural phrasing

🤲 JazakAllahu Khairan for this amazing project

Add complete UI translations for German and Bosnian languages, covering all 37
locale files (~914 strings each). This makes quran.com accessible to German-speaking
Muslims (~5M in DACH region) and Bosnian-speaking Muslims (Bosniaks, one of the
largest Muslim communities in Europe).

Changes:
- Add locales/de/ with all 37 translated JSON files
- Add locales/bs/ with all 37 translated JSON files
- Register 'de' and 'bs' in i18n.json locales array
- Add BS enum value to types/Language.ts
- Add Bosnian locale name and mapping to src/utils/locale.ts
- Add German locale mapping (de-DE) to LANG_LOCALE_MAP

Translation conventions:
- German: Islamic terms kept as-is (Surah, Ayah, Juz, etc.), "Quran" not "Koran"
- Bosnian: Uses local Islamic terminology (Sura, Ajet, Džuz, Kur'an, Ramazan)
- All template variables ({{...}}) and HTML tags preserved
- Natural, fluent translations — not word-for-word

Closes quran#3279

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

"de",
"bs"

P1 Badge Add default settings modules before enabling de/bs locales

Registering de and bs in i18n.json exposes those locales to routing, but Redux initialization loads locale defaults via require('src/redux/defaultSettings/locales/${locale}'); this commit does not add src/redux/defaultSettings/locales/de.ts or .../bs.ts. As a result, first render on /de or /bs (including refresh after switching language) will hit a module-not-found path and fail to initialize the app state.


if (isClient && !isLoggedIn()) {
store.dispatch(syncLocaleDependentSettings({ prevLocale, nextLocale: locale }));

P2 Badge Reset full defaults on URL-locale changes for guest users

This locale-change effect now always dispatches syncLocaleDependentSettings, which only syncs translations/tafsirs/reflection+lesson languages; it does not update other locale defaults (for example selectedWordByWordLocale in locales like ur/id). For guests still marked isUsingDefaultSettings, navigating locale via browser back/forward can therefore leave state partially in the previous locale, which regresses the old behavior where recreating/resetting store applied a full locale default profile.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@Emcooo
Emcooo changed the base branch from master to production April 8, 2026 03:32
Emcooo and others added 2 commits April 8, 2026 05:35
Add locale-specific default settings modules for German and Bosnian
to prevent module-not-found errors when navigating to /de or /bs routes.

- de.ts: defaults to Frank Bubenheim & Nadeem translation (ID 27)
- bs.ts: defaults to Besim Korkut translation (ID 126)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…le files

Fix missing diacritical marks in Bosnian translations. The initial
translation pass omitted many special characters (š→s, č→c, ć→c, đ→dj, ž→z).

Fixes include:
- š: završen, više, šta, još, prošli, mišljenje, čuvanje, slušajte...
- č: učenje, čitanje, sačuvaj, označiti, počnite, različit, kolačiće...
- ć: će, mogućnost, budućnost, posvećeni, sljedeći, obećanje...
- đ: između, pronađite, ugrađenim, događajima, međunarodni, uređajima...
- ž: želite, može, ažurirano, istražite, različitih, pejzaž...
- Džuz (not Dzuz) for Islamic term

All 35 modified files validated as correct JSON.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

[i18n] Add German (de) and Bosnian (bs) UI translations

1 participant