Skip to content

i18n: the "select a path" reason is translated in every complete-message language - #7214

Merged
bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:fix/i18n-select-a-path-reason
Nov 14, 2026
Merged

bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:fix/i18n-select-a-path-reason

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What and why

When the selection holds no path, the path commands that need one (path.reverse, path.join, path.average, path.averageJoin, object.path.simplify, object.path.smooth, object.path.addAnchorPoints, object.path.divideObjectsBelow and object.path.splitIntoGrid) are unavailable, and the engine gives the reason select a path (crates/engine/src/cmd.rs:212; the stored-selection check at crates/engine/src/cmd/select.rs:569 gives the same reason). Where that reason is shown, for example in the status bar inside "command path.reverse is not available right now: select a path", it stayed in English in 21 of the 23 languages in COMPLETE_MESSAGES. Only Hindi and Swedish had an @msg row for it; the other catalogs had only the longer Divide Objects Below: select a path row, which does not match the bare reason.

  • Each of the 21 catalogs (ca, cs, de, el, es, fi, fr, hu, it, ja, ka, ko, nl, pl, pt-br, ru, tr, uk, vi, zh-hans, zh-hant) gets one @msg row for select a path, placed after its Divide Objects Below: select a path row and using the same wording that row already uses.
  • The engine's English text is unchanged, and so are the no document open and nothing selected reasons and the longer Divide Objects Below and mesh messages.

The untranslated-message report only prints gaps, so nothing failed while these rows were missing. The new test makes a missing row fail for this message.

How it was tested

New test i18n::tests::selected_path_reason_is_translated (crates/ui-egui/src/i18n/tests.rs): it checks that the source scan lists select a path; that path.reverse on a selection of type alone returns EngineError::Disabled with "command path.reverse is not available right now: select a path", unchanged in English; and that every language in COMPLETE_MESSAGES has an exact @msg row for the reason, that the row differs from the English, and that both the reason alone and the whole disabled error are shown translated. It fails without the change (cs: no @msg row for "select a path"), and fails again if the nl row is removed.

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

  • cargo fmt --all -- --check
  • cargo test -p vectorcraft-ui-egui --lib i18n: 104 passed, 0 failed.
  • cargo check --workspace --tests

On the same change with main at 10c84a909ec, also on Linux (since then main changed only other rows of these catalogs, and no lint, xtask or i18n test rule):

  • cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings
  • cargo xtask brands, cargo xtask layers (30 crates) and cargo xtask assets (337 files).

cargo xtask ci runs in this pull request's CI.

cargo xtask ci passed in this pull request's CI run on bf05693305: https://github.com/storytold/vectorcraft/actions/runs/43523679709/job/132224043007

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.

…language

Object › Path's commands that need a path (Reverse Path Direction, Join,
Average, Simplify, Smooth, Add Anchor Points, Divide Objects Below, Split
Into Grid) report "select a path" when the selection holds no path, and
Select Path's stored selection reports it with nothing selected. Only the
Hindi and Swedish catalogs had a row for it, so the status bar showed the
reason in English in the other 21 languages that translate every message.

- Add the row to cs, de, el, es, fr, hu, it, ja, ka, ko, pl, pt-br, ru,
  uk, vi, zh-hans, zh-hant, fi, tr, ca and nl, using each catalog's
  wording from its "Divide Objects Below: select a path" row.
- Add a test that requires the exact row in every complete-message
  catalog and checks the translated reason inside the disabled-command
  error that path.reverse returns for a selection of type alone.
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 28bd9c9 and bf05693.

Files ignored due to path filters: 21

  • 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/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/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/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: 1

  • crates/ui-egui/src/i18n/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@bflatastic

Copy link
Copy Markdown
Member

Thanks @dotCooCoo, this is approved and CI was green, but main has since changed files this PR touches, so that run no longer covers it. Could you merge main (or rebase) so CI runs on current main? I'll merge it once it's green.

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

