Skip to content

fix(pantry): don't wrap "optional" in a second pair of parentheses - #627

Merged
LeMyst merged 1 commit into
cooklang:mainfrom
LeMyst:fix/pantry-optional-parens
Oct 5, 2026
Merged

LeMyst merged 1 commit into
cooklang:mainfrom
LeMyst:fix/pantry-optional-parens

Conversation

@LeMyst

@LeMyst LeMyst commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #626.

Every locale already writes pantry-optional with its parentheses ((optional), (optionnel), (opcional)…), and templates/pantry.html wrapped it in a second pair on the four optional fields of the Add item dialog, so they read "Quantity ((optional))" in every language. Both came in with d4c5007.

  • templates/pantry.html: drop the template's parentheses; the punctuation stays with the translations.
  • tests/locales_test.rs: no_template_wraps_a_parenthesised_message_in_parentheses lists the English messages written in parentheses and fails if a template wraps one in ({{ tr.t("…") }}). It fails on main (pantry.html: pantry-optional) and passes here.

cargo fmt --check, cargo clippy --all-targets and cargo test pass.

🤖 Generated with Claude Code

Every locale already writes pantry-optional with its parentheses, so the
add-item dialog read "Quantity ((optional))" in every language. Leave the
punctuation to the translations, and check that no template wraps such a
message again.

Closes cooklang#626

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeMyst
LeMyst marked this pull request as ready for review October 5, 2026 20:37
@LeMyst
LeMyst merged commit 6b9cff2 into cooklang:main Oct 5, 2026
5 of 7 checks passed
@LeMyst
LeMyst deleted the fix/pantry-optional-parens branch October 5, 2026 20:50
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.

Pantry "Add item" dialog shows "((optional))" in every language

1 participant