Author Topic: [invalid] v3.9.0 fails to start with translation option set to an invalid value  (Read 885 times)

eliyahu52

  • Guest
Hi!

I installed the new version (3.9), and when I try to start a game I get this error:

Code: [Select]
#2 An error occurred and MegaGlest will close.
Error msg = [Error converting string to bool, expected 0 or 1, found: [שלילי]
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xbc64be] line: 299
./megaglest:Shared::Util::strToBool(std::string const&)address [0xbaab5e] line: 38
./megaglest:Glest::Game::Lang::loadGameStrings(std::string, bool, bool)address [0x6ead8c] line: 105
./megaglest:Glest::Game::glestMain(int, char**)address [0x79c08e] line: 4749
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x7a22f1] line: 5660
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x7a24d8] line: 5732
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7ffc22571ea5] line: 0
./megaglest() [0x5ee9b9]address [0x5ee9b9]
]

Please report this bug to  http://bugs.megaglest.org

Run ubuntu 13.04 64 bit.

Does anyone knows the problem?

Kaplan
« Last Edit: 21 November 2013, 00:47:14 by tomreyn »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Look in hebrew.lng for:

FONT_RIGHTTOLEFT_MIXED_SUPPORT=

This line should NOT contain and hebrew. I am assuming you have a hewbrew.lng file you edited yourself?

eliyahu52

  • Guest
I don't have this line in hebrew.lng file, and I didn't edit hebrew.lng file (I used "advance translation" option to test the translation).

But now I notes that I translated today the string "false = [שלילי]" in Transifex and downloaded the latest translation, and I see this word "שלילי" in the secund line of the error message, maybe it's connected, but I don't see the string in hebrew.lng file either.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
The root of the problem you are facing here (like several other translators did before) is that there are both translations and options / settings in the main translation file / resource, and that it is difficult for translators to understand which is which.

In this very case what happened is that you edited the value for the option/setting FONT_RIGHTTOLEFT_MIXED_SUPPORT in the Hebrew main language file on Transifex today, setting it to a translation of the English word "false" since you assumed this is a string which is to be translated - it is not as a rule of thumb any translation key in all upper case characters is actually a setting/option and it's English value is not meant to be translated to the target language. Instead, it is used to define how the (other) translations of this language are to be handled and interpreted  by MegaGlest. For example, there is one such all upper case key which, if set to the (English) string "true" in the target language, will make the game engine interpret this as a language which is spelled / read from right to left.

Now after you edited the Hebrew FONT_RIGHTTOLEFT_MIXED_SUPPORT value on Transifex and set it to a value MegaGlest cannot handle, you used the advanced translation option of MegaGlest to import these latest changes from Transifex. When you do this, the original translations MegaGlest has installed on your computer are not overwritten but stay in place, however, the downloaded translations are placed in $UserData_Root/data/lang/ and, if any are found there by the game, take precedence over those initially installed. However, since MegaGlest is unable to handle the (Hebrew) value you put there, it crashes at this point. On your Linux system, with MegaGlest installed using the official v3.9.0 installer, $UserData_Root resolves to ~/.megaglest/ (i.e. a hidden directory .megaglest located inside your home directory).

So you will wonder how to recover now and be able to start MegaGlest again. There are two ways to do so:
1. Manually delete $UserData_Root/data/lang/hebrew.lng
2. Start a terminal window / command prompt in the directory MegaGlest is installed in (i.e. where the executable / binary files are located) and run MegaGlest in English from there by passing the --use-language=en command line option

Since it is my understanding that this behaviour is as designed, I'm tagging this bug report [invalid] and editing its title to be more comprehensive to others.
« Last Edit: 21 November 2013, 00:52:12 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

eliyahu52

  • Guest
I've changed the file you said, and it's worked! Thank you!

But the real question is why this string appear in Transifex to translate? Now that I untranslated it, the hebrew translation stands on 99%.

I don't know how, but you must mark this string us not need to translate otherwise someone else will translate it, and will damage the game for all hebrew users.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
I just removed it from the english file so it will no show up anymore for other languages once transifex gets the update.

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
Won't translators still need to set this to "true" or "false", depending on if their language is RTL or LTR?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
At this point no. There are a number of properties that only need to be set in special cases (like this one). I am not totally sure that some of the properties added are needed anymore and i need to do some testing to weed out older properties that are no longer required.