Skip to content

fix(l10n): normalize de_DE to de before user manual build#15317

Merged
miaulalala merged 1 commit into
masterfrom
feature/de-locale-de_DE-alignment
Jul 16, 2026
Merged

fix(l10n): normalize de_DE to de before user manual build#15317
miaulalala merged 1 commit into
masterfrom
feature/de-locale-de_DE-alignment

Conversation

@miaulalala

Copy link
Copy Markdown
Contributor

☑️ Resolves

Relates to #13370

💡 Context

Every other Nextcloud project (server, apps, clients) syncs formal German as de_DE in Transifex. These docs are the outlier, using bare de — which confuses translators (not everyone is on both German teams) and keeps the translation memory from pooling with the mature de_DE TM used everywhere else.

The published URL (user_manual/de/) can't change — it's linked from many external sites (see discussion on the issue).

This PR decouples the two: it adds a build-time step (build/normalize_locale_codes.sh, wired into user_manual/Makefile's html target) that folds locale/de_DE into locale/de right before Sphinx builds, if de_DE exists. It follows the same pattern already used by change_file_extension.sh for .pot.po renaming.

This is currently a no-oplocale/de_DE doesn't exist yet. It only takes effect once the Transifex resource for the user manual is reconfigured to sync German under de_DE instead of de, which needs to happen on the Transifex side (cc @rakekniven).

Opening as a draft to get eyes on the approach before the Transifex-side config change happens — cc @AndyScherzinger @nickvergessen since you both weighed in on the issue.

🖼️ Screenshots

N/A — build tooling change only, no rendered content changes.

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

Every other Nextcloud project (server, apps, clients) syncs formal
German as "de_DE" in Transifex, but these docs use bare "de". This
confuses translators managing both German teams and fragments the
translation memory across projects.

The published URL (user_manual/de/) can't change since it's linked
from many external sites, so this keeps the Transifex resource
language-code-agnostic on the build side: if locale/de_DE exists it
is folded into locale/de right before Sphinx runs, following the same
pattern already used for POT->PO renaming in change_file_extension.sh.

This is currently a no-op — it only takes effect once the Transifex
resource for the user manual is reconfigured to sync German under
de_DE instead of de.

Relates to #13370

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@nickvergessen

Copy link
Copy Markdown
Member

I'm overly busy and not familiar with the new deployment mechanism, so I will stay out of this

@nickvergessen
nickvergessen removed their request for review July 15, 2026 11:48
@rakekniven

rakekniven commented Jul 15, 2026

Copy link
Copy Markdown
Member

Oh, that sounds good.
I’d be happy to write an announcement at Transifex before the change goes live.

Renaming a language at Transifex is not possible.
I can add "de_DE" language, which will be empty.
The sync needs to be adapted as well and after a sync the strings should be present in "de_DE".
Afterwards I will remove "de" language from project "Nextcloud user documentation" at Tx.

Question:
Where are the available languages for the documentation defined? In Sphinx, it should only be “de”, and on Transifex, “de_DE”.

@miaulalala

Copy link
Copy Markdown
Contributor Author

Good question! There's no static list to edit — the available languages are derived dynamically from directory names in both places:

  • Sphinx build (user_manual/Makefile): LANGS = $(shell touch locale/en && ls locale | grep -v source && rm locale/en) — just lists whatever folders exist under user_manual/locale/
  • Language switcher template (user_manual/conf.py, available_languages): same idea, os.listdir(locale_path) over user_manual/locale/

So as long as build/normalize_locale_codes.sh runs before Sphinx builds (it does, wired into user_manual/Makefile's html target), it folds locale/de_DE into locale/de before Sphinx ever sees the directory listing. Sphinx and the language switcher will only ever see de.

On the Transifex side: once you add de_DE and the sync lands those files in the repo under user_manual/locale/de_DE/, our build script takes it from there — no further config needed on this end.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

🔍 Open preview →

No RST documentation pages changed in this PR.

Last updated: Wed, 15 Jul 2026 18:37:59 GMT

@miaulalala
miaulalala marked this pull request as ready for review July 16, 2026 12:38

@AndyScherzinger AndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good to me, but I have no knowledge myself on how generation and deployment works on the docs repo. So I'd be relying on @skjnldsv and @nickvergessen for that.

But generally would be happy if we can make the translation community happy with this.

@miaulalala
miaulalala merged commit ea3367d into master Jul 16, 2026
38 of 40 checks passed
@miaulalala
miaulalala deleted the feature/de-locale-de_DE-alignment branch July 16, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move formal german user documentation from "de" to "de_DE"

4 participants