fix(i18n): localize CachyOS app shortcuts and sync TR Fluent#223
fix(i18n): localize CachyOS app shortcuts and sync TR Fluent#223MorphyKutay wants to merge 8 commits intoCachyOS:developfrom
Conversation
- Add Fluent keys for Package Installer and Kernel Manager buttons - Use create_gtk_button + runtime locale updates for Applications row - Complete missing TR strings for DNS/custom apps (previous sync)
There was a problem hiding this comment.
Pull request overview
This PR improves Turkish (tr) localization coverage and fixes the “Applications” quick-launch buttons so they remain functional and update correctly when switching languages.
Changes:
- Adds missing Fluent keys to
i18n/tr/cachyos_hello.ftlto matchen, including new app shortcut labels. - Adds English fallback keys for the new app shortcut labels.
- Updates the Tweaks “Applications” buttons to use Fluent IDs/labels and to launch fixed binaries independent of the visible label text; updates language-switch logic to re-translate those buttons.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/pages/mod.rs |
Reworks app shortcut buttons to use Fluent labels and launch via a new spawn_cachyos_app helper; removes label-text-based dispatch. |
src/pages/i18n.rs |
Updates the translation refresh routine to also re-translate the app shortcut buttons on locale change. |
i18n/tr/cachyos_hello.ftl |
Adds missing Turkish translations (including DoH/custom DNS/Winboat/GPU booster strings and new app shortcut labels). |
i18n/en/cachyos_hello.ftl |
Adds fallback English keys for the new app shortcut labels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ptr1337 I’ve fixed the issues reported by Copilot. Could you please review again? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@ptr1337 All Copilot issues are resolved and the PR is ready. Waiting for your approval 🙌 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Replace unwrap() with if let Ok() in update_translation_fixes_section to avoid panic on non-Button widgets during locale refresh - Replace `_ => panic!` with `_ => continue` in update_translations to gracefully skip unknown widget names instead of crashing - Guard against empty widget_name in update_translation_apps_section to prevent passing an empty key to get_locale_text - Log a warning instead of silently skipping when a binary path resolved by which() is not valid UTF-8 in create_apps_section - Remove unused `use std::str` import from mod.rs
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ping Replace `_ => continue` with a tracing warn! call so that unknown widget names in the tweaks page match arm produce a visible log entry rather than being swallowed silently, making layout regressions and missing translations easier to detect.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mod.rs Add utils::is_kwin_wayland() mirroring the upstream helper so mod.rs no longer needs a direct subprocess::Exec import, resolving the merge conflict between our branch and upstream/develop on that import line. Replace the inline pgrep block in create_fixes_section with the new util.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
will you maintain those or AI ? |
|
I will maintain them. AI was only used as a helper, but I review and take responsibility for the translations. @vnepogodin |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Turkish localization changes
1.
i18n/tr/cachyos_hello.ftlGoal: Same set of keys as
i18n/en/cachyos_hello.ftl, with a Turkish value for every key that was missing.1.1 Keys that existed in
enbut not intr(all added)The following keys were added to
trto match English (summary of the Turkish copy):winboat-package-installedgpu-boosters-package-installedenable-dohdoh-tooltipdoh-blocky-install-failedcustom-dnsdhcp-automaticcustom-dns-ipv4/custom-dns-ipv6custom-dns-dot-hostnamecustom-dns-invalidcustom-dns-invalid-hostnamecustom-dns-doh-url/custom-dns-doh-url-requiredhttps://URLdns-check-hintwinboat-install-failedreset-keyrings-titleinstall-winboat-titleinstall-gpu-boosters-titleinstall-gpu-boosters-tooltip1.2 Tweaks → Applications row (new)
app-cachyos-pi-labelapp-cachyos-kernel-manager-label2.
i18n/en/cachyos_hello.ftlThis block was added to the fallback language so keys exist for all locales (missing locales fall back to English):
(Other DNS / Winboat / GPU / custom DNS strings were already in
en;trwas brought in line with them.)3.
src/pages/mod.rs(works with translated button labels)Issue: Buttons under “Applications” used hard-coded English labels. The old
on_appbtn_clickedlogic matched button label text; after localization the labels no longer matched, so clicks would break.Changes:
create_gtk_button!("app-cachyos-pi-label")andcreate_gtk_button!("app-cachyos-kernel-manager-label")— labels come entirely from Fluent.spawn_cachyos_app("cachyos-pi")andspawn_cachyos_app("cachyos-kernel-manager")— which binary to launch does not depend on the visible label, only on the fixed executable name.on_appbtn_clickedwas removed so behavior is independent of Turkish vs English label text.4.
src/pages/i18n.rs(language switch updates the buttons)Issue: Changing language from the menu did not refresh the two buttons on the Applications row.
Change: In
update_translation_apps_section, the code walks the horizontal box after the “Applications” label and, for eachgtk::Button, applieswidget_name→get_locale_text→set_label.5.
data/pages/tr/(readme/involved)Not modified in this work; Turkish page content was already aligned with
en. If English pages change later, diff againstdata/pages/en/and synctr.6. Summary
i18n/tr/cachyos_hello.ftli18n/en/cachyos_hello.ftlsrc/pages/mod.rssrc/pages/i18n.rsFluent layout:
i18n.toml(fallback_language = "en",assets_dir = "i18n").