Skip to content

Add Ukrainian interface translation and language selection - #34

Closed
dmatviichuk wants to merge 1 commit into
storytold:mainfrom
dmatviichuk:i18n/ukrainian
Closed

dmatviichuk wants to merge 1 commit into
storytold:mainfrom
dmatviichuk:i18n/ukrainian

Conversation

@dmatviichuk

@dmatviichuk dmatviichuk commented Oct 9, 2026 •

Copy link
Copy Markdown

DeckCraft currently displays its interface only in English. This adds Ukrainian across the ribbon, command palette, menus, panels, dialogs, tooltips, start screen, presenter controls, notices, empty-placeholder hints, and desktop/browser file picker labels.

Preferences now offers System language, English, and Українська. Ukrainian OS/browser locales select Ukrainian automatically; explicit desktop choices persist in ui.json. Command IDs, presentation content, custom layout prompts, file names, font names, and contributor identities retain their original values.

Closes #30. Related to #15.

  • Add an English fallback and a 1,229-entry Ukrainian catalog at explicit UI boundaries, preserving placeholder names, order, and formatting.
  • Handle Ukrainian integer counts, retain compatibility with existing preferences, and expose app.language for UI/control access.
  • Use the existing openly licensed font fallback, with a regression covering every Cyrillic catalog character plus ҐґЄєІіЇї without system fonts.
  • Add coverage for command/menu/gallery metadata and literal translation calls, plus document-preservation, locale, placeholder, and renderer/cache regressions.

Validation:

  • cargo xtask ci passes all six gates: fmt, clippy, workspace tests, assets, layers, and WASM.
  • cargo check -p deckcraft-web --target wasm32-unknown-unknown passes for the browser entry point.
  • English/Ukrainian headless editor, Preferences, and Insert Table views were rendered and inspected locally. No new Markdown files or screenshots are included.
  • VESUM Hunspell 6.8.6 checked 2,576 Cyrillic tokens (1,147 unique). Five flagged surface forms were reviewed: Git коміт inflections, supported by Ukrainian Pro Git, and typographic пт (пункт). Other flagged wording was corrected after ULIF dictionary and contextual review. Dictionary/checker data remains external and is not shipped.

As with existing web preferences, a manual browser language choice lasts for the current session. Uncatalogued engine diagnostics retain English fallback. Dictionary checks validate spelling and inflections; they do not certify every sentence's grammar or technical meaning.

@RicSchonfelder

Copy link
Copy Markdown

I added a Brazilian Portuguese catalog stacked on this work: #259 (draft).

It is based on this branch and adds only the pt-BR delta — crates/ui-egui/src/i18n/pt-br.tsv (1,232 rows, same English keys as uk.tsv), the Language::PtBr variant and the Portuguese count forms. The catalog/coverage tests now run against every catalog, so pt-BR is checked the same way as Ukrainian.

Once this PR lands, #259 should be rebased onto main and its diff becomes just the new language. Thanks for the catalog infrastructure — it made adding a language a small change.

RicSchonfelder added a commit to RicSchonfelder/deckcraft that referenced this pull request Oct 12, 2026
Add crates/ui-egui/src/i18n/pt-br.tsv (1,232 rows, translated from the
same English sources as uk.tsv) and the Portuguese (Brazil) choice:
Language::PtBr with its code, locale mapping (pt-*), label and `count`
forms (CLDR: 0 and 1 are one, 2 and up other).

The catalog tests now cover every catalog — unique keys, non-empty
values, preserved placeholder names and order — and the coverage tests
assert command, menu, gallery and literal-call coverage for pt-BR too.
A bundled-font test covers the catalog's accented letters.

Stacked on storytold#34: based on the Ukrainian catalog and language selection,
this commit adds only the pt-BR delta. Docs updated: ATTRIBUTION.md,
ROADMAP.md, docs/localization-parity.md, docs/gaps.md, docs/roadmap.md
and docs/target-app-parity.md.

Translated from DeckCraft's English strings with AI assistance; no
proprietary localization resources were copied.
@dmatviichuk

Copy link
Copy Markdown
Author

@echelon @bflatastic can you take a look please

@brzuchal

brzuchal commented Oct 13, 2026 •

Copy link
Copy Markdown

@dmatviichuk a heads-up from the Polish catalog stacked on this branch (#199). Today's main adds 40 labels that the catalog tests now require in every catalog:

To get #199 green after merging main, I added both the Polish and the Ukrainian entries, appended at the end of each file in brzuchal@531c4e6. Feel free to take the uk.tsv lines when you merge main here.

I'm not a Ukrainian speaker. I followed the catalog's existing terms ("Виноска: …", "Стрілка: …", a capital letter after the colon, ліворуч/праворуч), but please correct anything that reads wrong. I'll carry your wording over to #199.

The same 40 keys will apply to the Brazilian Portuguese catalog in #259 (cc @RicSchonfelder).

On this machine ime_tests::cjk_text_in_the_interface_is_drawn_with_real_glyphs fails on plain main too: the 简体 glyphs are missing from the borrowed system font. So it is not caused by the catalogs.

chetto1983 pushed a commit to chetto1983/Aura that referenced this pull request Oct 24, 2026
DeckCraft 0.10.0 has ~1,050 interface strings as literals and no catalog.
The one catalog upstream has written, storytold/deckcraft#34, is a single
commit on f448576, 928 commits behind v0.10.0, and still open. Upstream
ships every two to three days (eight tags 2026-10-08..22), so a catalog
in aura's patch would be rebased by hand on each release. The operator
chose to ask upstream and to add only an it.tsv once a catalog lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018E3w3LBM5cjRDpp5iwW4w7
JaebeenAhn pushed a commit to JaebeenAhn/deckcraft that referenced this pull request Oct 27, 2026
@JaebeenAhn

Copy link
Copy Markdown

I added a Korean (ko / ko-KR) interface localization and CJK UI font fallback stacked on this work:

What this adds

  • crates/ui-egui/src/i18n/ko.tsv: 1,232 entries matching the exact key set and placeholder structure of uk.tsv, written from DeckCraft's English UI strings using standard Korean presentation terminology.
  • crates/ui-egui/src/i18n.rs, lib.rs, dialogs.rs: Adds Language::Ko (한국어, code ko, locales ko, ko-KR, ko_KR.UTF-8), InterfaceLanguagePreference::Korean in Preferences ▸ Interface language, and Korean integer count formatting ({count}개).
  • crates/ui-egui/src/theme.rs: Adds system Korean UI font fallback (Pretendard / Malgun Gothic on Windows, AppleGothic on macOS, NanumGothic on Linux) in install_fonts so Hangul syllables (U+AC00..U+D7A3) render cleanly in egui without missing-glyph boxes.
  • ATTRIBUTION.md & docs/localization-parity.md: Adds attribution for ko.tsv and updates the twelve-key-languages table for Korean (ko).

Validation

  • cargo test -p deckcraft-ui-egui i18n::tests -- --include-ignored — 7 passed, 0 failed (including catalog_is_unique_complete_and_preserves_placeholders, �ll_command_menu_and_gallery_labels_are_translated, every_literal_translation_call_has_a_catalog_entry, and headless preview rendering for ko-editor.png, ko-preferences.png, and ko-table.png).
  • cargo build --release -p deckcraft -p deckcraft-cli — verified on Windows x64.

Once #34 lands in main, I am happy to open a standalone rebased PR (or feel free to cherry-pick �32a78ff10ee56c6197a6de27b34cd8b9aaa9d29 directly). Thanks @dmatviichuk for the clean localization architecture!

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.

Add Ukrainian interface translation

4 participants