This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Some more translation related tweaks


After Jakub's and Marek's latest translation patches, I grepped for
other unmarked messages. Here's what I found in the C++ front-end.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

Regards,
Volker


2017-02-26  Volker Reichelt  <v.reichelt@netcologne.de>

	* init.c: Include intl.h
	(build_new_1): Mark strings for translation.
	* pt.c (tsubst_copy_and_build): Mark string for translation.
	Make the pointer const.
	* semantics.c (finish_id_expression): Mark strings for translation.

Index: gcc/cp/init.c
===================================================================
--- gcc/cp/init.c	(revision 245719)
+++ gcc/cp/init.c	(working copy)
@@ -29,6 +29,7 @@
 #include "varasm.h"
 #include "gimplify.h"
 #include "c-family/c-ubsan.h"
+#include "intl.h"
 
 static bool begin_init_stmts (tree *, tree *);
 static tree finish_init_stmts (bool, tree, tree);
@@ -2805,11 +2806,11 @@
 	{
 	  const char *msg;
 	  if (typedef_variant_p (orig_type))
-	    msg = ("non-constant array new length must be specified "
-		   "directly, not by typedef");
+	    msg = G_("non-constant array new length must be specified "
+		     "directly, not by typedef");
 	  else
-	    msg = ("non-constant array new length must be specified "
-		   "without parentheses around the type-id");
+	    msg = G_("non-constant array new length must be specified "
+		     "without parentheses around the type-id");
 	  pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location),
 		   OPT_Wvla, msg);
 	}
Index: gcc/cp/pt.c
===================================================================
--- gcc/cp/pt.c	(revision 245719)
+++ gcc/cp/pt.c	(working copy)
@@ -17190,10 +17190,11 @@
 		       stricter.  */
 		    bool in_lambda = (current_class_type
 				      && LAMBDA_TYPE_P (current_class_type));
-		    char const *msg = "%qD was not declared in this scope, "
-		      "and no declarations were found by "
-		      "argument-dependent lookup at the point "
-		      "of instantiation";
+		    char const *const msg =
+		      G_("%qD was not declared in this scope, "
+			 "and no declarations were found by "
+			 "argument-dependent lookup at the point "
+			 "of instantiation");
 
 		    bool diag = true;
 		    if (in_lambda)
Index: gcc/cp/semantics.c
===================================================================
--- gcc/cp/semantics.c	(revision 245719)
+++ gcc/cp/semantics.c	(working copy)
@@ -3510,7 +3510,7 @@
 	  && DECL_CONTEXT (decl) == NULL_TREE
 	  && !cp_unevaluated_operand)
 	{
-	  *error_msg = "use of parameter outside function body";
+	  *error_msg = G_("use of parameter outside function body");
 	  return error_mark_node;
 	}
     }
@@ -3520,13 +3520,13 @@
   if (TREE_CODE (decl) == TEMPLATE_DECL
       && !DECL_FUNCTION_TEMPLATE_P (decl))
     {
-      *error_msg = "missing template arguments";
+      *error_msg = G_("missing template arguments");
       return error_mark_node;
     }
   else if (TREE_CODE (decl) == TYPE_DECL
 	   || TREE_CODE (decl) == NAMESPACE_DECL)
     {
-      *error_msg = "expected primary-expression";
+      *error_msg = G_("expected primary-expression");
       return error_mark_node;
     }
 
===================================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]