Repository navigation
Speak English by default and Turkish on request - #7
Merged
Merged
Conversation
The interface was Turkish only. Every string is now English at the source and translated to Turkish: - ui/*.slint text goes through @tr, with the Turkish in a gettext catalog under lang/ that slint-build bundles into the executable. The catalog carries no msgctxt, so the build opts out of the component-name default context. - Text drawn from Rust (status line, preset names, tray menu, file dialogs) goes through i18n::t and a table in src/i18n.rs. Templates use {} slots filled in order, since the slot moves with the language. - Slider readouts follow the language's decimal separator; typed values are still accepted with either. Settings gain a Language section. A first run follows the Windows display language; an explicit choice switches the window, presets and tray menu at once and is stored in config.json. Tests fail on a string without a translation, on a translation nothing shows, and on mismatched placeholders. A headless window test proves the catalog is compiled in and that Slint and Rust switch together. The README screenshot now shows the English panel; the Turkish README and the Turkish view of the project page keep the Turkish one.
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.
The interface was Turkish only. It is now English at the source with a full Turkish translation, and a language setting.
What changes
ui/*.slinttext goes through@tr; the Turkish lives inlang/tr/LC_MESSAGES/talkdedsec-visual.poand is bundled into the executable at build time (no runtime files).i18n::tand a table insrc/i18n.rs.config.json.1.25/1,25); typed input accepts either.README.tr.mdand the Turkish view of the project page keep the Turkish one.Tests
@trstring has a catalog entry and every catalog entry is used; same for the Rust table.MainWindow, switches to Turkish and back, and checks the bound text and preset names.cargo fmt --check,cargo clippy --all-targets -D warningsandcargo test --all-targets(33 tests) pass locally.