Skip to content

docs(l10n): correct what collectDynamicKeys says about page titles - #3475

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/l10n-dynamic-keys-manifest
Sep 6, 2026
Merged

docs(l10n): correct what collectDynamicKeys says about page titles#3475
rubenvdlinde merged 1 commit into
developmentfrom
fix/l10n-dynamic-keys-manifest

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Why

The docstring on collectDynamicKeys states that CnPageRenderer "forwards [pages[].title] to the page component as a raw prop without translating it", and excludes the field on that basis. That is no longer true.

Measured 2026-09-06 on integriq, which wires <CnAppRoot :translate="translateForApp"> exactly as src/App.vue does here, against a Nextcloud 34 instance with the user set to nl and the app's l10n/ deployed:

  • menu[].label renders translated (Sources became "Bronnen")
  • pages[].title renders translated: the page heading was "StUF-berichten", not "StUF messages"
  • report cards[].label / cards[].description render translated; CnReportsPage builds resolvedCards with this.tr(card.label)

On integriq the stale exclusion had a real cost: four live keys were reported UNUSED and clean:l10n offered to delete them (integriq#1857). Deleting a translated page title removes the localised string and leaves the English source rendering correctly, so nothing fails and nobody notices.

This change is preventive here, not a fix

Measured on this repository, before and after:

Before After
check:l10n UNUSED 769 769
check:l10n MISSING 0 0
keys clean-l10n proposes deleting identical set
dynamic keys claimed 48 59

Every page title openregister declares already has a literal t() call in src/, so none were at risk. The guard matters the moment that stops being true, which a reports page would do at once — this repo declares none today.

Adding a field to this set can only make the cleaner more conservative, never less, which is why the no-op is the expected outcome rather than a reason to doubt the change.

What the docstring now says

How to verify a field: against the DOM, not the source. The template renders {{ card.label }} and only resolvedCards shows the translation, so reading the component alone reproduces the wrong conclusion. The measurement also needs the app's l10n/ deployed, which the built bundle does not carry — I got as far as drafting a nextcloud-vue bug report before checking a container's nl.js mtime.

Verified: eslint, prettier and test:l10n all exit 0.

🤖 Generated with Claude Code

The docstring states that CnPageRenderer "forwards [pages[].title] to the
page component as a raw prop without translating it", and excludes the
field on that basis. That is no longer true.

Measured 2026-09-06 on integriq, which wires
`<CnAppRoot :translate="translateForApp">` exactly as src/App.vue does
here, against a Nextcloud 34 instance with the user set to nl and the
app's l10n/ deployed: the page heading rendered "StUF-berichten", not
"StUF messages". Report card labels and descriptions translate too;
CnReportsPage builds resolvedCards with this.tr(card.label).

On integriq the stale exclusion had a cost: four live keys were reported
UNUSED and clean:l10n offered to delete them. Deleting a translated page
title removes the localised string and leaves the English source
rendering correctly, so nothing fails and nobody notices.

THIS CHANGE IS PREVENTIVE HERE, NOT A FIX. Measured on this repository:
check:l10n reports 769 unused before and 769 after, and clean-l10n
proposes an identical set. Every page title openregister declares already
has a literal t() call in src/, so none were at risk. The guard matters
the moment that stops being true, which a reports page would do at once
(this repo declares none today).

Adding a field to this set can only make the cleaner more conservative,
never less, which is why the no-op is the expected outcome rather than a
reason to doubt the change.

The docstring now records how to verify a field: against the DOM, not the
source. The template renders {{ card.label }} and only resolvedCards
shows the translation, so reading the component alone reproduces the
wrong conclusion, and the measurement needs the app's l10n/ deployed,
which the built bundle does not carry.

Verified: eslint, prettier and test:l10n all exit 0.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 8e613c9

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
test-l10n
test-l10n-parity
format
check-schema-l10n
check-l10n-js
composer ✅ 174/174
npm ✅ 543/543
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development
Hydra gates

Quality workflow — 2026-09-06 09:53 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit e712bab into development Sep 6, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant