This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix .pot merging for singular/plural message
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Dec 2010 19:59:40 +0000 (UTC)
- Subject: Fix .pot merging for singular/plural message
It appears xgettext, when used to merge .pot files as in exgettext,
cannot handle the same message appearing both as an ordinary message
for translation and as a singular form in a singular/plural pair.
The messages "candidate is:" and "candidates are:" appeared like that
in the C++ front end. This patch fixes the exgettext failure by
moving one use to ngettext (the other is using inform_n).
Bootstrapped with no regressions on x86_64-unknown-linux-gnu. Applied
to mainline.
2010-12-18 Joseph Myers <joseph@codesourcery.com>
* pt.c (most_specialized_class): Use ngettext to determine
"candidates are:" / "candidate is" message.
Index: pt.c
===================================================================
--- pt.c (revision 168023)
+++ pt.c (working copy)
@@ -16512,7 +16512,7 @@ most_specialized_class (tree type, tree
if (!(complain & tf_error))
return error_mark_node;
error ("ambiguous class template instantiation for %q#T", type);
- str = TREE_CHAIN (list) ? _("candidates are:") : _("candidate is:");
+ str = ngettext ("candidate is:", "candidates are:", list_length (list));
for (t = list; t; t = TREE_CHAIN (t))
{
error ("%s %+#T", spaces ? spaces : str, TREE_TYPE (t));
--
Joseph S. Myers
joseph@codesourcery.com