This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] PR 69495: unused-label warning does not tell which flag triggered it


On Wed, 3 Feb 2016, Manfred Schwarb wrote:

> There are 2 things with translation, and there is a third issue:
> - As you noticed, breaking things differently means translation has to be
>   done again.
> - Normally, each string is translated independently, and depending on the
>   language there may be lack of context (e.g. adjectives get different
> suffixes
>   depending on the noun).

I believe gettext works fine with (compile-time) string constant 
concatenation - that is, extracts the whole concatenated string for 
translation, so these are non-issues.  What doesn't work includes:

* Runtime concatenation of strings or otherwise putting English fragments 
together at runtime.

* String constant concatenation where one of the concatenated pieces comes 
from a macro expansion.

* The argument for translation being a conditional expression:

  error (cond ? "message 1" : "message 2");

(in this case, only one of the messages may be extracted for translation, 
so you need to mark both of them up with appropriate macros such as G_).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]