Skip to content

Add selectable interface language support - #100

Merged
maniacx merged 1 commit into
maniacx:mainfrom
asychin:feat/add-lang-support
Sep 12, 2026
Merged

maniacx merged 1 commit into
maniacx:mainfrom
asychin:feat/add-lang-support

Conversation

@asychin

@asychin asychin commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Add a language selector with English, Russian, and non-empty translation catalogs, including partially translated locales. Persist the selection before gettext initialization, add a complete Russian translation credited to Andrey Sychin, ensure GSettings schema compilation, and preserve icon loading in development builds.

@p-bo

p-bo commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hello,
foremost, just another user there (and as that one, thankful to any contribution to this app!).

Just as app is translated on continuous translation system (https://hosted.weblate.org/projects/budslink/), hardcoded list of languages could (hopefully) get outdated quickly (and repeatedly).

If (one of?) use case(s) for this is to avoid insufficient translations, maybe more direct solution for users could be to fix it on Weblate (it's really easy!) by their-selves perhaps?

But once again, no opposition to this - just aim to get know motivation and support it :-)

@p-bo

p-bo commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

P.S.: self-service
https://hosted.weblate.org/projects/budslink/budslink/ru/#upload
(link corrected - sorry for previous bad one)

@asychin

asychin commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

P.S.: self-service https://hosted.weblate.org/projects/budslink/budslink/ru/#upload (link corrected - sorry for previous bad one)

Done, bro, https://hosted.weblate.org/projects/budslink/budslink/ru/

изображение

@maniacx

maniacx commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Thanks @asychin

This is a great feature.
Just need some clarity on the feature i have marked for review.
https://github.com/maniacx/BudsLink/pull/100/changes#r3960501162
https://github.com/maniacx/BudsLink/pull/100/changes#r3960512666

I do not think we need those.

I also tried implementing runtime language switching using this patch.
But I could not find any information or documentation on whether initGettext() must strictly be called before the application starts, although it does work when called at a later stage. And I do not really have time to work on it.

git am
0001-incomplete_patch.patch

Also I think it will be better to use an Adw alert dialog confirming if user want to change
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1.7/class.AlertDialog.html

If you have the time to improve on it let me know. Or else I can merge your pull request as it is good enough for upcoming release.

Thanks

Add a language selector with English, Russian, and non-empty translation catalogs, including partially translated locales. Persist the selection before gettext initialization, add a complete Russian translation credited to Andrey Sychin, ensure GSettings schema compilation, preserve icon loading in development builds, and confirm language changes with an Adw.AlertDialog using existing translatable strings.
@asychin
asychin force-pushed the feat/add-lang-support branch from 17ab009 to 078ca69 Compare September 9, 2026 08:31
@asychin

asychin commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@maniacx

replaced the restart toast with an Adw.AlertDialog as you suggested. the dialog uses the existing translatable strings (Language, Restart required to apply language change, Cancel, OK), so it doesnt add any new translation work for other locales.
about the runtime language switching patch — i would prefer to keep the current approach that sets LANGUAGE before initGettext(), cause its simple, reliable, and avoids reloading or re-translating the whole ui at runtime. happy to revisit the runtime approach later, but for the upcoming release the current implementation should be good enough.
the two review links you shared seem to point to comments that no longer load (probably due to the force push). could you re-post or paste the text of those two points? i want to make sure i address them correctly.
if the Adw.AlertDialog is the main improvement you wanted, feel free to merge it as-is for the upcoming release

@maniacx

maniacx commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Thank @asychin
Was busy so could not visit this sooner.
I will merge this. and remove the code regarding those 2 points.

@maniacx
maniacx merged commit a929dfd into maniacx:main Sep 12, 2026
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