Skip to content

fix(i18n): localize CachyOS app shortcuts and sync TR Fluent#223

Open
MorphyKutay wants to merge 8 commits intoCachyOS:developfrom
MorphyKutay:develop
Open

fix(i18n): localize CachyOS app shortcuts and sync TR Fluent#223
MorphyKutay wants to merge 8 commits intoCachyOS:developfrom
MorphyKutay:develop

Conversation

@MorphyKutay
Copy link
Copy Markdown

@MorphyKutay MorphyKutay commented Apr 13, 2026

Turkish localization changes


1. i18n/tr/cachyos_hello.ftl

Goal: 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 en but not in tr (all added)

The following keys were added to tr to match English (summary of the Turkish copy):

Key Turkish UI (summary)
winboat-package-installed Winboat packages already installed
gpu-boosters-package-installed GPU booster packages already installed
enable-doh Enable DNS over HTTPS (DoH)
doh-tooltip DoH via local blocky proxy description
doh-blocky-install-failed Failed to install blocky for DoH
custom-dns Custom
dhcp-automatic DHCP (automatic)
custom-dns-ipv4 / custom-dns-ipv6 Comma-separated address field labels
custom-dns-dot-hostname DoT hostname (optional)
custom-dns-invalid Enter at least one IPv4 or IPv6 address
custom-dns-invalid-hostname Invalid DoT hostname
custom-dns-doh-url / custom-dns-doh-url-required DoH URL fields / valid https:// URL
dns-check-hint After applying, verify DNS provider at (text before URL)
winboat-install-failed Failed to install Winboat
reset-keyrings-title Reset keyrings (was left in English before)
install-winboat-title Install Winboat
install-gpu-boosters-title Install GPU boosters
install-gpu-boosters-tooltip dmemcg-booster / plasma-foreground-booster on AMD or Intel GPUs

1.2 Tweaks → Applications row (new)

Key Turkish UI
app-cachyos-pi-label CachyOS Paket Kurucu
app-cachyos-kernel-manager-label CachyOS Çekirdek Yöneticisi

2. i18n/en/cachyos_hello.ftl

This block was added to the fallback language so keys exist for all locales (missing locales fall back to English):

# Tweaks page — quick launch (CachyOS apps)
app-cachyos-pi-label = CachyOS Package Installer
app-cachyos-kernel-manager-label = CachyOS Kernel Manager

(Other DNS / Winboat / GPU / custom DNS strings were already in en; tr was 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_clicked logic matched button label text; after localization the labels no longer matched, so clicks would break.

Changes:

  • create_gtk_button!("app-cachyos-pi-label") and create_gtk_button!("app-cachyos-kernel-manager-label") — labels come entirely from Fluent.
  • spawn_cachyos_app("cachyos-pi") and spawn_cachyos_app("cachyos-kernel-manager") — which binary to launch does not depend on the visible label, only on the fixed executable name.
  • on_appbtn_clicked was 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 each gtk::Button, applies widget_nameget_locale_textset_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 against data/pages/en/ and sync tr.


6. Summary

File Role in Turkish localization
i18n/tr/cachyos_hello.ftl All missing Fluent keys + application shortcut strings
i18n/en/cachyos_hello.ftl New English keys for application shortcuts
src/pages/mod.rs Labels from Fluent; click path safe for any language
src/pages/i18n.rs Refresh application buttons when locale changes

Fluent layout: i18n.toml (fallback_language = "en", assets_dir = "i18n").

- 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)
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ftl to match en, 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.

Comment thread src/pages/mod.rs Outdated
Comment thread src/pages/mod.rs Outdated
@MorphyKutay MorphyKutay marked this pull request as draft April 14, 2026 19:19
@MorphyKutay MorphyKutay marked this pull request as ready for review April 14, 2026 19:20
@MorphyKutay
Copy link
Copy Markdown
Author

@ptr1337 I’ve fixed the issues reported by Copilot. Could you please review again?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@MorphyKutay
Copy link
Copy Markdown
Author

@ptr1337 All Copilot issues are resolved and the PR is ready. Waiting for your approval 🙌

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/pages/i18n.rs
…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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@MorphyKutay
Copy link
Copy Markdown
Author

@ptr1337

@vnepogodin
Copy link
Copy Markdown
Member

will you maintain those or AI ?

@MorphyKutay
Copy link
Copy Markdown
Author

I will maintain them. AI was only used as a helper, but I review and take responsibility for the translations. @vnepogodin

@MorphyKutay MorphyKutay requested a review from Copilot April 28, 2026 19:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/pages/mod.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/utils.rs
Comment thread src/pages/mod.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread i18n/tr/cachyos_hello.ftl
Comment thread i18n/tr/cachyos_hello.ftl
Comment thread i18n/tr/cachyos_hello.ftl Outdated
Comment thread src/pages/mod.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/pages/mod.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/pages/mod.rs Outdated
Comment thread src/pages/mod.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/pages/mod.rs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants