Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singular form msgstr used together with msgid plural #21

Closed
wants to merge 1 commit into from

Conversation

pmettraux
Copy link

For plural form this tool generates this:
msgid "%d Comment" msgid_plural "%d Comments" msgstr ""

poedit and probably other editor are going to throw an error because when we use the plural form we should use multiple msgstr

My change will generate this result:
msgid "%d Comment" msgid_plural "%d Comments" msgstr[0] "" msgstr[1] ""

For plural form this tool generates this:
```msgid "%d Comment"
msgid_plural "%d Comments"
msgstr ""```

poedit and probably other editor are going to throw an error because when we use the plural form we should use multiple `msgstr`

My change will generate this result:
```msgid "%d Comment"
msgid_plural "%d Comments"
msgstr[0] ""
msgstr[1] ""```
@johnyb
Copy link
Collaborator

johnyb commented Oct 7, 2015

It would be great to have a test-case that is failing without your change. This way, we make sure, this won't break in the future.

@johnyb
Copy link
Collaborator

johnyb commented Oct 7, 2015

Also, what happens, if the msgstr already contains some data? In such cases self.msgstr will be overwritten anyway and the data is lost.

@johnyb johnyb added the bug label Oct 7, 2015
@johnyb
Copy link
Collaborator

johnyb commented Oct 7, 2015

@pmettraux btw, did you know, you can easily update PR by just (force)-pushing to the branch you started the PR from? No need to close old PR if those need an update.

Thanks for you contribution! 🙇

@pmettraux
Copy link
Author

Actually I was able to do the same thing but from outside the library. So I will close this pull-request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants