JCU/fix(i18n-cs): drop unresolvable {{ collection }} from browse.title - #1416
Merged
Merged
Conversation
The Czech translation of `browse.title` carried a `{{ collection }}`
interpolation parameter that the English source message does not have.
Neither call site passes it:
browse-by-metadata.component.html -> { field, startsWith, value }
browse-by-taxonomy.component.html -> { field, startsWith, value }
ngx-translate leaves an unmatched parameter untouched, so the Czech UI
rendered the placeholder literally, e.g. on /browse/srsc:
"Prochazet {{ collection }} podle Subject Category"
The key was already flagged with "TODO Source message changed - Revise
the translation": upstream dropped `{{ collection }}` from the English
message and the Czech translation was never revised. Revised now, so the
TODO marker goes too.
Audited every key in cs.json5 against en.json5 for interpolation
mismatches; this was the only user-visible one. Two remaining findings
are deliberately left alone and reported in the PR description instead:
an orphaned admin key that no component renders, and a translated email
body that omits the salutation parameter.
Refs dataquest-dev/dspace-customers#853
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the Czech (cs) i18n bundle to remove an unresolvable {{ collection }} placeholder from the browse.title translation so browse headings no longer render the raw interpolation token in the UI.
Changes:
- Removed the stale
{{ collection }}interpolation frombrowse.titleincs.json5. - Dropped the associated “TODO Source message changed” marker now that the translation matches the source placeholder set.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 the first item reported in dataquest-dev/dspace-customers#853.
Problem
On the Czech UI,
/browse/srsc?startsWith=deferred%20taxrenders the placeholder literally:Reproduced on the JCU test instance (
dev-6.pc:8593, Czech UI) and visible in the reporter'sproduction screenshot in the issue.
Cause
The Czech translation of
browse.titlecarries a{{ collection }}interpolation parameter thatthe English source message does not have:
Neither call site passes such a parameter — both pass exactly
field,startsWith,value:src/app/browse-by/browse-by-metadata/browse-by-metadata.component.htmlsrc/app/browse-by/browse-by-taxonomy/browse-by-taxonomy.component.html(this is/browse/srsc)ngx-translate leaves an unmatched parameter untouched, so the user sees the raw
{{ collection }}.The key was already flagged in
cs.json5with// TODO Source message changed - Revise the translation: upstream dropped{{ collection }}from the English message, and the Czechtranslation was never revised. It is revised now, so the TODO marker goes too.
Fix
One line in
src/assets/i18n/cs.json5:The wording now matches the neighbouring
browse.title.pagekey, which already reads"Procházet podle {{ field }} {{ value }}".Whole-bundle audit
Rather than fix only the reported key, every key in
cs.json5was compared againsten.json5forinterpolation mismatches (placeholders present in one and not the other).
browse.titlewas theonly user-visible offender. Two further findings are deliberately left alone:
admin.access-control.epeople.notification.deleted.failure{{name}}, EN uses{{id}}/{{statusCode}}/{{restResponse.errorMessage}}epeople-registry.component.ts:251mistakenly reusesnotification.deleted.successfor the error branch. That is a separate upstream FE bug, not a translation bug.deny-request-copy.email.message{{ recipientName }}, so the outgoing email has no salutationVerification
Same page, same locale, before and after.
Before — JCU test instance



dev-6.pc:8593, Czech UIBefore — local UI on this branch's parent (
customer/jcu)After — local UI on this branch
Note that
Subject Categoryin the heading stays English in the "after" shot. That is a differentuntranslated key (
browse.metadata.srsc) tracked separately as M5 in the #853 checklist, and isintentionally out of scope here.
Also checked in the same locale, before and after:
/browse/subject,/browse/title,/browse/author,/browse/dateissued— no other browse heading regressed, and the English UI isuntouched (only
cs.json5changed).🤖 Generated with Claude Code