On 23.09.21 18:30, Sandra Loosemore wrote:
On 9/23/21 10:10 AM, Tobias Burnus wrote:
On 23.09.21 17:50, Sandra Loosemore wrote:
This patch is for PR101320, another issue related to missing bind(c)
diagnostics. OK to commit?
LGTM - I am only ...
+ gfc_error ("Default-initialized %s dummy argument %qs "
+ "at %L is not permitted in BIND(C) procedure %qs",
+ (sym->attr.pointer ? "pointer" : "allocatable"),
... wondering how to best handle such strings for translators.
Namely, whether to duplicate the string and fill-in the %s, rewriting
it them to make it clearer for the translator ("dummy argument %qs
with %s attribute"), or leaving it as is.
I think the later is acceptable – thus, I assume you will choose that
option :-)
Well, "pointer" and "allocatable" are Fortran language keywords, not
just regular English words.
True but that does not solve the translator problem.
Assume the following isn't English "A %s dummy conflicts with ...", x ?
"allocatable" : "pointer"
How do you translate it? "An %s" for "An allocatable" or "A %s" for "A
pointer"? Similar issues occur all the time with languages, each having
its own special requirements.
But admittedly, there is no simple solution. In any case, I think I
wouldn't capitalize the pointer/allocatable as then those stand out -
while I think the 'default-initialized' is the more important (even
though all: it, allocatable/pointer + bind(C) are important).
And as you wrote, using %qs (%<...%>), capitalized and non-capitalized
keywords are all used a bit inconsistently.
And, as mentioned in the review, it is probably simplest to commit it as
submitted as there it no really convincing solution to the translation
problem, I think.
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955