-
Notifications
You must be signed in to change notification settings - Fork 38
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
Translation not loaded without running make install #29
Comments
Yes, you are right, thank you for pointing at this issue. It has been this way for so long that I did not even recognize it as the bug it is anymore. |
As a first aid, I added support for different localization paths via command line (commit 110abed ); in conjunction with ./configure you can now install the locales (mo-files) in a separate directory, so you don't have to be logged in as super user: Do once: Then each time you want to check translations: locales will then be installed to /absolute/path/locale. Choose a directory you have the rights to, like /home/me/enigma/locale or something like this. Start Enigma from the console with cd .. You may use a relative path for enigma, but ./configure needs an absolute path. I hope this helps a little bit? Switching between different languages/locales on Linux is problematic as ever. The best solution here is to update gettext/intl in Enigma's source, this will need some days of work and testing. There seems to be a "setlocale" command in gettext since 2009 ... :-) |
Thanks for looking into this. I think it's a bit clunky to have it as an option. I don't have any experience with intltool projects though. Maybe you could have a look at other games, e.g. Battle for Wesnoth, 0 AD or Widelands, so that you don't have to reinvent the wheel? This is the Widelands class that does the setlocale thing, it's cross-platform: https://github.com/widelands/widelands/blob/master/src/base/i18n.cc Main calling point is in https://github.com/widelands/widelands/blob/e3c178b1f93b6afadb18b994b58c03fcebdc5a53/src/wlapplication.cc#L967 |
This is exactly what I have been doing for the past three days now: Studying the code of other games, and of course of setlocale itself. The results I have till now:
|
I stand corrected: Wesnoth does not use the standard gettext (like we do), but instead invokes gettext from another library called boost. I tried to replicate Widelands' solution, but failed. I do not understand where there might be a difference ... except for one thing: Wideland calls upon another sublibrary of boost, which is not directly connected to locales, but which might eventually drag boost's own gettext back in. Right now, this is the only way I can explain how Wideland is able to show translations other than those supported by the system. I now see two options for us to proceed; an easy one, and a right one. The easy option would be to just show "Your operating system seems not to support language X. Please try to install it first." whenever a language is selected that is not supported. The right option would be to implement one of the "larger" solutions the other software projects make use of. I would prefer to keep it as small as possible, and therefore tend to tinygettext or even ScummVM's code, instead of including glib or boost. The easy option is fast, reasonable, and would not further inflate Enigma's file size. And ... well ... I guess, most users would not find any use in a language that is not already installed on their system anyway ... please correct me, maybe I am missing something. This bug only affects Linux, and only developers like us, who need to see all languages working, to adapt button sizes etc. You see, I tend to the easy solution, instead of burying another week into this. What do you think? How important is this to you? (If it is important, I will do it.) |
When I play Enigma, all strings show in English, although they have been translated. When I run
make install
, it works. It would be nice not to have to install though.Here's a screenshot with language set to
gd
and "Options" translated inpo/gd.gmo
as shown by Virtaal:Enigma Version: HEAD detached at 1.30-alpha, self-compiled
OS: Linux Mint 20 Mate (Ubuntu 20.04-based)
Configure summary:
The text was updated successfully, but these errors were encountered: