Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language detection does not work correctly #288

Closed
v-ji opened this issue Apr 5, 2020 · 12 comments
Closed

Language detection does not work correctly #288

v-ji opened this issue Apr 5, 2020 · 12 comments

Comments

@v-ji
Copy link
Contributor

v-ji commented Apr 5, 2020

Hi everyone,

The code for getInitialLanguage() does not seem to be working correctly across platforms.

On macOS, it automatically sets Syncplay to English even though my system language is German. Python’s locale.getdefaultlocale() returns ('en_GB', 'UTF-8'). After a bit of searching it seems like unfortunately, there is no straightforward cross-platform way to get the system language in Python.

Is this working correctly for users on other platforms or other macOS users?

@Et0h
Copy link
Contributor

Et0h commented Apr 5, 2020

It's a shame it doesn't work, but not sure if there is a fix other than manually setting the language, e.g by following the guidance at https://syncplay.pl/guide/client/ and:

  • Clicking the "Show more settings" checkbox in the configuration window, then going to "Messages", then selecting Language -> Deutsch. OR
  • Running Syncplay with the --language de command line switch

@Et0h
Copy link
Contributor

Et0h commented Apr 5, 2020

@vaviary What result do you get from locale.getpreferredencoding() on macOS?

@v-ji
Copy link
Contributor Author

v-ji commented Apr 5, 2020

Sorry, I made a dumb mistake there: My .zshrc had the line export LC_CTYPE=en_GB.UTF-8. Launching Python in Terminal.app without a shell it returns the following:

>>> locale.getpreferredencoding()
'UTF-8'
>>> locale.getdefaultlocale()
('de_DE', 'UTF-8')

Where does Syncplay get its locale from, then?

@Et0h
Copy link
Contributor

Et0h commented Apr 5, 2020

I don't know as I don't use macOS. Are you using the AppImage available from https://github.com/Syncplay/syncplay/releases/download/v1.6.4a/Syncplay_1.6.4a.dmg and/or the slightly more recent experimental one available from https://bintray.com/syncplay/Syncplay/download_file?file_path=Syncplay-1.6.5-x86_64.AppImage ? Is there a difference between the two?

@v-ji
Copy link
Contributor Author

v-ji commented Apr 5, 2020

I’m using the latest GitHub release as installed by Homebrew, so version 1.6.4a.

I went ahead and downloaded the 1.6.5 .dmg from Bintray (I think you accidentally linked to the AppImage). Unfortunately, it still detects English as the system language.

@albertosottile
Copy link
Member

Interesting... Which version of macOS do you have? Can you make a screenshot of the Language & Region settings in System Preferences? I am interested in what languages are listed there and in which order. Thank you.

@v-ji
Copy link
Contributor Author

v-ji commented Apr 6, 2020

I’m using macOS Catalina 10.15.3 and here’s a screenshot of the language settings menu:

Bildschirmfoto 2020-04-06 um 11 55 24

German is the primary language on the left (“Primär”).

@JBeckwith
Copy link

Would just like to add that this appears as an issue in the "inverse" - the language will be set to German on a Mac with English set as the default language.

@pratyushmanocha
Copy link

Hi, I would like to mention that even I am facing this issue but in my case, the language displayed to me is Russian. My default language is English but I have no clue how this is happening. In addition to this, I am unable to add a server password in the password field in the gui config panel.

I tried running Syncplay from the cli using the -g argument that forcefully brings up the gui. This allows me to modify the password field (only in this session) but the on-screen language for the Mac OS folders is still Russian.

I installed Syncplay using brew cask install syncplay and am running it on MacOS Catalina.

Apart from this, I have been facing a few more issues and if possible, would like to create another discussion thread for them.

I would be glad to furnish any more information that would be required.
Thanks in advance.

@albertosottile
Copy link
Member

albertosottile commented Apr 14, 2020

@v-ji I just reproduced the issue in my local testing virtual machine. I will try to investigate it as soon as I can.

@JBeckwith @pratyushmanocha I think we are mixing different issues here. The original issue is that the GUI is displayed in English even though the System language is set to a different, supported one (e.g. German). If you are experiencing other bugs, please open new issues in the tracker. Please note that a language issue has been solved in the unreleased 1.6.5 version linked above (https://bintray.com/syncplay/Syncplay/download_file?file_path=Syncplay_1.6.5.dmg). I would encourage you to test it before opening a new issue.

albertosottile added a commit to albertosottile/syncplay that referenced this issue Apr 22, 2020
@albertosottile
Copy link
Member

Hello @v-ji, I just prepared a build with a fix for this issue in my fork. Could you download this version from https://bintray.com/alby128/Syncplay/download_file?file_path=Syncplay_1.6.5.dmg and test in on your system? Please, let me know if the correct language is shown when you use this build.

@v-ji
Copy link
Contributor Author

v-ji commented Apr 24, 2020

I just tested it and it works flawlessly!

Bildschirmfoto 2020-04-24 um 13 46 24

albertosottile added a commit to albertosottile/syncplay that referenced this issue Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants