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

Options dialog shows wrong language after opening first time #976

Closed
juozaspo opened this issue Mar 12, 2022 · 4 comments
Closed

Options dialog shows wrong language after opening first time #976

juozaspo opened this issue Mar 12, 2022 · 4 comments
Labels
bug Bug reports.

Comments

@juozaspo
Copy link

juozaspo commented Mar 12, 2022

Describe the bug
After starting dupeguru on Linux and opening the options dialog the initial selected language is Armenian (shown on top of list). After restart the interface is unreadable for the people who doesn't now this language.

To Reproduce

  1. Move or delete dupeguru settings files (located in .local/share/Hardcoded Software and .config/Hardcoded Software) if not running for first time
  2. Start dupeguru and open options dialog
  3. (optionally) Click on display tab and observe current setting
  4. Click ok and restart dupeguru
  5. Observe interface to be appearing not in the language shown previously
  6. Close dupeguru, delete settings files, start dupeguru and then restart it, observe language is correct

Expected behavior
Language in settings dialog should be set to system or to English as a fallback. First language in the list (Armenian) should not be selected by default.

Screenshots
Options 2022-03-12 09:47:26
dupeGuru 2022-03-12 10:16:53

Desktop:

  • OS: Ubuntu Linux 20.04 LTS, with Proposed repository enabled
  • Version: 4.2.0, installed from ppa

Additional context
Output of locale command:

LANG=lt_LT.UTF-8
LANGUAGE=lt_LT:en_US:en
LC_CTYPE="lt_LT.UTF-8"
LC_NUMERIC=lt_LT.UTF-8
LC_TIME=lt_LT.UTF-8
LC_COLLATE="lt_LT.UTF-8"
LC_MONETARY=lt_LT.UTF-8
LC_MESSAGES="lt_LT.UTF-8"
LC_PAPER=lt_LT.UTF-8
LC_NAME=lt_LT.UTF-8
LC_ADDRESS=lt_LT.UTF-8
LC_TELEPHONE=lt_LT.UTF-8
LC_MEASUREMENT=lt_LT.UTF-8
LC_IDENTIFICATION=lt_LT.UTF-8
LC_ALL=

No meaningful information was found in debug log, only single line (output not localized, adding LC_ALL=C before command line avoids that, default language in settings dialog is unchanged)
2022-03-12 10:03:52,488 - WARNING - Error while loading /home/juozas/.local/share/Hardcoded Software/dupeGuru/exclude_list.xml: [Errno 2] No such file or directory: '/home/juozas/.local/share/Hardcoded Software/dupeGuru/exclude_list.xml'

@juozaspo juozaspo added the bug Bug reports. label Mar 12, 2022
@arsenetar
Copy link
Owner

In your case the program does try to fall-back to the system language lt_LT, however that language is unsupported and there is no handling around that case.

@juozaspo
Copy link
Author

@arsenetar the fix generally works. The exception is a small warning in debug log: 2022-03-12 14:30:16,646 - WARNING - Couldn't set locale en.UTF-8
locale -a outputs list as shown below.

C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
lt_LT.utf8
POSIX

@arsenetar
Copy link
Owner

Yeah that warning is fine (in the sense there is not much to do about it), depending on which locales are installed on the system it may or may not be able to set the locale correctly, the translations themselves will work regardless.

@arsenetar
Copy link
Owner

I suppose I could change it to use en_US instead which may be more likely to be present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports.
Projects
None yet
Development

No branches or pull requests

2 participants