Closed glixx closed 5 years ago
This appears to have happened just after the start of the game probably using saved language selection from the previous installation.
Is there any eduactiv8.mo file in any supported language in /usr/share/locale/? The files may have not been installed there. When it comes to checking, I've had a try/except block there but for some reason, I was reading the file twice. The first time before the try block... must have been some debugging artefact that was forgotten about - I will get it fixed. If the translation file is not there, the program is set to use default messages.
try: self.trans[self.lang] = gettext.GNUTranslations(open(filename, "rb")) except IOError: print("Locale not found. Using default messages") self.trans[self.lang] = gettext.NullTranslations()
Output is on switching language. The second start is impossible.
Is that when run form a built package or from the source? If from a package, where do you move the locale files when installing? /usr/share/locale/? or somewhere else?
To start again - change the name of your progress database temporarily. It's located at: /.local/share/eduactiv8/eduactiv8.db
I catched very interesting bug in Mageia 7 beta1. All files are present in package, but locales were installed only with according installed locales in system.
UPDATE: After having installed the Mageia 7 I can see what is going on. The 6fdbd5553ddbc3cae6d00519156e06bed6decf82 commit does fix the issue with the program crashing, however, the program is still failing to find locale files, since, as you stated, they were not installed, so basically uses default messages in all languages.
No idea how to fix this one though, since this is on the installer side of things. Could the locale files within the package be left where they are, or would that violate any system/packaging rules?
Could the locale files within the package be left where they are
Yes in your case, because settings of some distrubutions skip installation of locales if they are extra, but you need all locales to switch between them in GUI.
But you can improve algorithm. As you can see %_install_langs from /etc/rpm/macros has all English locales and your locale. So dialog of langs can contents only available locales if MO file is exist.
I'd rather keep all the languages, so kids, for instance, can learn Spanish or other language for that matter even though their system is not necessarily supporting that language out of the box. And that lets me get away with redesigning the way language selections are displayed, saving myself some time here :)
Ok
If file does not exist then do not switch on it and do not remember choice, just ignoring.