Re: [Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > On 10/09/2007, William Allen Simpson wrote: > > I used the existing infinity and existing "Turns to target: %d", just to > avoid making new translations. If that's not acceptable, and it's OK to > add a new translation, then "Unreachable" would be fine there. - Above fixed - Made "Unreachable" qualified string since there is also unit class flag "Unreachable" - S2_1 version fixes also separate gui-sdl implementation. For S2_2 and trunk #39694 will take care of this too - ML diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c --- freeciv/client/text.c 2007-08-25 15:28:38.0 +0300 +++ freeciv/client/text.c 2007-09-14 21:10:39.0 +0300 @@ -700,7 +700,8 @@ int min, max; if (!goto_get_turns(&min, &max)) { - astr_add_line(&str, _("Turns to target: %d"), min); + /* TRANS: Impossible to reach goto target tile */ + astr_add_line(&str, Q_("?goto:Unreachable")); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max); } else { diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/mapview.c freeciv/client/gui-sdl/mapview.c --- freeciv/client/gui-sdl/mapview.c 2007-08-25 15:16:07.0 +0300 +++ freeciv/client/gui-sdl/mapview.c 2007-09-14 21:09:49.0 +0300 @@ -554,7 +554,8 @@ int min, max; if (!goto_get_turns(&min, &max)) { - astr_add_line(&str, _("Turns to target: %d"), min); + /* TRANS: Impossible to reach goto target tile */ + astr_add_line(&str, Q_("?goto:Unreachable"), min); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max); } else { diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c --- freeciv/client/text.c 2007-08-25 15:16:07.0 +0300 +++ freeciv/client/text.c 2007-09-14 21:10:06.0 +0300 @@ -686,7 +686,8 @@ int min, max; if (!goto_get_turns(&min, &max)) { - astr_add_line(&str, _("Turns to target: %d"), min); + /* TRANS: Impossible to reach goto target tile */ + astr_add_line(&str, Q_("?goto:Unreachable")); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max); } else { ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > Daniel Markstedt wrote: > It's IMHO ok to add new translatable strings while implementing new > functionality. What should be avoided is making minor adjustments to > existing ones. > Wasn't new functionality, was a 2.1 bug fix. But OK, I'll change later today. I didn't want to delay 2.1.0. OTOH, all those English grammar mistakes in the new unit help are going to require translation fixes anyway ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > On 9/10/07, William Allen Simpson <[EMAIL PROTECTED]> wrote: > > http://bugs.freeciv.org/Ticket/Display.html?id=39693 > > > No, that's not the best fix. You shouldn't test the destination before > testing whether a goto is active. The !goto_get_turns does both. > > I used the existing infinity and existing "Turns to target: %d", just to > avoid making new translations. If that's not acceptable, and it's OK to > add a new translation, then "Unreachable" would be fine there. > It's IMHO ok to add new translatable strings while implementing new functionality. What should be avoided is making minor adjustments to existing ones. ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > No, that's not the best fix. You shouldn't test the destination before testing whether a goto is active. The !goto_get_turns does both. I used the existing infinity and existing "Turns to target: %d", just to avoid making new translations. If that's not acceptable, and it's OK to add a new translation, then "Unreachable" would be fine there. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39693) [Patch] Unit info label for impossible goto
http://bugs.freeciv.org/Ticket/Display.html?id=39693 > Currently unit info label lists "Turns to target" with very large value (FC_INFINITY) when goto hover is over impossible destination (such as Sea tile for Land unit). This also causes widget resizes. I first found this bug as 'earthquake' effect when mouse was just between legal and illegal tile. Fix attached. - ML diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c --- freeciv/client/text.c 2007-08-25 15:28:38.0 +0300 +++ freeciv/client/text.c 2007-09-09 04:06:58.0 +0300 @@ -699,7 +699,9 @@ if (count > 0 && unit_list_size(hover_units) > 0) { int min, max; -if (!goto_get_turns(&min, &max)) { +if (!is_valid_goto_destination(hover_tile)) { + astr_add_line(&str, _("Unreachable target")); +} else if (!goto_get_turns(&min, &max)) { astr_add_line(&str, _("Turns to target: %d"), min); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev