zlatinb / muwire

MuWire file sharing client for I2P
GNU General Public License v3.0
193 stars 27 forks source link

Where to change language in the GUI-version after install? #109

Closed JamesOlvertone closed 2 years ago

JamesOlvertone commented 2 years ago

I want to switch to english language in the gui-version of muWire. Right now it is set to an non-english language, that I set during install. I looked in ~/.config/MuWire/gui.properties and there is this entry: locale=en-US

I expected there is another value set that coresponds to my actual gui language that is NOT en-US. Seems this entry is ignored. Changed it to 'en' and has still no effect, gui language is after restart still non-english. Is MuWire checking the system locale at startup/runtime and ignoring the value in gui.config or is it a bug?

zlatinb commented 2 years ago

It should respect the value of the locale property, this looks like a bug. Can you tell me whether you are using an AppImage or a .zip distribution, or are you building from source? If you are building from source is it the latest from git or a specific tag?

JamesOlvertone commented 2 years ago

I use the zip version under Linux. java -version: openjdk version "17.0.1" 2021-10-19 LTS

zlatinb commented 2 years ago

Please try the following:

  1. Shut down MuWire
  2. make a copy of the gui.properties file then delete it
  3. Restart MuWire. It will show the language selection dialog again. Select English
  4. Shut down MuWire again. A new gui.properties file will be created.
  5. Compare the new gui.properties with the old one. Are the locale properties different?

Also make sure that there does not exist a ~/.MuWire directory, although that would exist only if a very old installation of MuWire was there.

JamesOlvertone commented 2 years ago

Done this: deleted gui.properties ~/.MuWire does not exists, nothing to delete start MuWire.sh: language Dialog pops up, choosed english after this the progress dialog appears and is not in english after this checked gui.properties: "locale=en-US" is set.

Then I tried this: Before starting changed in console env var LANG to LANG=en-US.UTF-8 . LANGUAGE is untouched and different to en-US. Then it works as expected.

zlatinb commented 2 years ago

Interesting, I have no idea why the env vars matter, I need to look into it. I'm afk from my Linux VM until December, afterwards I'm back I'll try to reproduce.

Leaving this issue open until then, if you discover anything relevant please let me know.

zlatinb commented 2 years ago

Hi, in the commit referenced above I think I've fixed the issue. It should no longer care what the system locale (i.e. the LANG environment variable) is.

JamesOlvertone commented 2 years ago

I tested it and it works now as expected.