Follow-up Comment #5, patch #4338 (project freeciv):

Sorry for a rather late review comment, but I think the i18n won't quite work
after this patch.

It replaces


-      create_active_iconlabel(pBuf, pWindow->dst, pStr,
-                             _("Investigate City"),
-                             diplomat_investigate_callback);


with


+    action_entry(ACTION_SPY_INVESTIGATE_CITY,
+                 "Investigate City",
+                 diplomat_investigate_callback,
+                 pUnit, pCity, NULL,
+                 pWindow, &area);


where action_entry() does


+    create_active_iconlabel(pBuf, pWindow->dst, pStr,
+                            _(ui_name), callback);


Without the _() markup around the literal string "Investigate City" itself in
the source terxt, the process which passes through the source files looking
for translateable strings won't find it, so it'll only get localised if it
happens to be picked up from some other source file.

Wrapping the literal string in N_() would fix this (this is purely a marker
for localised strings and does nothing at runtime), but in this case I don't
see any reason not to translate at the call site with _() (and remove the _()
from inside action_entry()).

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?4338>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to