Skip to content

chore: added docs for customizing translations for theme + custom repos#1351

Open
eemaanamir wants to merge 3 commits into
overhangio:releasefrom
edly-io:eemaan/custom-translations
Open

chore: added docs for customizing translations for theme + custom repos#1351
eemaanamir wants to merge 3 commits into
overhangio:releasefrom
edly-io:eemaan/custom-translations

Conversation

@eemaanamir
Copy link
Copy Markdown
Contributor

Issue: overhangio/tutor-indigo#170

Adds documentation explaining how to override theme-level translations (e.g., Indigo) in Tutor, which is not covered in the existing translations section.

This includes:

  • How to add and compile django.po files in a theme
  • How to patch the Open edX Docker image to include custom locale paths
  • How to register LOCALE_PATHS in LMS and CMS
  • Rebuild and restart steps

Additionally, the documentation references the Wikimedia openedx-translations fork as a real-world example of handling translations across custom repositories (platform, MFEs, plugins, and themes).

No changes were made to the existing content — only supplemental documentation was added.

@github-project-automation github-project-automation Bot moved this to Pending Triage in Tutor project management Mar 3, 2026
@Abdul-Muqadim-Arbisoft Abdul-Muqadim-Arbisoft moved this from Pending Triage to In review in Tutor project management Mar 10, 2026
@ahmed-arb ahmed-arb moved this from In review to Blocked in Tutor project management Mar 24, 2026
@ahmed-arb ahmed-arb moved this from Blocked to In review in Tutor project management Apr 9, 2026
Copy link
Copy Markdown
Contributor

@Faraz32123 Faraz32123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add the changelog entry.

Comment thread docs/configuration.rst
Comment on lines +501 to +524
**Step 1 — Pull upstream translations**

Use Atlas to fetch the latest upstream translations into ``translations-upstream/``::

atlas pull translations --output-dir translations-upstream

This folder is read-only and acts as your baseline.

**Step 2 — Collect strings from your custom repositories**

For each forked or new repository, extract translation source strings into ``translations-custom/``. The exact command depends on the repository type:

- *Python / Django repositories*: ``django-admin makemessages`` or ``i18n_tool extract``
- *JavaScript / MFE repositories*: ``npm run i18n:extract``

**Step 3 — Isolate your custom strings**

Compare ``translations-custom/`` against ``translations-upstream/`` and remove any ``msgid`` entries that already exist upstream. This keeps your fork lean and prevents duplicating strings that upstream translators already maintain.

**Step 4 — Merge into the final output**

Overlay ``translations-custom/`` on top of ``translations-upstream/`` to produce the ``translations/`` directory. The merge rule is simple: if a ``msgid`` exists in both layers, the custom value wins (as long as it is non-empty); otherwise the upstream value is used.

For theme repositories (such as a custom Indigo fork), theme translations should be merged into ``edx-platform`` translations rather than kept in a separate locale path, because the platform loads theme strings from its own locale directory at runtime.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also attach the commands to isolate the translations, Otherwise its just complicating the process and we can simply write that add your custom translations in translations/ folder and its upto the user what process he is following. For example:

  • for custom mfe frontend-app-custom add your translations here translations/frontend-app-custom.
  • For core MFEs e.g. frontend-app-authoring mfe, add/replace your translations in translations/frontend-app-authoring.
  • Same goes for custom plugins
  • And for theme, added note would be fine, For theme repositories (such as a custom Indigo fork), ...

@Faraz32123 Faraz32123 requested a review from ahmed-arb April 30, 2026 12:43
@ahmed-arb
Copy link
Copy Markdown
Collaborator

Instead of keeping this in configuration, should we make it a tutorial?

@Faraz32123
Copy link
Copy Markdown
Contributor

Instead of keeping this in configuration, should we make it a tutorial?

Yes, we should move it to tutorial section & add a hyperlink under customizing Translations heading in this same file as well. What do u guys say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

5 participants