Skip to content

docs(agents): link the translation guidelines - #14115

Merged
ChristophWurst merged 1 commit into
mainfrom
chore/add-translation-guidelines
Dec 1, 2026
Merged

ChristophWurst merged 1 commit into
mainfrom
chore/add-translation-guidelines

Conversation

@DerDreschner

@DerDreschner DerDreschner commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Agents didn't follow the translation guidelines when writing new strings. The Internationalization section of AGENTS.md now links the guidelines and adds the one rule agents can't pick up from the code: a TRANSLATORS comment for ambiguous strings.

The mechanical rules (ellipsis, quotes, contractions, placeholders, plurals, comment placement) are checked by a lint instead:

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (Claude Opus 5.5)

@DerDreschner DerDreschner self-assigned this Nov 10, 2026
@DerDreschner DerDreschner added 3. to review AI assisted This PR contains AI-assisted commits labels Nov 10, 2026
@DerDreschner

Copy link
Copy Markdown
Member Author

/backport to stable5.13

@DerDreschner

Copy link
Copy Markdown
Member Author

Note: Asking the desktop team how they handle it, as we heard they handle it very well. Otherwise it should only contain the link and some major bullet points (context, etc.).

@DerDreschner

Copy link
Copy Markdown
Member Author

Claude and other AI agents don't read the link by default. That means we must do some duplication here. I've cut it down to a smaller base now. Extensive checking must be done in a CI step.

@DerDreschner
DerDreschner force-pushed the chore/add-translation-guidelines branch from 51b109e to dd51c80 Compare November 16, 2026 11:36

@ChristophWurst ChristophWurst 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.

IMO this is too verbose and duplicating the developer manual section.

Can we try with a shorter paragraph and the link to the docs?

@DerDreschner

Copy link
Copy Markdown
Member Author

I see the point, but I think some duplication is needed here. Agents load AGENTS.md into their context, but usually open the pages it links to only when asked to, or when the task makes them look something up. Writing a user-facing string rarely does, so with only a link, the agent doesn't see the guidelines.

The agent docs recommend the same:

  • VS Code: "Linking to a document is not a guarantee that its contents are included in every request." and "Keep essential rules in the instructions themselves."
  • GitHub Copilot code review doesn't follow external links in instruction files at all: "Copy the relevant content directly into your instruction file instead."
  • Claude Code only fetches a page to look something up, and even then: "For most pages, Claude doesn't see the full text."

That's why the PR lists the main points again: the rules that agents get wrong most often. The developer manual stays the source of truth, and the section links to it. If you think one of the points isn't worth repeating, I'm happy to drop it.

Assisted by ClaudeCode:claude-opus-5-5

@ChristophWurst

Copy link
Copy Markdown
Member

I'm still not convinced. By that rule we would have to duplicate all of the dev manual into the agents file.

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 <david.dreschner@nextcloud.com>
@DerDreschner
DerDreschner force-pushed the chore/add-translation-guidelines branch from 8839b35 to 5b1a8ad Compare November 28, 2026 13:58
@DerDreschner DerDreschner changed the title docs(agents): Add translation guidelines and best-practices docs(agents): link the translation guidelines Nov 28, 2026
@DerDreschner

DerDreschner commented Nov 28, 2026 •

Copy link
Copy Markdown
Member Author

Not the whole manual, only what agents can't pick up from the code. They learn the API from the surrounding code, since every string already goes through t('mail', …). But nothing in the code states the rules for the English text itself, and main even contains strings that break the Dos and Don'ts. The new lint finds 7 errors on main, for example:

Those rules are going into the lint, so an agent gets them as annotations on its PR, like everyone else:

So I've cut the section down to the link and one bullet, 4 lines in total. The bullet is about context hints: agents can't tell from the code which strings are ambiguous, and no lint can check that. Once both PRs are merged and the translations image is published, I'll add the workflow to Mail.

Assisted by ClaudeCode:claude-opus-5-5

@DerDreschner

Copy link
Copy Markdown
Member Author

@ChristophWurst: Is it okay for you in the current state?

@ChristophWurst ChristophWurst 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.

:shipit:

@ChristophWurst
ChristophWurst merged commit 12ae0f5 into main Dec 1, 2026
38 checks passed
@ChristophWurst
ChristophWurst deleted the chore/add-translation-guidelines branch December 1, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants