Skip to content

Speak English by default and Turkish on request - #7

Merged
Talkdedsec merged 1 commit into
mainfrom
i18n/english-turkish
Oct 5, 2026
Merged

Talkdedsec merged 1 commit into
mainfrom
i18n/english-turkish

Conversation

@Talkdedsec

Copy link
Copy Markdown
Owner

The interface was Turkish only. It is now English at the source with a full Turkish translation, and a language setting.

What changes

  • ui/*.slint text goes through @tr; the Turkish lives in lang/tr/LC_MESSAGES/talkdedsec-visual.po and is bundled into the executable at build time (no runtime files).
  • Text drawn from Rust — status line, preset names, tray menu, file dialogs — goes through i18n::t and a table in src/i18n.rs.
  • Settings → Language: English / Türkçe. A first run follows the Windows display language; an explicit choice switches the window, presets and tray menu immediately and is saved in config.json.
  • Slider readouts use the language's decimal separator (1.25 / 1,25); typed input accepts either.
  • README screenshot shows the English panel; README.tr.md and the Turkish view of the project page keep the Turkish one.

Tests

  • Every @tr string has a catalog entry and every catalog entry is used; same for the Rust table.
  • Placeholder counts match between English and Turkish.
  • A headless window test (Slint testing backend) builds the real MainWindow, switches to Turkish and back, and checks the bound text and preset names.
  • Store: language round-trips; configs written before this change still load.

cargo fmt --check, cargo clippy --all-targets -D warnings and cargo test --all-targets (33 tests) pass locally.

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.
@Talkdedsec
Talkdedsec merged commit 900bebb into main Oct 5, 2026
1 check passed
@Talkdedsec
Talkdedsec deleted the i18n/english-turkish branch October 5, 2026 10:41
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.

1 participant