Only English and Korean language is possible to choose from
Like I understand Password Safe on Windows I can select the languages I want to install and then when Manage | Select Language only languages that were installed are displayed.
But on Linux installing from deb or flatpak, I have no option to select language during installation. I assume all of the languages should be available to select.
On my Ubunut 23.10 I have operating system setting Regional & Language set to "English US". When I select menu Manage | Select Language it is interesting English and Korean are visible. I understand English being default program but why only Korean as alternative?
It looks like issue from my above post is related to "flatpak" only. I have now checked deb v1.18.2 on Ubuntu 23.10 and I am able to select any of the language:
By the way, I see there are even more languages supported on Transifex for Password Safe project that are not included in my previous posts list.
Today I have build flatpak on my Ubuntu 23.10 myself from latest 1.18.2fp4 tag.
What I see is there are still only English and Korean language available to select from.
Now I did the following:
- Enter inside flatpak sandbox:
flatpak run --command=bash org.pwsafe.pwsafe - Change directory to installed locales:
cd /app/share/locale - List files in directory:
ls -land only Korean is listed: ko -> ../../share/runtime/locale/ko/share/ko - If I follow the "rabbit hole" of symbolic link:
ls /app/share/runtime/locale/and all of locales are displayed: da de es fr hu it ko nl pl ru sv zh
Conclusion: It looks to me there is some error at build time that only creates Korean symbolic link at /app/share/locale, but it fails to create all others symbolic links for other languages.
- Interesting if building flatpak myself I get English and Korean From "Select Language" option.
- But... if I install flatpak from Flathub.org then only "English" is available.
Now I investigated little bit more. It looks like flatpak separates program into "main" program and "location" specific program. Location specific is installed using default language set in Ubuntu.
On Ubuntu on Settings application I have installed additional language "German" and "French" and set "French" as default Ubuntu languages, logged out and logged back in.
Checked details about flatpak:
flatpak info --show-extensions org.pwsafe.pwsafe
Notice in last line 3 langauges are installed on my system: de/en/fr
I have updated flatpaks:
flatpak update
and all of the .Locale all of my installed flatpaks where installed.
Started flatpak:
flatpak run org.pwsafe.pwsafe
And now I see first splash window is somehow correctly displayed in French.
In above image I see correctly transalted buttons, but text is still in English. I don't know why? Maybe not all of the strings are translated in French, so some are French some are English.
Now to every menu option I have checked everything is in English except buttons that are in French.
I started few of the programs on my computer some deb packages some flatpaks. All of the programs are working fine in French, except Password Safe. Interesting...
This is strange... So I tried with German language set as Ubuntu default and logged out and logged back in. Now everything is in English except buttons are in German.
So... we are one small step further in language problem investigation. I don't know why only buttons are translated and not the text.
We currently do not have language that is 100% translated into, to be sure there is no problem because of only partially translated language strings.
Now I get it. Buttons are not coming from Password Safe program itself, but instead are populated from dependent runtime "org.freedesktop.Platform".
Now I have checked locally build flatpak directory for *.mo files that are translation files with:
find . -name *.mo
Translation files are created during build time.
But for some reason there are not present after flatpak is installed from Flathub.org:
a) Enter inside sandox: flatpak run --command=bash org.pwsafe.pwsafe
b) List locale files: ls -l /app/share/runtime/locale/ and directory is empty!!!
Yes, I noticed this as well. Asked about this is the flathub forum, I'm afraid I don't fully follw the answer I recevied: https://discourse.flathub.org/t/files-misplaced-in-sandbox/6084
@ronys, as suggested by forum user there is too much (or incorrect) cleansing in manifest yaml file.
Instructions:
- I downloaded: https://github.com/flathub/org.pwsafe.pwsafe/blob/master/org.pwsafe.pwsafe.yml
- In this file I have deleted line 34, that contains text "- /share".
- I have locally on my PC built a flatpak.
- I started flatpak with
flatpak run org.pwsafe.pwsafe. - From Manage | Settings Language I see all of the languages. PROBLEM SOLVED.
Testing:
- Manage | Settings Language | German and language changes to German. WORKS AS EXPECTED.
- Exit Password Safe.
To the problems:
- Start Password Safe again and now immediately warning appears: PasswordSafe (wxWidgets) Warning. Cannot set locale to language "German".
- Click on OK button from warning and it looks like everything is working fine, interface is still in German.
- Change language to e.g. Danish (they use some non-English letters, so it is easier to spot that language really changed). There are still some strings in English like "Options" and there is mix of English and Danish, but I assume this is another problem, like now all of the strings are translated to Danish in translation system. The strings that are not translated are displayed in English, like expected.
- Exit Password Safe and start it again, not there is warning that "Danish" cannot be set like in step 1, but obviously this is not true, because I can see Dansih already displayed in login screen (look for non-English letters and there are present on login screen).
- Set to some other language e.g. Chinese, that is easy to spot Chinese letters. The the same warning at startup but everything looks like working (except of few English strings that are probably not translated in the first place).
I have investigated little bit more. In manifest file in line 34 replace: - /share with - /share/bakefile This will solve the problem of adding all of the languages on Manage | Select Language and also clean some not needed files.
@ronys the only thing left is why now after changing language from Manage | Select Language and restart Password Safe now program reports dummy warning: "Cannot set locale to language X", where the X is the language set from Manage | Select Language before closing down the program. Can you please look at this warning message. I think this warning should be fixed before adding additional languages.
The "Cannot set locale" problem is a known issue with wxWidgets.
I have searched the web little bit and I see when wxWidgets reports this "Cannot set locale for language X" it expects something on operating system level that is not there. But in case of flatpak, this has to be made inside flatpak environment.
Is there a way to suppress this message? Should we go upstream to wxWidgets forum to ask this?