[patch, fortran] PR38573 Missing markers for translation
Jerry DeLisle
jvdelisle@charter.net
Sat Apr 1 17:18:00 GMT 2017
On 04/01/2017 06:40 AM, Jakub Jelinek wrote:
--- snip ---
>
> So, the above means the strings are translated twice (say if in theory
> you translate from english to language X and that translation, when
> used as english, translated again to language X means something different,
> you get wrong message. Furthermore, the above composition of a message
> from separately translated parts is very translation unfriendly, consider
> if in language Y the "is available since Fortran 77" is translated with
> the word "is" somewhere in the middle.
>
> Fix for the double translation is easy, use G_("...") instead of _("...")
> on the string literals and then _() where it is, the G_ marks it for
> translation but nothing else, and _() actually translates it, but as it
> has no string literal in it, doesn't mark anything for translation.
>
> For the construction of diagnostics from separate parts, it is harder,
> especially if we don't want to introduce further -Wformat-security warnings.
> For construction of a message from parts, it is of course fine if the %s
> or %qs provided strings are language keywords that aren't meant to be
> translated.
>
> Jakub
>
Thank you for clarifications. Will change to G_(). I think this PR has been
hanging around a long time because we simply do not understand how these things
work. I posted because I did not think it was very obvious and was not all that
clear to me from the PR discussion.
Jerry
More information about the Gcc-patches
mailing list