@bflatastic Merged main in (bf05693).

dotCooCoo added a commit to dotCooCoo/vectorcraft that referenced this pull request Nov 13, 2026
…torytold#7116 add

Open storytold#7211, storytold#7214 and storytold#7116 add French rows for 38 of the messages this
branch translates. A second row for the same key fails
bundled_catalogs_are_consistent once both sides merge, so this branch
drops its 38 rows and leaves those messages to the other pull requests.
The French row of docs/localization-parity.md gives the new counts.
dotCooCoo added a commit to dotCooCoo/vectorcraft that referenced this pull request Nov 13, 2026
…torytold#7116 add

Open storytold#7211, storytold#7214 and storytold#7116 add German rows for 38 of the messages this
branch translates. A second row for the same key fails
bundled_catalogs_are_consistent once both sides merge, so this branch
drops its 38 rows and leaves those messages to the other pull requests.
The German lines in docs/localization-parity.md and
docs/target-app-parity.md give the new counts.
dotCooCoo added a commit to dotCooCoo/vectorcraft that referenced this pull request Nov 14, 2026
…torytold#7116 add

Open storytold#7211, storytold#7214 and storytold#7116 add Japanese rows for 38 of the messages this
branch translates. A second row for the same key fails
bundled_catalogs_are_consistent once both sides merge, so this branch
drops its 38 rows and leaves those messages to the other pull requests.
The Japanese lines in docs/localization-parity.md and
docs/target-app-parity.md give the new counts.
dotCooCoo added a commit to dotCooCoo/vectorcraft that referenced this pull request Nov 14, 2026
…torytold#7116 add

Open storytold#7211, storytold#7214 and storytold#7116 add Spanish rows for 38 of the messages this
branch translates. A second row for the same key fails
bundled_catalogs_are_consistent once both sides merge, so this branch
drops its 38 rows and leaves those messages to the other pull requests.
The Spanish lines in docs/localization-parity.md and
docs/target-app-parity.md give the new counts.
dotCooCoo added a commit to dotCooCoo/vectorcraft that referenced this pull request Nov 14, 2026
… pull requests

The Japanese row of docs/localization-parity.md marks its messages as
partial and names the 38 messages the untranslated report lists without a
row: the 36 composite font errors that open storytold#7211 translates, "select a
path" (open storytold#7214) and the justification order error (open storytold#7116). It
also names the three rows that do not match their message yet and why.
The Japanese line in docs/target-app-parity.md says the catalog has a
row for each reported message except those 38.
@bflatastic
bflatastic merged commit 71cef8a into storytold:main Nov 14, 2026
7 checks passed
@bflatastic

Copy link
Copy Markdown
Member

Merged, thanks @dotCooCoo! It passed its CI checks.

bflatastic pushed a commit that referenced this pull request Nov 14, 2026
…essages the untranslated report lists

pt-br is in COMPLETE_MESSAGES, but the untranslated report listed 1,851
status and error messages with no pt-br row, so with the interface in
Brazilian Portuguese those messages showed in English.

- pt-br.tsv gains 1,812 `@msg` rows. The translations are VectorCraft's
  own, written from the English meaning with the catalog's terms.
  Placeholders, backticked names, command ids, parameter names,
  double-quoted values and bare true, false and null stay as the English
  writes them.
- The 39 messages that open #7211, #7214, #7116 and #7330 add pt-br rows
  for are left out. bundled_catalogs_are_consistent rejects a second row
  for the same key.
- The Portuguese row of docs/localization-parity.md gives the catalog's
  counts: 9,260 rows, 3,445 of them `@msg` and 48 `@msgplural`.
bflatastic pushed a commit that referenced this pull request Nov 14, 2026
uk is in COMPLETE_MESSAGES, but the untranslated report listed status
and error messages with no Ukrainian row, so with the interface in
Ukrainian those messages showed in English.

