https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104709

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
A small improvement would be:

--- a/gcc/cp/mapper-client.cc
+++ b/gcc/cp/mapper-client.cc
@@ -304,8 +304,13 @@ module_client::open_module_client (location_t loc, const
char *o,
 #endif

   if (errmsg)
-    error_at (loc, line ? G_("failed %s mapper %qs line %u")
-             : G_("failed %s mapper %qs"), errmsg, name.c_str (), line);
+    {
+      if (line)
+       error_at (loc, G_("error in mapper %qs at line %u: %s"), name.c_str (),
+                 line, errmsg);
+      else
+       error_at (loc, G_("error in mapper %qs: %s"), name.c_str (), errmsg);
+    }

   // now wave hello!
   c->Cork ();



That way at least the untranslated part is always at the end, rather than
embedded in the middle of a translated string.

It's not really clear whether the current errors are ideal even for English
output, e.g. Cody::OpenInet6 might set errmsg to "socket" which would yield
something like:

failed socket mapper 'name' at line N

I think this means it failed to *open* a socket for the mapper, but that's not
how it reads.

Reply via email to