Skip to content

4.0.1 plural forms bug #119

@lxg

Description

@lxg

When I create a file with the following content:

<?php ngettext("dog", "dogs", 2);

And I try to extract the string to a .po file like this:

    $catalog = Translations::fromPhpCodeFile("test.php");
    $catalog->setLanguage("de_DE");
    $catalog->toPoFile("test.po");

The resulting file has the following content:

msgid ""
msgstr ""
# [ omitting irrelevant headers ]
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#: test.php:1
msgid "dog"
msgid_plural "dogs"
msgstr[0] ""

I am pretty sure there should be a msgstr[1] "" line at the end. Or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions