diff mbox

[4/7] c-indentation.c: workaround xgettext limitation (PR c/79921)

Message ID 1489081529-22256-5-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm March 9, 2017, 5:45 p.m. UTC
xgettext wasn't locating the message:

	("...this statement, but the latter is misleadingly indented"
	 " as if it were guarded by the %qs"),

when building gcc.pot, and so this message was not being translated.

It appears the root cause is the parens around the concatenated
literals.  A fix would be to convert it to usage of the G_ macro,
but this patch simply removes the parens.

gcc/c-family/ChangeLog:
	PR c/79921
	* c-indentation.c (warn_for_misleading_indentation): Remove parens
	from inform's message, so that xgettext can locate it.
---
 gcc/c-family/c-indentation.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jakub Jelinek March 10, 2017, 6:26 a.m. UTC | #1
On Thu, Mar 09, 2017 at 12:45:26PM -0500, David Malcolm wrote:
> xgettext wasn't locating the message:
> 
> 	("...this statement, but the latter is misleadingly indented"
> 	 " as if it were guarded by the %qs"),
> 
> when building gcc.pot, and so this message was not being translated.
> 
> It appears the root cause is the parens around the concatenated
> literals.  A fix would be to convert it to usage of the G_ macro,
> but this patch simply removes the parens.
> 
> gcc/c-family/ChangeLog:
> 	PR c/79921
> 	* c-indentation.c (warn_for_misleading_indentation): Remove parens
> 	from inform's message, so that xgettext can locate it.

Ok, thanks.

	Jakub
diff mbox

Patch

diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c
index 329f470..8300788 100644
--- a/gcc/c-family/c-indentation.c
+++ b/gcc/c-family/c-indentation.c
@@ -607,8 +607,8 @@  warn_for_misleading_indentation (const token_indent_info &guard_tinfo,
 		      "this %qs clause does not guard...",
 		      guard_tinfo_to_string (guard_tinfo)))
 	inform (next_tinfo.location,
-		("...this statement, but the latter is misleadingly indented"
-		 " as if it were guarded by the %qs"),
+		"...this statement, but the latter is misleadingly indented"
+		" as if it were guarded by the %qs",
 		guard_tinfo_to_string (guard_tinfo));
     }
 }