@b4n requested changes on this pull request.


In HACKING:

> @@ -341,6 +341,22 @@ Example::
     {
         ...
 
+Translation
+^^^^^^^^^^^
+
+Strings which are visible to geany users need to be translated and thus
+should be enclosed in ``_( )`` to have them being recognized by the GNU
+translation tools. Also spaces right after the first ``"`` of a string
+shall not be used as they will be cut of by the tools. This is a bad example::

No they won't be cut off. If you're referring to my erroneous comment on @Skif-off's PR recently, it was just me reading the diff the wrong way around and thinking he was removing the space instead of adding it.
GNU GetText properly handle any C string, so where to place the space is not a concern for it to appear, it's a mere code style thing.


In HACKING:

> @@ -341,6 +341,22 @@ Example::
     {
         ...
 
+Translation
+^^^^^^^^^^^
+
+Strings which are visible to geany users need to be translated and thus
+should be enclosed in ``_( )`` to have them being recognized by the GNU
+translation tools. Also spaces right after the first ``"`` of a string

_() is actually a function call, where _ is an alias for gettext. But yes, it's also used to recognize strings that need translating by the tools that read the source code for extracting strings for that purpose.
But the formulation you chose is not perfect, it's not only for recognizing the string, but also to actually translate it for the program. gettext() (for which _ is an alias) is returning the translated version of the passed-in string.


In HACKING:

> @@ -341,6 +341,22 @@ Example::
     {
         ...
 
+Translation
+^^^^^^^^^^^
+
+Strings which are visible to geany users need to be translated and thus
+should be enclosed in ``_( )`` to have them being recognized by the GNU
+translation tools. Also spaces right after the first ``"`` of a string
+shall not be used as they will be cut of by the tools. This is a bad example::
+
+    label = gtk_label_new (_("First sentence of a bad case example."

No space between the function name and the open parenthesis in Geany code style.


In HACKING:

> @@ -341,6 +341,22 @@ Example::
     {
         ...
 
+Translation
+^^^^^^^^^^^
+
+Strings which are visible to geany users need to be translated and thus

You should probably drop geany here (or at least capitalize it ;)).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.