Hi, > I have a case where the singular and plural form are the same in English, > but different in other languages. > > ngettext("%d correct", "%d correct", n) > > The Spanish translation would be > "%d correcto" (singular) > "%d correctos" (plural) > indicating the number of correct answers given.
GNU gettext supports this case. > But this gives me an error since the singular msgid is exactly the same as > the plural msgid. I don't get an error here. $ cat foo.c ngettext("%d correct", "%d correct", n); $ xgettext -o - foo.c # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-12-17 13:37+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <l...@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: foo.c:1 #, c-format msgid "%d correct" msgid_plural "%d correct" msgstr[0] "" msgstr[1] "" The important thing here is that you don't have 2 msgids, but 1 msgid with an associated msgid_plural. What was the error you got? From which tool? Which version of the tool? Bruno