From 5b1a8ad6eb8b33bba34b5ba6e3e78c4ee58ac5c8 Mon Sep 17 00:00:00 2001 From: David Dreschner Date: Sat, 28 Nov 2026 14:57:54 +0100 Subject: [PATCH] docs(agents): link the translation guidelines Agents didn't follow the translation guidelines for new strings, and nothing in the code states the rules for the English text. The section now links the guidelines and adds the one rule no lint can check: a TRANSLATORS comment for an ambiguous string. The mechanical rules are left to the lint-source-strings check from nextcloud/docker-ci#1035. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index e56cfab398..0c27cc9c31 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -192,11 +192,15 @@ the same things — but the author should not need the bot to learn them. dropped by mistake. ### Internationalization +Follow the [translation guidelines](https://docs.nextcloud.com/server/latest/developer_manual/basics/translations.html) +of the developer manual. - Wrap every user-facing string, **including aria-labels**, in `t('mail', …)`. Use one string with placeholders — never concatenate translated fragments (translators reorder words). Use `n('mail', …)` with a `%n` placeholder for counts. Never compare against a hard-coded English string or use a translated string as a key. No HTML inside a translation string — translate the plain parts and HTML-encode the inserts. +- Give an ambiguous string, for example `Share` as verb or noun, a `// TRANSLATORS …` + comment on its own line directly above it (`` in templates). ### Accessibility - Real anchor (``) for links, not a JS click handler, so screen