Re: KStars: Cannot change language
El divendres, 21 de juny del 2024, a les 19:53:04 (CEST), Albert Astals Cid va escriure: > El divendres, 21 de juny del 2024, a les 10:31:50 (CEST), Jasem Mutlaq va > > escriure: > > Hello, > > > > We have an issue with the recent versions of KStars is that language > > cannot > > be switched by users. This affects MacOS, Windows, and Linux, whether > > packaged or built from source. > > > > How to debug this issue? I can't see anything in the logs about the > > language switch issue. For example, I tried changing the language to > > German > > but the interface is still in English. Which component of KDE Frameworks > > is > > handling this at the backend? Any environment variables to check or watch > > out for? > > > > Any pointers would be appreciated. > > Starting kstars says > > kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: > "Count of captures stored for the job, based on its sequence job.\nThis is > a summary, additional specific frame types may be required to complete the > job." msgid_plural: "" msgctxt: "" > > > Fixed by > > https://invent.kde.org/education/kstars/-/merge_requests/1266 > > This fixes the issue. Ah i see you fixed it in a bit more rudimentary way, that also works I guess. Cheers, Albert > > Cheers, > Albert > > > -- > > Best Regards, > > Jasem Mutlaq
Re: KStars: Cannot change language
El divendres, 21 de juny del 2024, a les 10:31:50 (CEST), Jasem Mutlaq va escriure: > Hello, > > We have an issue with the recent versions of KStars is that language cannot > be switched by users. This affects MacOS, Windows, and Linux, whether > packaged or built from source. > > How to debug this issue? I can't see anything in the logs about the > language switch issue. For example, I tried changing the language to German > but the interface is still in English. Which component of KDE Frameworks is > handling this at the backend? Any environment variables to check or watch > out for? > > Any pointers would be appreciated. Starting kstars says kf.i18n: KLocalizedString: Using an empty domain, fix the code. msgid: "Count of captures stored for the job, based on its sequence job.\nThis is a summary, additional specific frame types may be required to complete the job." msgid_plural: "" msgctxt: "" Fixed by https://invent.kde.org/education/kstars/-/merge_requests/1266 This fixes the issue. Cheers, Albert > > -- > Best Regards, > Jasem Mutlaq
Re: KStars: Cannot change language
On Freitag, 21. Juni 2024 10:31:50 CEST Jasem Mutlaq wrote: > We have an issue with the recent versions of KStars is that language cannot > be switched by users. This affects MacOS, Windows, and Linux, whether > packaged or built from source. > > How to debug this issue? I can't see anything in the logs about the > language switch issue. For example, I tried changing the language to German > but the interface is still in English. Which component of KDE Frameworks is > handling this at the backend? Any environment variables to check or watch > out for? > > Any pointers would be appreciated. On Sonntag, 2. Juni 2024 13:36:58 CEST I wrote in reply to your previous message with subject "Re: Cannot change language": I have just built the current master version (which calls itself 3.7.1 Stable) with KDE Frameworks 5.115.0 and Qt 5.15.12 (on openSUSE Tumbleweed). I could switch the language (via Help -> Configure Language) to different languages. I have built kstars without the optional dependencies INDI, Nova, ERFA, LibRaw, LibXISF, Qt5Keychain. Maybe one of those dependencies messes with the LANGUAGE environment variable that KDE Frameworks use for overriding the system language. Or Qt 5.15.13 is messed up. === Did you try building kstars without optional dependencies to verify my observation that with such a build changing the language works? Two KDE Frameworks are involved in changing the language. KXMLGui provides the language switching dialog. Moreover it loads the configured language and sets the environment variable LANGUAGE. KI18n loads the translations for the language(s) in the LANGUAGE variable. On Linux the configured languages are stored in/read from the file ~/.config/klanguageoverridesrc Regards, Ingo signature.asc Description: This is a digitally signed message part.
Re: KStars: Cannot change language
Thanks. Just to be clear, I'm talking about changing language from Help --> Configure Language dialog that is standard in KDE applications. [image: Screenshot_20240621_121812.png] -- Best Regards, Jasem Mutlaq On Fri, Jun 21, 2024 at 12:16 PM Konstantin Kharlamov wrote: > Looking at the repo, I see the `po/` dir which implies it's using GNU > gettext for translation. Fairly standard choice. Strings are marked for > translation by using a `_` macro, like `_("My english text")`. > > I don't remember the details, but it basically has something like a > database of such texts and their lines with the according translations. > When it needs to represent a translated string it basically does so by > searching in that db. > > Language may be changed by different means. On Linux and Unix systems > it's usually variables such as `LANG`. So e.g. `LANG=en_US.UTF-8 > kstars` should launch it with english language. > > If you have a way to switch language via interface, I presume it is > handled by some gettext API that overrides whatever's being told by > env. variables. > > HTH > > On Fri, 2024-06-21 at 11:31 +0300, Jasem Mutlaq wrote: > > Hello, > > > > We have an issue with the recent versions of KStars is that language > > cannot be switched by users. This affects MacOS, Windows, and Linux, > > whether packaged or built from source. > > > > How to debug this issue? I can't see anything in the logs about the > > language switch issue. For example, I tried changing the language to > > German but the interface is still in English. Which component of KDE > > Frameworks is handling this at the backend? Any environment variables > > to check or watch out for? > > > > Any pointers would be appreciated. > > > > -- > > Best Regards, > > Jasem Mutlaq > > > >
Re: KStars: Cannot change language
Looking at the repo, I see the `po/` dir which implies it's using GNU gettext for translation. Fairly standard choice. Strings are marked for translation by using a `_` macro, like `_("My english text")`. I don't remember the details, but it basically has something like a database of such texts and their lines with the according translations. When it needs to represent a translated string it basically does so by searching in that db. Language may be changed by different means. On Linux and Unix systems it's usually variables such as `LANG`. So e.g. `LANG=en_US.UTF-8 kstars` should launch it with english language. If you have a way to switch language via interface, I presume it is handled by some gettext API that overrides whatever's being told by env. variables. HTH On Fri, 2024-06-21 at 11:31 +0300, Jasem Mutlaq wrote: > Hello, > > We have an issue with the recent versions of KStars is that language > cannot be switched by users. This affects MacOS, Windows, and Linux, > whether packaged or built from source. > > How to debug this issue? I can't see anything in the logs about the > language switch issue. For example, I tried changing the language to > German but the interface is still in English. Which component of KDE > Frameworks is handling this at the backend? Any environment variables > to check or watch out for? > > Any pointers would be appreciated. > > -- > Best Regards, > Jasem Mutlaq >
KStars: Cannot change language
Hello, We have an issue with the recent versions of KStars is that language cannot be switched by users. This affects MacOS, Windows, and Linux, whether packaged or built from source. How to debug this issue? I can't see anything in the logs about the language switch issue. For example, I tried changing the language to German but the interface is still in English. Which component of KDE Frameworks is handling this at the backend? Any environment variables to check or watch out for? Any pointers would be appreciated. -- Best Regards, Jasem Mutlaq