Skip to content

Brushes: built-in library panels show brush names in the UI language - #7129

Merged
bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:fix/brush-library-names-translated
Nov 13, 2026
Merged

bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:fix/brush-library-names-translated

Conversation

@dotCooCoo

Copy link
Copy Markdown
Contributor

What and why

A built-in brush library's panel (Window › Brush Libraries) translated the library's title but listed its brushes by their English names in every UI language. Sixteen of the built-in brush names also had no row in any catalog: Notched Ribbon, Double Line, Wave, Teardrop, Striped Ribbon, Fine Nib, Broad Nib, Chisel, Round Pen, Pressure Pen, Beads, Dash Dot, Scallops, Stars, Triangles and Sparkles.

With this change, a built-in brush library's list rows, list tooltips and thumbnail tooltips show each brush's name in the UI language. Translating built-in brush names is VectorCraft's own rule:

  • LibraryKind (crates/ui-egui/src/panels/library_panel.rs) has a new label(id, name) hook that returns the name as it is by default, and rows now takes the library id. The panel draws the label; Row.name keeps the stored name for the tile, selection, clicks, drags, Add to Brushes and brush.addFromLibrary, so a brush still comes into the document under its English name.
  • BrushLibraries::label (crates/ui-egui/src/panels/brushes.rs) translates a name only when the library id is one of brushlib::BUILTIN. Brushes in User Defined and Other Library… libraries, and the document's Brushes panel, show names as they are stored.
  • Find in a built-in brush library matches the name shown or the English name.
  • The 16 missing names have a row in each of the 27 catalogs.
  • Swatch, graphic style and symbol library panels behave as before; their rows take the id unused.
  • docs/target-app-parity.md has one line for the rule.

The change alters existing behavior: in a UI language other than English, built-in brush library panels now list translated names instead of English ones.

How it was tested

New tests in vectorcraft-ui-egui:

  • i18n::tests::built_in_library_brush_names_are_in_complete_catalogs: every one of the 43 distinct brush names in the built-in libraries has a row in each complete catalog.
  • panels::tests_brush_libraries::built_in_library_brushes_are_listed_in_the_ui_language: in French, the Ink and Wash panel lists "Encre effilée" and not "Tapered Ink"; Find matches both "effil" and "tapered"; a library id outside the built-in set does not match the translation; a click adds "Tapered Ink" to the document and makes it the current brush; the document opened with Other Library… lists "Tapered Ink" unchanged. With BrushLibraries::label returning the stored name, it fails at its first list assertion.

Five existing tests pass the library id to rows at six call sites: two in tests_brush_libraries.rs, two in tests_style_libraries.rs, one in tests_symbol_libraries.rs and one in panels/library_panel/tests.rs.

Focused checks on the final tree, on Linux. The branch is one commit on main at 1dbdbce91f and merges cleanly with it. It conflicts with open #5439 in docs/target-app-parity.md.

  • cargo fmt --all -- --check
  • cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings
  • cargo check --workspace --tests
  • cargo test -p vectorcraft-ui-egui --lib i18n: 102 passed, 0 failed.
  • cargo test -p vectorcraft-ui-egui --lib for the brush, graphic style and symbol library tests and panels::library_panel::tests: 38 passed, 0 failed.
  • cargo xtask brands, cargo xtask layers (30 crates) and cargo xtask assets (337 files).
  • cargo xtask ci runs in this pull request's CI.

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.

A built-in brush library's panel now shows each brush's name in the UI
language in its list rows and tooltips, and Find matches either the
shown name or the English name. User Defined and Other Library...
libraries, and the document's Brushes panel, keep names as stored. A
click, a drag, Add to Brushes and brush.addFromLibrary still use the
English name, so the brush comes into the document under that name.

The shared library panel gets a label hook for this, and its rows take
the library id. The 16 built-in brush names that had no catalog row
(Notched Ribbon, Double Line, Wave, Teardrop, Striped Ribbon, Fine Nib,
Broad Nib, Chisel, Round Pen, Pressure Pen, Beads, Dash Dot, Scallops,
Stars, Triangles, Sparkles) get a row in each of the 27 catalogs, and a
test requires a row for every built-in brush name.
@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 cb061d6 and 9d87049.

Files ignored due to path filters: 27

  • crates/ui-egui/src/i18n/bg.tsv is excluded by !**/*.tsv
  • crates/ui-egui/src/i18n/bs.tsv is excluded by !**/*.tsv
  • 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/id.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: 11

  • crates/ui-egui/src/i18n/tests.rs
  • crates/ui-egui/src/panels/brushes.rs
  • crates/ui-egui/src/panels/graphic_styles.rs
  • crates/ui-egui/src/panels/library_panel.rs
  • crates/ui-egui/src/panels/library_panel/tests.rs
  • crates/ui-egui/src/panels/swatches/libraries.rs
  • crates/ui-egui/src/panels/symbols.rs
  • crates/ui-egui/src/panels/tests_brush_libraries.rs
  • crates/ui-egui/src/panels/tests_style_libraries.rs
  • crates/ui-egui/src/panels/tests_symbol_libraries.rs
  • docs/target-app-parity.md
  • 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
bflatastic merged commit 630ef6f into storytold:main Nov 13, 2026
7 checks passed
@bflatastic

Copy link
Copy Markdown
Member

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

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