Skip to content

Verbose option on remainin message summary. For when we need more.#2642

Open
amazingphilippe wants to merge 2 commits intomainfrom
bug/more-verbose-summaries
Open

Verbose option on remainin message summary. For when we need more.#2642
amazingphilippe wants to merge 2 commits intomainfrom
bug/more-verbose-summaries

Conversation

@amazingphilippe
Copy link
Copy Markdown
Contributor

Summary | Résumé

The summary could be more verbose when adjacent to other "text message parts" content. Such as on the review before sending screens:
Before:
Capture d’écran, le 2026-04-02 à 11 55 30
After:
Capture d’écran, le 2026-04-02 à 11 55 48

Test instructions | Instructions pour tester la modification

  • Send yourself a text message
  • Check the review before sending screen
  • Check the storybook - Added an example.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a verbose option to the remaining-messages summary UI so the summary can include the notification unit label (for SMS, “text message parts”) when shown alongside other SMS parts content (notably on “review before sending” screens).

Changes:

  • Extend remaining_messages_summary macro with a verbose parameter to optionally render the notification type label inline.
  • Update SMS “check before sending” screens to call the macro with verbose=True.
  • Add a storybook example and new French translation entries for “text message part(s)”.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/translations/csv/fr.csv Adds French translations for new standalone “text message part(s)” strings.
app/templates/views/storybook/remaining-messages-summary.html Adds a storybook example rendering the summary in verbose mode for SMS.
app/templates/views/notifications/check.html Enables verbose rendering of remaining-messages summary for SMS on the review screen.
app/templates/views/check/ok.html Enables verbose rendering of remaining-messages summary for SMS on the preview screen.
app/templates/components/remaining-messages-summary.html Introduces verbose param and renders notification type label when enabled; changes SMS unit label to “text message parts”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +80 to +85
<span class="font-bold" data-testid="rms-{{ section.type }}-remaining">{{ section.remaining }}</span>
{% if verbose %}
{{ notification_type~" "~section.text }}
{% else %}
{{ section.text }}
{% endif %}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The new verbose output concatenates notification_type with the separately-translated section.text ("can be sent before …"). In French, "can be sent before" is currently translated with masculine agreement ("peuvent être envoyés"), but "text message parts" is translated as "parties…" (feminine), producing incorrect grammar when verbose mode is enabled. Consider translating the whole phrase as a single string (with placeholders) or using a gender-neutral French translation for the "can be sent before" fragment to avoid agreement issues.

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +85
<span class="font-bold" data-testid="rms-{{ section.type }}-remaining">{{ section.remaining }}</span>
{% if verbose %}
{{ notification_type~" "~section.text }}
{% else %}
{{ section.text }}
{% endif %}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

In verbose mode the label is always plural (e.g., "text message parts" / "emails"), so cases where section.remaining is 1 will render grammatically incorrect text ("1 … parts"). Since this PR adds both singular and plural translation keys, it would be better to select the correct singular/plural label based on the remaining count for each section.

Copilot uses AI. Check for mistakes.
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.

2 participants