This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: gettextize jv-exp.y
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: tromey at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 25 Jun 2002 22:57:16 -0400
- Subject: Re: RFA: gettextize jv-exp.y
- References: <87bs9zhp7c.fsf@fleche.redhat.com>
This patch gettextizes jv-exp.y.
In this case one code change was required. Look at yyerror().
Also I fixed a couple of typos while I was at it.
I would have ignored it but you mentioned fixing typos. Some more ..
ClassInstanceCreationExpression:
NEW ClassType '(' ArgumentList_opt ')'
- { error ("FIXME - ClassInstanceCreationExpression"); }
+ { error (_("FIXME - ClassInstanceCreationExpression")); }
internal_error (_("..."));
ArgumentList:
@@ -408,9 +408,9 @@
ArrayCreationExpression:
NEW PrimitiveType DimExprs Dims_opt
- { error ("FIXME - ArrayCreatiionExpression"); }
+ { error (_("FIXME - ArrayCreationExpression")); }
| NEW ClassOrInterfaceType DimExprs Dims_opt
- { error ("FIXME - ArrayCreatiionExpression"); }
+ { error (_("FIXME - ArrayCreationExpression")); }
Ditto.
DimExprs:
@@ -445,11 +445,11 @@
MethodInvocation:
Name '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("method invocation not implemented")); }
Leading capital letter in error message.
| Primary '.' SimpleName '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("method invocation not implemented")); }
| SUPER '.' SimpleName '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("method invocation not implemented")); }
;
Ditto.
ArrayAccess:
@@ -539,7 +539,7 @@
int i;
int base = expout_ptr - last_exp_size - 3;
if (base < 0 || expout->elts[base+2].opcode != OP_TYPE)
- error ("invalid cast expression");
+ error (_("invalid cast expression"));
Ditto.
type = expout->elts[base+1].type;
/* Remove the 'Expression' and slide the
UnaryExpressionNotPlusMinus down to replace it. */
@@ -795,7 +795,7 @@
return ERROR;
if (n > limit_div_base
|| (n *= base) > limit - c)
- error ("Numeric constant too large.");
+ error (_("Numeric constant too large."));
I'm not 100% certain but I believe the intent, in GDB is for error
messages to not include the period?
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
+ if (msg)
+ error (_("%s: near `%s'."), lexptr);
The above is wrong, shouldn't --enable-gdb-warnings=,-Werror be
detecting this? It includes -Wprintf.
Andrew