fix(#8541): add missing print.storycontext.title translation key#10049
Open
BacLuc wants to merge 1 commit into
Open
fix(#8541): add missing print.storycontext.title translation key#10049BacLuc wants to merge 1 commit into
BacLuc wants to merge 1 commit into
Conversation
✅ Feature branch deployment ready!
|
carlobeltrame
requested changes
Jun 14, 2026
carlobeltrame
left a comment
Member
There was a problem hiding this comment.
I'd rather we make things consistent instead of quick fixes. Why is a different key used between the two prints?
Contributor
Author
|
print uses: pdf uses Will decide later which one was first and use that. |
The pdf service correctly derives the Story summary page title from a
'type' prop ('Story') which resolves to the translation key
'print.story.title'. The print service was deriving the same title from
the API content type name ('Storycontext'), which produced the key
'print.storycontext.title' - a key that did not exist in the locales.
History of the inconsistency:
- Originally both services used the same hardcoded key.
- When the generic 'summary' page was refactored (a6578ee), the title
key became dynamically based on the content type name.
- The pdf service later cleanly separated the API query parameter
(contentType='Storycontext') from the display translation key
(type='Story'). (commit: 2386503).
- The print service never received this separation, so it continued to
conflate the two, leading to the wrong key being looked up.
Instead of adding a new 'print.storycontext.title' translation to every
locale (the workaround that PR ecamp#10049 originally proposed), fix the root
cause by adding a 'type' prop to the print SummaryPeriod component and
passing it from Story and SafetyConsiderations config components.
This makes the print implementation consistent with the pdf one:
- PDF: uses camelCase(content.type) -> 'story'
- Print: now uses camelCase(type) -> 'story'
Also restored the scout-specific 'Roter Faden' translation in
de-CH-scout.json under print.story.title.
Fixes ecamp#8541
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: BacLuc <lucius.bachmann@clubpage.ch>
1a97af7 to
6666af2
Compare
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.
fix(#8541): align print story title key with pdf implementation
The pdf service correctly derives the Story summary page title from a
'type' prop ('Story') which resolves to the translation key
'print.story.title'. The print service was deriving the same title from
the API content type name ('Storycontext'), which produced the key
'print.storycontext.title' - a key that did not exist in the locales.
History of the inconsistency:
key became dynamically based on the content type name.
(contentType='Storycontext') from the display translation key
(type='Story'). (commit: 2386503).
conflate the two, leading to the wrong key being looked up.
Instead of adding a new 'print.storycontext.title' translation to every
locale (the workaround that PR #10049 originally proposed), fix the root
cause by adding a 'type' prop to the print SummaryPeriod component and
passing it from Story and SafetyConsiderations config components.
This makes the print implementation consistent with the pdf one:
Also restored the scout-specific 'Roter Faden' translation in
de-CH-scout.json under print.story.title.
Fixes #8541