fix(l10n): the template shipped 38 catalogues the browser never reads - #186
Merged
Merged
Conversation
Nextcloud loads a locale catalogue in two formats and neither substitutes for the other. l10n/<locale>.json is read server-side by PHP $l->t(). l10n/<locale>.js is an OC.L10N.register() call and is the only one the browser ever sees. This repo had 38 .json files and zero .js, so every translation in it was inert in the frontend, and every app scaffolded from this template started that way too. That is the shape of the defect a user reported on dossiq: an account set to Dutch still reading English. Working fleet apps ship both halves (openregister 37/38, opencatalogi 37/38, dossiq 38/39, petstore 38/38). This repo and thematiq shipped 0. Also closes gate-102 (manifest-l10n-coverage), which failed on development with 9 manifest strings having no nl.json key. They are the example-app menu labels, widget titles and empty state: Examples, Example, Open examples, In progress, Closed, Recent examples, No examples yet, Close example, Features & roadmap. The generator is petstore's scripts/build-l10n-js.js adopted unchanged rather than reimplemented, with the l10n:build and check:l10n-js scripts that keep the two halves from drifting again. Apps carrying check:l10n-js have measured zero drift; apps without it had accumulated 142 to 1,090 unreachable entries. Verified: all 9 strings reach l10n/nl.js with their Dutch values and the register call names the right app id (apptemplate); nl.js holds 49 keys; the manifest now has 0 user-visible strings missing from nl.json; check:l10n-js exits 0; all 38 generated files pass node --check and none is empty.
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
August 30, 2026 17:12
This was referenced Aug 30, 2026
Contributor
Author
|
Refining one line in the description, because the mechanism is worth stating precisely. I wrote that the
So the accurate claim is: the JSON path is real but unreliable, the |
Contributor
Quality Report — ConductionNL/nextcloud-app-template @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| check-manifest | ✅ | ||||
| format | ❌ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 737/737 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | 🚨 NO VERDICT — enabled but never ran | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-30 17:23 UTC
Download the full PDF report from the workflow artifacts.
The 38 l10n/*.js files this branch adds are emitted by scripts/build-l10n-js.js with the Nextcloud l10n tooling's own four-space shape, so prettier wants to rewrite all 38 and `npm run l10n:build` wants to rewrite them back. Without the ignore the format check fails forever and the two tools fight over the same files. dossiq already carries this exact entry for the same reason; this matches it. Verified load-bearing rather than assumed: with the entry removed `npm run format` reports "Code style issues found in 38 files" and exits 1; with it restored the check passes and exits 0.
Contributor
Quality Report — ConductionNL/nextcloud-app-template @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| check-manifest | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 103/103 | |||
| npm | ✅ | ✅ 737/737 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | 🚨 NO VERDICT — enabled but never ran | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-30 18:45 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.
Nextcloud loads a locale catalogue in two formats and neither substitutes for the other:
l10n/<locale>.jsonis read server-side by PHP$l->t().l10n/<locale>.jsis anOC.L10N.register()call, and is the only one the browser ever sees.This repo had 38
.jsonfiles and zero.js, so every translation in it was inert in the frontend. Every app scaffolded from this template started that way too.That is the same defect reported on dossiq: an account set to Dutch still reading English. Measured across the fleet on
development:Also closes gate-102
manifest-l10n-coveragefails ondevelopmentwith 9 manifest string(s) have no l10n/nl.json key and will render English to a Dutch user. They are the example-app menu labels, widget titles and empty state: Examples, Example, Open examples, In progress, Closed, Recent examples, No examples yet, Close example, Features & roadmap. Added in the file's existing sentence-case style, appended rather than re-sorted so the diff is the 9 lines and nothing else.The generator
scripts/build-l10n-js.jsis petstore's, adopted unchanged rather than reimplemented, plus thel10n:buildandcheck:l10n-jsscripts that stop the two halves drifting again. Apps carryingcheck:l10n-jshave measured zero drift; apps without it had accumulated between 142 and 1,090 unreachable entries.Verification
l10n/nl.jswith their Dutch values, checked individually rather than by count.apptemplate), read fromappinfo/info.xml.nl.jsholds 49 keys; the manifest now has 0 user-visible strings missing fromnl.json.check:l10n-jsexits 0.node --checkand none is empty (smallest 1512 bytes) — an empty file passesnode --check, so size was checked too.thematiqneeds the same fix and is not included here.🤖 Generated with Claude Code