Author: sveinung
Date: Mon Sep 26 12:10:19 2016
New Revision: 33898

URL: http://svn.gna.org/viewcvs/freeciv?rev=33898&view=rev
Log:
Document changing action UI name's info part.

Add a hint for translators that explains how extra information can be added
inside the parens that holds the action UI name info part. This isn't
obvious.

Reported by fomalhaut at the Freeciv forum.

See patch #7724

Modified:
    trunk/common/actions.c

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=33898&r1=33897&r2=33898&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Mon Sep 26 12:10:19 2016
@@ -632,13 +632,34 @@
 
   /* Format the info part of the action's UI name. */
   if (probtxt != NULL && custom != NULL) {
-    /* TRANS: action UI name's info part with custom info and probabilty. */
+    /* TRANS: action UI name's info part with custom info and probabilty.
+     * Hint: you can move the paren handling from this sting to the action
+     * names if you need to add extra information (like a mnemonic letter
+     * that doesn't appear in the action UI name) to it. In that case you
+     * must do so for all strings with this comment and for every action
+     * name. To avoid a `()` when no UI name info part is added you have
+     * to add the extra information to every action name or remove the
+     * surrounding parens. */
     astr_set(&chance, _(" (%s; %s)"), custom, probtxt);
   } else if (probtxt != NULL) {
-    /* TRANS: action UI name's info part with probabilty. */
+    /* TRANS: action UI name's info part with probabilty.
+     * Hint: you can move the paren handling from this sting to the action
+     * names if you need to add extra information (like a mnemonic letter
+     * that doesn't appear in the action UI name) to it. In that case you
+     * must do so for all strings with this comment and for every action
+     * name. To avoid a `()` when no UI name info part is added you have
+     * to add the extra information to every action name or remove the
+     * surrounding parens. */
     astr_set(&chance, _(" (%s)"), probtxt);
   } else if (custom != NULL) {
-    /* TRANS: action UI name's info part with custom info. */
+    /* TRANS: action UI name's info part with custom info.
+     * Hint: you can move the paren handling from this sting to the action
+     * names if you need to add extra information (like a mnemonic letter
+     * that doesn't appear in the action UI name) to it. In that case you
+     * must do so for all strings with this comment and for every action
+     * name. To avoid a `()` when no UI name info part is added you have
+     * to add the extra information to every action name or remove the
+     * surrounding parens. */
     astr_set(&chance, _(" (%s)"), custom);
   } else {
     /* No info part to display. */


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

Reply via email to