docs(l10n): correct what collectDynamicKeys says about page titles - #3475
Merged
Conversation
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.
Contributor
Quality Report — ConductionNL/openregister @
|
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The docstring on
collectDynamicKeysstates 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 assrc/App.vuedoes here, against a Nextcloud 34 instance with the user set tonland the app'sl10n/deployed:menu[].labelrenders translated (Sources became "Bronnen")pages[].titlerenders translated: the page heading was "StUF-berichten", not "StUF messages"cards[].label/cards[].descriptionrender translated;CnReportsPagebuildsresolvedCardswiththis.tr(card.label)On integriq the stale exclusion had a real cost: four live keys were reported UNUSED and
clean:l10noffered 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:
check:l10nUNUSEDcheck:l10nMISSINGclean-l10nproposes deletingEvery page title openregister declares already has a literal
t()call insrc/, 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 onlyresolvedCardsshows the translation, so reading the component alone reproduces the wrong conclusion. The measurement also needs the app'sl10n/deployed, which the built bundle does not carry — I got as far as drafting a nextcloud-vue bug report before checking a container'snl.jsmtime.Verified:
eslint,prettierandtest:l10nall exit 0.🤖 Generated with Claude Code