public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix translation issue in config/darwin.c (PR target/80190)
@ 2019-03-07 19:40 Jakub Jelinek
  2019-03-07 23:32 ` Mike Stump
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2019-03-07 19:40 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

Hi!

In this PR, the translators complained that this diagnostics is composed of
two parts, one that can be translated and the other can't, and while ASCII
and NUL probably don't need translation, character, embedded and non do.

The following patch just makes it two complete diagnostic messages that
translators can translate as they wish.

Tested with cross to x86_64-darwin, cc1 still builds.

Ok for trunk?

2019-03-07  Jakub Jelinek  <jakub@redhat.com>

	PR target/80190
	* config/darwin.c: Include intl.h.
	(darwin_build_constant_cfstring): Improve i18n of diagnostics by not
	composing the message out of two separate parts.

--- gcc/config/darwin.c.jj	2019-01-01 12:37:22.233891667 +0100
+++ gcc/config/darwin.c	2019-03-07 16:46:56.983799698 +0100
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.
 #include "langhooks.h"
 #include "toplev.h"
 #include "lto-section-names.h"
+#include "intl.h"
 
 /* Darwin supports a feature called fix-and-continue, which is used
    for rapid turn around debugging.  When code is compiled with the
@@ -3565,8 +3566,9 @@ darwin_build_constant_cfstring (tree str
 	  for (l = 0; l < length; l++)
 	    if (!s[l] || !isascii (s[l]))
 	      {
-		warning (darwin_warn_nonportable_cfstrings, "%s in CFString literal",
-			 s[l] ? "non-ASCII character" : "embedded NUL");
+		warning (darwin_warn_nonportable_cfstrings,
+			 s[l] ? G_("non-ASCII character in CFString literal")
+			      : G_("embedded NUL in CFString literal"));
 		break;
 	      }
 	}

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix translation issue in config/darwin.c (PR target/80190)
  2019-03-07 19:40 [PATCH] Fix translation issue in config/darwin.c (PR target/80190) Jakub Jelinek
@ 2019-03-07 23:32 ` Mike Stump
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2019-03-07 23:32 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches

On Mar 7, 2019, at 11:37 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> 
> The following patch just makes it two complete diagnostic messages that
> translators can translate as they wish.
> 
> Ok for trunk?

Ok.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-07 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 19:40 [PATCH] Fix translation issue in config/darwin.c (PR target/80190) Jakub Jelinek
2019-03-07 23:32 ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).