fix(l10n): remove duplicate de/de_DE empty-state keys - #562
Merged
Conversation
The all-languages backfill appended "No note selected" and "Create a note using the + button in the sidebar." to the de and de_DE catalogs, which already carried those keys from #552. That produced the same key twice in a single catalog object (malformed JS object literal / JSON), resolved only by implicit last-wins. Collapse each to a single register-correct entry: de keeps the informal "Erstelle …" form, de_DE keeps the formal "Erstellen Sie …" form. The genuinely new "Notes" key added by the backfill is retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Contributor
That's a bit sad, I thought that such things would be caught by validation somewhere. |
phil-davis
approved these changes
Jul 27, 2026
Contributor
|
That means a patch release, and update the version to go in the 11.0.0 release bundles. |
DeepDiver1975
added a commit
that referenced
this pull request
Jul 27, 2026
Since the version bump was authored, several user-facing PRs merged to master that will ship inside 2.2.0. Record them in the release notes: full translation backfill (#561), fenced-code-block background (#560), zh-Hans/Mongolian corrections (#559), duplicate de/de_DE key removal (#562), and the Transifex-sync retirement (#558). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
phil-davis
pushed a commit
that referenced
this pull request
Jul 27, 2026
* chore: bump version to 2.2.0 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> * docs(changelog): cover l10n and CSS changes shipping in 2.2.0 Since the version bump was authored, several user-facing PRs merged to master that will ship inside 2.2.0. Record them in the release notes: full translation backfill (#561), fenced-code-block background (#560), zh-Hans/Mongolian corrections (#559), duplicate de/de_DE key removal (#562), and the Transifex-sync retirement (#558). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
phil-davis
pushed a commit
that referenced
this pull request
Jul 27, 2026
Both JSON.parse and PHP's json_decode silently collapse duplicate object keys (last value wins), so a catalog can carry the same key twice and still parse as valid JSON. That is how the duplicate de/de_DE empty-state keys reached master and needed the follow-up in #562. Add tests/l10n/check-duplicate-keys.py, which parses every l10n/*.{js,json} catalog with an object_pairs_hook that inspects all key/value pairs before deduplication and fails on any repeated key (covering the nested translations object of the .json format and the OC.L10N.register wrapper of the .js format). Wire it up as a 'make test-l10n' target and a dedicated l10n-lint GitHub Actions workflow so it runs on every push and pull request. Verified the checker flags the exact duplicates from the pre-#562 tree. Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes duplicate translation keys introduced by the all-languages backfill (#561, now merged to
master).Problem
deandde_DEalready carriedNo note selectedandCreate a note using the + button in the sidebar.from #552. The backfill appended both keys again with different wording, producing the same key twice in a single catalog object — a malformed JS object literal / JSON object resolved only by implicit last-wins. JSON parsers accept it, which is why validation didn't catch it.Fix
Collapse each affected catalog to a single, register-correct entry (
de= informal du,de_DE= formal Sie — intentionally distinct catalogs):de— keeps the informalErstelle eine Notiz über die +-Schaltfläche …(register-correct for the informal catalog; the duplicated feat(ui): show empty state when no note is selected #552 line was a formal Erstellen Sie string).de_DE— keeps the formalErstellen Sie eine Notiz über die +-Schaltfläche ….Noteskey added by the backfill is retained in both.Only these 4 files change (
de.{js,json},de_DE.{js,json}); no other locale had a pre-existingNo note selected/Create a notekey, so none is affected.Verification
de.json/de_DE.json..js/.jsonmessage keys in sync per catalog.🤖 Generated with Claude Code