Jump to:
| Project: | Drupal core |
| Version: | 6.16 |
| Component: | locale.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | translation import |
Issue Summary
In file locale.inc different chunk of code parses lines from a .po file with comments and without comments.
The chunk of code, which parses lines without comments will be wrong, if these lines contains msgid_plural and its msgstr.
For example, lines
#: includes/common.inc:0
msgid "1 year"
msgid_plural "@count years"
msgstr[0] "@count год"
msgstr[1] "@count года"
msgstr[2] "@count лет"
will be imported, because there is comment "#: includes/common.inc:0" before "msgid", but lines
msgid "1 year"
msgid_plural "@count years"
msgstr[0] "@count год"
msgstr[1] "@count года"
msgstr[2] "@count лет"
will not be imported, because the comment is missing. I understand that it looks silly, but true.
Function _locale_import_read_po() contains error, because in first case will work condition
...
if (($context == "MSGSTR") || ($context == "MSGSTR_ARR"))
...
but in second case condition
...
if ($context == "MSGSTR")
...
There is little patch to solve this problem in attachment.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| locale.diff | 509 bytes | Ignored: Check issue status. | None | None |
Comments
#2
Diplicate of #860154: The locale module does not import the plural forms from the compact files
Issues should be fixed in HEAD first then backported