Skip to content

UI: Czech for the application shell - #555

Open
NikitkaRa wants to merge 1 commit into
storytold:mainfrom
NikitkaRa:cursor/cs-shell-7e0f
Open

NikitkaRa wants to merge 1 commit into
storytold:mainfrom
NikitkaRa:cursor/cs-shell-7e0f

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Summary

  • Preferences offers System, English and čeština. The choice is saved in the UI state and can also be set with app.language (system, en or cs).
  • System follows a cs or cs-CZ locale. Slovak (sk) stays English. On the web build, System stays English until the user picks a language.
  • The choice translates the ribbon tabs, File menu, title bar, status bar and Preferences, 67 strings in all. Ribbon groups, the other dialogs and command ids stay English.

Test plan

  • Catalog tests check that ids are sorted, placeholder names match, cs-CZ resolves to čeština while sk does not, and an unknown saved code falls back to System.
  • A UI test checks that app.language cs renames the File tab to Soubor and Preferences to Předvolby, that sk is rejected, and that en brings File back.
  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, assets, layers and the wasm check pass.
  • cargo test --workspace passes, apart from three font tests that already fail here because craft-fonts is not installed: symbol_font_characters_draw_in_the_sym_font, korean_composes_in_the_notes_pane and cjk_text_in_the_interface_is_drawn_with_real_glyphs.
  • On a Mac set to čeština, launch DeckCraft and check that the tabs and File menu come up in Czech without opening Preferences.

Closes #162

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
* M3: rasters reach egui without a copy on the UI thread

Every page, tile and thumbnail raster was copied pixel by pixel on the UI
thread (`ColorImage::from_rgba_premultiplied`), because egui's `Color32` is
4-byte aligned and a `Vec<u8>` isn't. That is 0.5 ms per 1024² tile, 5.4 ms
for a 33 MB page and 36 ms for a 197 MB page, against a 16.7 ms frame.

hayro, vendored patch 7: `render_size` and `render_into` render into a buffer
the caller allocates. `render` is `render_into` on a new pixmap, so its output
is unchanged. pdfcraft-render renders straight into `Pixels`, the same
premultiplied RGBA bytes kept in one 4-byte word per pixel. `Pixels`
dereferences to `[u8]`, so every reader of `RenderedPage::rgba` compiles
unchanged. The canvas reinterprets the words as `Color32`s and hands them to
egui as they are.

Pixels are identical: all 33 renders of storytold#260's test file hash the same. The
UI-thread copy is gone, and rendering a 6182×8000 page takes 67 ms instead of
71–76 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* M3: render_into leaves a buffer of the wrong length untouched instead of reaching vello's assert

* M3: regression test for render_into with a wrong-length buffer

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
The window had no string catalog, so a system language or an explicit
choice could not change what it says. Preferences now offers System,
English and čeština. System follows a cs or cs-CZ locale. The ribbon
tabs, File menu, title bar, status bar and Preferences use that
choice. Ribbon groups and the other dialogs stay in English.

Closes storytold#162

Co-authored-by: Cursor <cursoragent@cursor.com>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ReviewerA — source-read COMMENT (not an approval)

I read the head of the diff: Czech for the application shell. The lock gains sys-locale 0.3.2 (a small crate that reads the operating system's locale), which the same author's Japanese, Korean, Indonesian, Vietnamese and Simplified Chinese PRs (deckcraft#543, #548, #575, #579, #538) also add. Six PRs each add the same dependency and presumably the same language-selection code, so they cannot all be right: they should be stacked on one PR that introduces the dependency and the selection mechanism, and each language should then be its own small catalogue. The catalogue needs a native check and a statement of who translated it and whether a tool helped. sys-locale is a small crate that uses libc. I have not run it, and no exact-head CI result exists for this head. Nothing was run.

I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.

Status: waiting_author.

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.

Czech (cs) interface translation

2 participants