MegaGlest Forum

MegaGlest => Feature requests => Closed feature requests => Topic started by: GunChleoc on 13 June 2013, 12:19:14

Title: [Done] Split "ExitGame?" string
Post by: GunChleoc on 13 June 2013, 12:19:14
The string ExitGame? is used in two places

The question mark in the menu looks ugly in English, and it's creating problems for the translators. Could we have two separate strings for this please?

I suggest

Related: 3.7.0 beta1 translation + usability - Game menu - Exit game? (https://forum.megaglest.org/index.php?topic=8684.0)
Title: Re: Split "ExitGame?" string
Post by: softcoder on 21 June 2013, 06:02:36
Updated as requested in svn rev#: 4481

ExitGame?=Would you like to close the game?
ExitGameMenu?=Exit current game?
ExitGameServer?=Exit current game? (this will end the game for all other connected players)
Title: Re: Split "ExitGame?" string
Post by: GunChleoc on 21 June 2013, 08:22:53
Thanks! :D
Title: Re: [done] Split "ExitGame?" string
Post by: GunChleoc on 15 July 2013, 13:54:58
I have just tested this with the latest beta from the automatic Windows builds, and it does not work. I am presented with ExitGameMenu? both for the menu entry and the question in the prompt dialog.
Title: Re: Split "ExitGame?" string
Post by: tomreyn on 15 July 2013, 15:52:46
Hmm, let's see...

Current (r4510) English language file in the subversion repository (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/data/glest_game/data/lang/english.lng?revision=4510&view=markup#l147).
(The latest revision is always available here (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/data/glest_game/data/lang/english.lng?revision=HEAD&view=markup#l147).)

Current (r4510) Gaelic language file in the subversion repository (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/data/glest_game/data/lang/gaelic.lng?revision=4510&view=markup#l147).
(The latest revision is always available here (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/data/glest_game/data/lang/gaelic.lng?revision=HEAD&view=markup#l147).)

According to the CI subversion repository polling log (https://ci.megaglest.org/job/megaglest-trunk_w32/481/pollingLog/) the latest Windows build (http://snapshots.megaglest.org/windows) is based on r4518, was built 3 days ago, and the build succeeded.

In r4518, these keys are referenced in the following game engine files:
FileLine no.Code
source/glest_game/game/game.cpp1648 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l1648)menuItems.push_back(lang.get("ExitGameMenu?"));
source/glest_game/game/game.cpp3539 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l3539)showMessageBox(Lang::getInstance().get("ExitGameMenu?"), "", true);
source/glest_game/game/game.cpp5814 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5814)showMessageBox(lang.get("YouLose")+" "+lang.get("ExitGameServer?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5817 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5817)showMessageBox(lang.get("YouLose")+" "+lang.get("ExitGameMenu?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5825 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5825)showMessageBox(lang.get("GameOver")+" "+lang.get("ExitGameMenu?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5828 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5828)showMessageBox(lang.get("YouWin")+" "+lang.get("ExitGameMenu?"), lang.get("BattleOver"), false);
source/glest_game/menu/menu_state_root.cpp322 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/menu/menu_state_root.cpp?revision=4518&view=markup#l322)showMessageBox(lang.get("ExitGame?"), "", true);
source/glest_game/main/battle_end.cpp770 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/main/battle_end.cpp?revision=4518&view=markup#l770)showMessageBox(lang.get("ExitGameMenu?"), "", true);

Of course, to get the latest translations you also need to use the latest game data archive (http://snapshots.megaglest.org/data) (to get what's in the subversion repository) or use the games' option menu to pull the latest translations from Transifex.

Now what do you think should be changed?

Update: I just submitted a minimal change (r4519, which is only comprised of two changes to the french main language file) which will trigger the data package to be rebuild, but you can safely ignore this.
Title: Re: Split "ExitGame?" string
Post by: GunChleoc on 16 July 2013, 08:39:35
I did pull the latest translation from Transifex.  It loaded fine, because the new "Show next hint" button is there. I then changed the ExitGameMenu? string in Transifex, reloaded the translation and it promptly changed in both locations. So, it's definitely the same variable.

I thik the culprit is this one:
FileLine no.Code
source/glest_game/game/game.cpp1648 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l1648)menuItems.push_back(lang.get("ExitGameMenu?"));
which should be ExitGame? to separate the strings correctly.

We then still have reversed semantics. i.e. replace all ExitGame? (a question) with ExitGameMenu? (a button text) and all ExitGameMenu? with ExitGame?

ExitGameMenu? where it sould be a menu entry
(http://www.foramnagaidhlig.net/internal/megaglest-menu.png)

ExitGameMenu? where it should be a question. It also appears in the "You Won. Exit Game?" question.
(http://www.foramnagaidhlig.net/internal/megaglest-question.png)
Title: Re: Split "ExitGame?" string
Post by: tomreyn on 16 July 2013, 12:01:37
With the change you suggest it would look like this:

(http://img198.imageshack.us/img198/3765/8e6p.png)

(while the follow-up screen is unmodified).

Hmm, I don't think that's an improvement. Maybe that's not what you wanted to do?

I don't speak Gaelic, so it's difficult to understand what your goal is. If what you are discussing is not primarily an issue with Gaelic translations but one which also affects the source language (English), then it would be best to refer to this.
Title: Re: Split "ExitGame?" string
Post by: GunChleoc on 16 July 2013, 14:17:48
After changing this, they then are all the wrong way around, in all languages.

We then still have reversed semantics. i.e. replace all ExitGame? (a question) with ExitGameMenu? (a button text) and all ExitGameMenu? with ExitGame?

So, we have 2 problems:

1. Two variables that share the same string and that shouldn't.

2. Two translations being generally assigned the wrong way around.

Will do the table in the next post
Title: Re: Split "ExitGame?" string
Post by: GunChleoc on 16 July 2013, 14:26:00
 
FileLine no.Code
source/glest_game/game/game.cpp1648 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l1648)menuItems.push_back(lang.get("ExitGameMenu?"));
source/glest_game/game/game.cpp3539 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l3539)showMessageBox(Lang::getInstance().get("ExitGame?"), "", true);
source/glest_game/game/game.cpp5814 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5814)showMessageBox(lang.get("YouLose")+" "+lang.get("ExitGameServer?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5817 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5817)showMessageBox(lang.get("YouLose")+" "+lang.get("ExitGame?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5825 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5825)showMessageBox(lang.get("GameOver")+" "+lang.get("ExitGame?"), lang.get("BattleOver"), false);
source/glest_game/game/game.cpp5828 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/game/game.cpp?revision=4518&view=markup#l5828)showMessageBox(lang.get("YouWin")+" "+lang.get("ExitGame?"), lang.get("BattleOver"), false);
source/glest_game/menu/menu_state_root.cpp322 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/menu/menu_state_root.cpp?revision=4518&view=markup#l322)showMessageBox(lang.get("ExitGameMenu?"), "", true);
source/glest_game/main/battle_end.cpp770 (http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/source/glest_game/main/battle_end.cpp?revision=4518&view=markup#l770)showMessageBox(lang.get("ExitGame?"), "", true);