Skip to content

JCU/fix(i18n-cs): drop unresolvable {{ collection }} from browse.title - #1416

Merged
milanmajchrak merged 1 commit into
customer/jcufrom
jcu/fix-browse-title-cs-placeholder
Aug 5, 2026
Merged

JCU/fix(i18n-cs): drop unresolvable {{ collection }} from browse.title#1416
milanmajchrak merged 1 commit into
customer/jcufrom
jcu/fix-browse-title-cs-placeholder

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Aug 4, 2026

Copy link
Copy Markdown

Fixes the first item reported in dataquest-dev/dspace-customers#853.

Problem

On the Czech UI, /browse/srsc?startsWith=deferred%20tax renders the placeholder literally:

Procházet {{ collection }} podle Subject Category

Reproduced on the JCU test instance (dev-6.pc:8593, Czech UI) and visible in the reporter's
production screenshot in the issue.

Cause

The Czech translation of browse.title carries a {{ collection }} interpolation parameter that
the English source message does not have:

en.json5  "browse.title": "Browsing by {{ field }}{{ startsWith }} {{ value }}"
cs.json5  "browse.title": "Procházet {{ collection }} podle {{ field }}{{ startsWith }} {{ value }}"

Neither call site passes such a parameter — both pass exactly field, startsWith, value:

  • src/app/browse-by/browse-by-metadata/browse-by-metadata.component.html
  • src/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.json5 with // TODO Source message changed - Revise the translation: upstream dropped {{ collection }} from the English message, and the Czech
translation was never revised. It is revised now, so the TODO marker goes too.

Fix

One line in src/assets/i18n/cs.json5:

- // TODO Source message changed - Revise the translation
- "browse.title": "Procházet {{ collection }} podle {{ field }}{{ startsWith }} {{ value }}",
+ "browse.title": "Procházet podle {{ field }}{{ startsWith }} {{ value }}",

The wording now matches the neighbouring browse.title.page key, which already reads
"Procházet podle {{ field }} {{ value }}".

Whole-bundle audit

Rather than fix only the reported key, every key in cs.json5 was compared against en.json5 for
interpolation mismatches (placeholders present in one and not the other). browse.title was the
only user-visible offender. Two further findings are deliberately left alone:

Key Finding Why not fixed here
admin.access-control.epeople.notification.deleted.failure CS uses {{name}}, EN uses {{id}}/{{statusCode}}/{{restResponse.errorMessage}} The key is orphaned — no component renders it. epeople-registry.component.ts:251 mistakenly reuses notification.deleted.success for the error branch. That is a separate upstream FE bug, not a translation bug.
deny-request-copy.email.message CS drops {{ recipientName }}, so the outgoing email has no salutation Restoring it means choosing Czech wording with gender agreement on a person's name. That is a content decision for JCU, not a rendering defect.

Verification

Same page, same locale, before and after.

Before — JCU test instance dev-6.pc:8593, Czech UI
B1-1-before-dev6-cs-browse-srsc
Before — local UI on this branch's parent (customer/jcu)
B1-2-before-local-cs-browse-srsc
After — local UI on this branch
B1-3-after-local-cs-browse-srsc

Note that Subject Category in the heading stays English in the "after" shot. That is a different
untranslated key (browse.metadata.srsc) tracked separately as M5 in the #853 checklist, and is
intentionally 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 is
untouched (only cs.json5 changed).

🤖 Generated with Claude Code

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from browse.title in cs.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.

@Kasinhou
Kasinhou requested a review from milanmajchrak August 5, 2026 07:25
@milanmajchrak
milanmajchrak merged commit cabb4be into customer/jcu Aug 5, 2026
6 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.

3 participants