Skip to content

i18n: unused-answers and Liquify skip messages translate for one item too - #7435

Open
dotCooCoo wants to merge 11 commits into
storytold:mainfrom
dotCooCoo:fix/singular-messages-translated
Open

dotCooCoo wants to merge 11 commits into
storytold:mainfrom
dotCooCoo:fix/singular-messages-translated

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Two messages built their singular by adding an empty suffix to a word: the script error for answers left in answers (crates/engine/src/script/mod.rs) and the warning object.liquify gives when it leaves objects under the brush as they were (crates/engine/src/cmd/distortcmds.rs). A catalog placeholder never matches empty text, so a template written with the suffix could not match the singular, and neither message had a catalog row for either count. Both stayed English in every language.

  • Both messages are now chosen from complete singular and plural English sentences. it was and they were are part of the sentence instead of a separate argument. The English the commands return does not change.
  • Each catalog that translates all status and error messages has an @msgplural row for each message, with the language's own count forms (three in Czech, Polish, Russian and Ukrainian, one in Japanese, Korean, Chinese, Georgian, Hungarian, Turkish and Vietnamese, two in the others). The Liquify tool name and the list of kinds stay in English, as they are on main, since no catalog translates them as messages.
  • docs/target-app-parity.md has one line for it.

No public documentation covers these messages; their wording and translation are VectorCraft's own.

How it was tested

New tests:

  • i18n::tests::messages_with_one_or_several_items_translate_in_every_complete_catalog (vectorcraft-ui-egui): for 1, 2 and 5 answers and skipped objects, every complete-message catalog shows the message translated with its count and without the English words the test lists (answer, did, use, left, brush, was, they, were, reshapes, paths, only), and Czech uses its one, few and other forms. It fails without the change (removing the Czech answers row fails it on cs with the English shown).
  • tests::script_dialogs::unused_answers_are_counted_in_the_singular_and_the_plural and tests::distort::liquify_warns_about_one_or_several_skipped_objects (vectorcraft-engine): the exact English for one and two answers and for one and two skipped type objects. They pass on main too, since the English is unchanged.

Focused checks on the final tree, on Linux. The branch is one commit on main at 1e4e3534f5 and merges cleanly with it.

  • cargo test -p vectorcraft-engine filtered to the two new tests: 2 passed.
  • cargo test -p vectorcraft-ui-egui --lib i18n: 116 passed.
  • cargo clippy -p vectorcraft-engine --all-targets -- -D warnings and cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings: exit 0, no lint warnings.
  • cargo check --workspace --tests: passes.
  • cargo xtask brands (no vendor names), layers (30 crates) and assets (337 files): pass.

After merging main at 8f8956f385, where Danish became a complete-message language, the branch adds the Danish rows for both messages (1bbca6efb5). On that head, cargo test -p vectorcraft-ui-egui --lib i18n (125 passed), cargo fmt --all -- --check and cargo check --workspace --tests pass.

It conflicts with open #7116, #7137, #7211 and #7399 in crates/ui-egui/src/i18n/tests.rs, and with open #7353 in docs/target-app-parity.md.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected singular and plural wording in Liquify warnings about skipped objects and script errors about unused answers.
    • Updated translated messages to use appropriate count forms, including Czech singular, paucal, and plural forms.
  • Documentation
    • Clarified that translated status messages use singular and plural forms for unused-answer errors and Liquify warnings; English command responses remain unchanged.

… too

The script error for answers left in `answers` and Liquify's warning about
objects under the brush that it left as they were built their singular by
adding an empty suffix, so no catalog template could match the singular
form, and neither message had a catalog row for either count.

- Both messages are now built from complete singular and plural English
  sentences; `it was` and `they were` are part of the sentence. The
  English the commands return does not change.
- Every complete-message catalog has an `@msgplural` row for each, with
  the language's own count forms. The tool name and the list of kinds
  stay as written.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Liquify skipped-object warnings and unused script-answer errors now use singular or plural wording based on their counts. Engine and localization tests cover the messages. The parity document describes the localized count forms and notes that English command responses are unchanged.

Changes: Count-aware messages

Layer / File(s) Summary
Count-specific message wording
crates/engine/src/cmd/distortcmds.rs, crates/engine/src/script/mod.rs, crates/engine/src/tests/distort.rs, crates/engine/src/tests/script_dialogs.rs
Liquify warnings and unused-answer errors now use singular or plural wording based on the count. Engine tests check the wording and reported counts.
Localization coverage and documentation
crates/ui-egui/src/i18n/tests.rs, docs/target-app-parity.md
Localization tests check the messages across complete catalogs. The documentation describes localized count forms and notes that command responses in English remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: aiongg, bflatastic

Merge Risk: Minimal · up to c39b1

This change makes unused-answer errors and Liquify skipped-object warnings use correct singular and plural wording, with tests and a documentation note. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two changed messages (unused-answers and Liquify skip messages) and the change for one item. The changeset selects singular and plural English sentences and adds catalog rows, so t…
Description check Passed The description follows the template. 'What and why' explains the singular/plural problem, the fix, and the translation rows. 'How it was tested' lists new tests and the checks run. The checklist is f…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two changed messages (unused-answers and Liquify skip messages) and the change for one item. The changeset selects singular and plural English sentences and adds catalog rows, so the title matches the main change. It is specific and concise.

Full details: Description check

Explanation

The description follows the template. 'What and why' explains the singular/plural problem, the fix, and the translation rows. 'How it was tested' lists new tests and the checks run. The checklist is filled in. The 'cargo xtask ci' item is left unchecked, and the author explains that CI runs in the PR. Remaining sections are complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

LanguageTool

docs/target-app-parity.md

LanguageTool checks are incomplete because the per-file request limit of 5 was reached. Remaining text was skipped; findings from completed checks are retained.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 585660d and c39b127.

Files ignored due to path filters: 24

  • crates/ui-egui/src/i18n/ca.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/cs.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/da.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/de.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/el.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/es.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/fi.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/fr.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/hi.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/hu.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/it.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ja.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ka.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ko.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/nl.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/pl.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/pt-br.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/ru.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/sv.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/tr.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/uk.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/vi.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/zh-hans.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/zh-hant.tsv is excluded by !**/*.tsv
Files selected for processing: 3

  • crates/engine/src/script/mod.rs
  • crates/ui-egui/src/i18n/tests.rs
  • docs/target-app-parity.md
Files skipped from review as they are similar to previous changes: 2

  • crates/engine/src/script/mod.rs
  • docs/target-app-parity.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

This branch has not been deployed

No deployments
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.

1 participant