From e1b168a0b349ac80f1e666c11da6a40b8f9be38e Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Wed, 15 Jul 2026 13:06:16 +0200 Subject: [PATCH] fix(l10n): normalize de_DE to de before user manual build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Anna Larch --- build/normalize_locale_codes.sh | 18 ++++++++++++++++++ user_manual/Makefile | 1 + 2 files changed, 19 insertions(+) create mode 100755 build/normalize_locale_codes.sh diff --git a/build/normalize_locale_codes.sh b/build/normalize_locale_codes.sh new file mode 100755 index 00000000000..d87272c1555 --- /dev/null +++ b/build/normalize_locale_codes.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Nextcloud server, apps and clients use "de_DE" for formal German in Transifex. +# These docs historically used "de", causing translator confusion and a fragmented +# translation memory (see https://github.com/nextcloud/documentation/issues/13370). +# +# Transifex is being reconfigured to sync German as "de_DE" like every other +# Nextcloud project, but the published docs URL must stay "de" (it's linked from +# many external sites). This folds "de_DE" into "de" right before Sphinx builds, +# so the sync stays de_DE-native while the published path is unaffected. +# +# No-op until locale/de_DE actually exists. + +if [ -d ./locale/de_DE ]; then + mkdir -p ./locale/de + rsync -a ./locale/de_DE/ ./locale/de/ + rm -rf ./locale/de_DE +fi diff --git a/user_manual/Makefile b/user_manual/Makefile index 240d4c7d19d..0976b056d67 100644 --- a/user_manual/Makefile +++ b/user_manual/Makefile @@ -49,6 +49,7 @@ clean: html: ../build/change_file_extension.sh + ../build/normalize_locale_codes.sh make html-all merge-folders html-all: $(foreach lang, $(LANGS), html-allow-warnings-lang-$(lang))