Skip to content

fix: use placeholder-free key for suggestion display label (#273)#369

Merged
JohnMcLear merged 1 commit intomainfrom
fix/suggestion-label-translation-key
Apr 17, 2026
Merged

fix: use placeholder-free key for suggestion display label (#273)#369
JohnMcLear merged 1 commit intomainfrom
fix/suggestion-label-translation-key

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

  • Fixes Wrong translation key #273: replying to a comment with a suggested change displayed literal `{{changeFrom}}` / `{{changeTo}}` placeholder text.
  • The `display-suggestion` template's label span used the `suggested_change_from` key, whose English value contains `{{changeFrom}}` and `{{changeTo}}` interpolation placeholders, but no `data-l10n-args` was provided on the span.
  • Adjacent `.from-value` / `.to-value` spans (with `:before`/`:after` quote pseudo-elements in the CSS) already render the actual from/to text, so the label should only carry a static prefix.
  • Introduces a new placeholder-free key `ep_comments_page.comments_template.suggested_change_from_label` = "Suggested change from" and points the template at it.

Test plan

  • New backend spec enforces that every `data-l10n-id` referenced in `comments.html` exists in `en.json`.
  • Spec asserts the new label key has no `{{ }}` placeholders and that the template references it.

The display-suggestion template's label used
`ep_comments_page.comments_template.suggested_change_from`, whose
English value is "Suggested change from \"{{changeFrom}}\" to
\"{{changeTo}}\"". The span had no `data-l10n-args`, so the
{{changeFrom}} / {{changeTo}} placeholders rendered as literal text
when replying with a suggestion.

Introduce a new key
`ep_comments_page.comments_template.suggested_change_from_label` that
is plain "Suggested change from" (no placeholders). The adjacent
`.from-value` / `.to-value` spans already render the quoted values, so
the label should only carry the static prefix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit 9b2e370 into main Apr 17, 2026
3 checks passed
@JohnMcLear JohnMcLear deleted the fix/suggestion-label-translation-key branch April 17, 2026 10:15
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.

Wrong translation key

1 participant