- uk.tsv gains 1,811 `@msg` rows. The translations are VectorCraft's
  own, written from the English meaning with the catalog's terms and
  typography (« » around interface names, ’ inside words).
  Placeholders, backticked names, command ids, double-quoted values and
  bare true, false and null stay as the English writes them.
- The 41 rows that open #7211, #7214, #7116, #7330 and #817 add to
  uk.tsv are left out, so the catalog keeps one row per key when they
  merge (bundled_catalogs_are_consistent rejects a second row for a
  key).
- The Ukrainian row of docs/localization-parity.md gives the catalog's
  counts.
bflatastic pushed a commit that referenced this pull request Nov 14, 2026
…ort lists

The Polish catalog lacked a row for 1,854 of the status and error
messages that the untranslated report finds in the sources, so the
status bar showed those messages in English.

- pl.tsv gains 1,808 `@msg` rows: the errors of commands and their
  parameter checks, scripts, file import and export, printing and
  plug-ins. The translations are VectorCraft's own, written from the
  English meaning with the catalog's conventions and its existing
  feature names. Placeholders, parameter names, command ids and
  literal values stay as the English writes them.
- 44 of the others get their Polish rows from open #7211, #7214,
  #7116, #7330 and #1931, so this change leaves them out. 2 are
  messages that no catalog has a row for yet. Menu strings, `tl!`
  literals, undo labels and swatch names are unchanged.
- Two of the messages have two placeholders in a row. The catalog does
  not load such a row, so those two are still shown in English.
- The Polish row of docs/localization-parity.md gives the catalog's
  current counts.

Docs: docs/target-app-parity.md, docs/localization-parity.md.
bflatastic pushed a commit that referenced this pull request Nov 14, 2026
… report lists

The Traditional Chinese catalog had no row for 1,852 of the status and
error messages that i18n::tests::untranslated_report finds in the
sources, so the status bar showed them in English.

- zh-hant.tsv gets 1,813 @msg rows under one comment line at the end of
  the file, written in Taiwan usage with the catalog's existing terms.
  Each row keeps the English key, its placeholders, doubled braces,
  parameter names, command ids and quoted values unchanged.
- The 38 rows that open #7211, #7116 and #7330 add, and the row #7214
  added, are left out, so the catalogs stay consistent.
- docs/localization-parity.md and docs/target-app-parity.md give the new
  counts: 3,438 @msg and 48 @msgplural rows, 40 messages still listed.

The rows for `{name} must be {lo}–{hi}{unit} (got {v})` and
`unknown parameter `{within}{key}`; {why}` are counted by the report, but
Template::parse does not load a template with two placeholders in a row,
so those two messages still show in English. The row for
`{k} has control characters{_1}` does not match the message for a
multi-line File Info field, where its last placeholder is empty.
bflatastic pushed a commit that referenced this pull request Nov 14, 2026
The Korean catalog lacked a row for 1,852 of the status and error
messages that the untranslated report finds in the sources, so the
status bar showed those messages in English. ko.tsv now has an @msg
row for 1,813 of them: the errors of commands and their parameter
checks, scripts, file import and export, printing and plug-ins.

The other 39 are messages that open #7211, #7214, #7116 and #7330
also translate in ko.tsv. They are left out so the catalog has no
duplicate key when those pull requests merge.

The rows keep every placeholder, parameter name, command id and
literal value of the English, and use the feature names the catalog
already has.

The report's Korean menu strings, tl! strings, undo labels and swatch
names are unchanged.

Docs: docs/localization-parity.md, docs/target-app-parity.md.
bflatastic pushed a commit that referenced this pull request Nov 14, 2026
The Japanese row in docs/localization-parity.md said every message is
translated, and the Japanese catalog line in docs/target-app-parity.md
said 38 messages were missing, one of them waiting on #7214, which has
merged. On main the untranslated report lists 98 messages without a
Japanese row, 77 of which every complete-message language lacks. Both
lines now give the counted rows and the report's count, and name the
open pull requests that translate part of them.
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