Repository navigation
i18n: add Brazilian Portuguese interface (stacked on #34) - #259
Draft
RicSchonfelder wants to merge 2 commits into
Draft
RicSchonfelder wants to merge 2 commits into
RicSchonfelder wants to merge 2 commits into
Conversation
Co-authored-by: Codex <noreply@openai.com>
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.
RicSchonfelder
force-pushed
the
i18n/pt-br
branch
from
October 12, 2026 17:27
72397ea to
9972727
Compare
anishguduru
pushed a commit
to anishguduru/deckcraft
that referenced
this pull request
Oct 16, 2026
…torytold#259) The page view's ScrollArea had no id of its own, so egui derived it from the parent Ui, which is the same for every document. All tabs therefore shared one scroll offset: switching to another document showed it at wherever the previous one had been scrolled to (clamped to its length), and switching back showed the first document at the other one's offset, usually the top. Salt the ScrollArea with the document's id so egui keeps one offset per tab. Test: viewer.rs::each_document_keeps_its_own_scroll_position scrolls a.pdf to page 4, switches to b.pdf and scrolls it to page 2, then switches back and forth: before the fix b.pdf opened on page 2 instead of its own top. Cited as evidence on view.document-tabs. Co-authored-by: wstock <1394687+wstock@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
anishguduru
pushed a commit
to anishguduru/deckcraft
that referenced
this pull request
Oct 16, 2026
…sion scrolled (storytold#554) Opening a PDF after a restart showed it part-way down, at the page some other document had been left on in the previous session. Since storytold#259 (storytold#189) the page view's ScrollArea is salted with the document's DocId, so each tab keeps its own offset. eframe persists egui's memory (persist_egui_memory defaults to true) to app.ron every 30 s and on quit, scroll offsets included, and restores it at the next launch. DocIds start again at 1 every launch, so the first document opened inherited the offset stored under id 1 last time, the second the one under id 2, and so on. A DocView now notes when its page view is first shown, and that frame sets the scroll offset to zero. Navigation queued before the first frame still wins: a zoom anchor or `goto` (--page, the PDF's open action, reopening the last session's files at their pages, storytold#462) is applied on top. Tabs that were already shown keep their own position, as storytold#189 needs. egui's other persisted memory (panel sizes and the like) is untouched. - canvas: `DocView::shown`, reset of the offset on the first frame - tests/viewer.rs: a_new_document_opens_at_the_top_after_a_relaunch saves egui's memory through eframe's own RON storage path after scrolling a.pdf to page 4, restores it in a new app, opens c.pdf (DocId 1) and checks it starts on page 1 (it opened on page 4 before the fix) and then keeps its own position - parity: the test is evidence on view.document-tabs Refs storytold#189, storytold#259, storytold#462. Co-authored-by: lloyd <lloyd@stackworx.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #34 (the Ukrainian catalog and language selection): this branch is based on that work and adds only the Brazilian Portuguese delta. It should merge after #34 — once #34 is in
main, the diff of this pull request is just this language.What this adds
crates/ui-egui/src/i18n/pt-br.tsv— 1,232 rows, translated from the same English sources asuk.tsv(every key, so nothing falls back to English).Language::PtBrwith itsapp.languagecode (pt-BR), locale mapping (pt,pt-BR,pt_BR.UTF-8,pt-PT…) and labelPortuguês (Brasil); Preferences ▸ Interface language lists it.i18n::countnow carries the forms of both languages:uk=one|few|many,pt=one|other(CLDR: 0 and 1 areone).pt-BRgets the same guarantees as Ukrainian: unique keys, non-empty values, preserved placeholder names and order, and command/menu/gallery/literal-call coverage. A bundled-font test covers the catalog's accented letters.ukrainian_interface_previewscreenshot test now also renderspt-BR.Testing
cargo test -p deckcraft-ui-egui— 23 passed, 0 failed (1 ignored).cargo clippy -p deckcraft-ui-egui --all-targets -- -D warnings— clean.cargo xtask assets— all asset files attributed (row forpt-br.tsvadded).cargo fmt --all -- --check— clean.cargo check -p deckcraft -p deckcraft-cli— clean.Notes
ATTRIBUTION.md,ROADMAP.md,docs/localization-parity.md,docs/gaps.md,docs/roadmap.md,docs/target-app-parity.md.