On Tue, 2017-09-19 at 09:50 +0200, Frédéric Marchal wrote: > On lundi 18 septembre 2017 13 h 20 min 25 s CEST Martin Sebor wrote: > > > > I haven't looked at all of them but from the few I have seen it > > seems that rephrasing the messages along the following lines would > > be a way to get around the translation issue and without increasing > > the number of calls (though not without the conditional): > > > > error (is_pragma > > ? G_("missing name in %<#pragma target\(\"%s=\")%>") > > : G_("missing name in %<target(\"%s=\")%> attribute"), > > "arch"); > > > > The additional benefit of this approach is that it would also make > > the quoting consistent with what seems to be the prevailing style > > of these sorts of messages. (It would be nice to eventually > > converge on the same style/quoting and phrasing across all back > > and front ends.) > Indeed! That's even better as the message uses words the user sees in the > source code whatever his/her locale language is. > > With your proposal, I know I must not translate "target" because it clearly > is > part of the programming language. With the former message, I would have > translated "target" as part of the human language message. Your approach is > clearly better. > > Frederic
Are '%<...%>' described somewhere? These aren't normal printf options are they? I don't think I have ever used them before. I am also not sure why you have '%s=' means vs. '%s'. Is it even worth breaking the word 'arch' out of the string vs. having something like: error (is_pragma ? G_("missing name in %<#pragma target \"arch\"%>) : G_("missing name in %<target arch%> attribute")); Steve Ellcey sell...@cavium.com