Skip to content

Fix default_locale and get_best_locale

phoepsilonix requested to merge fix-locale into master

about unstable/extra/x86_64/manjaro-hello-0.8.0-1-any.pkg.tar.zst

For example, in my environment, the locale is ja_JP, but the default_locale cannot be determined and the locale is displayed as en.
After launching manjaro-hello, it is possible to switch the language and display Japanese, but if I close it and launch it again, it will be displayed as en locale. The locale in the configuration file also remains as en.

> manjaro-hello 
INFO:root:Plugin 'layoutswitcherlib' not available.
Traceback (most recent call last):
  File "/usr/bin/manjaro-hello", line 387, in on_languages_changed
    self.set_locale(combobox.get_active_id())
  File "/usr/bin/manjaro-hello", line 339, in set_locale
    label.set_markup(self.get_page(page))
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/manjaro-hello", line 377, in get_page
    f"{self.preferences["data_path"]}/pages/{self.usr_prefs["default_locale"]}/{name}"
                                             ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'default_locale'
> cat .config/manjaro-hello.json 
{“locale”: “en”}

applications/manjaro-hello#47 (closed)

Fix default_locale and get_best_locale

Edited by phoepsilonix

Merge request reports

Loading