Fixed
Project:
Localization server
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Apr 2013 at 22:09 UTC
Updated:
16 Oct 2026 at 19:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
laurentchardin commentedComment #2
laurentchardin commentedI also identified that the current l10n_server_parse_po() method is actually failing plurals *with context*.
I would like to add a test case update for that, but i found out that the current test cases are somewhat dependant from the potx ones. Since i need to modify the test module for strings, it would mean i need to update the potx test cases as well.
For example, i'd like to do the following:
Modify potx_test_7.module:
and then modify the sample po file from l10n_server and add:
What do you think ?
I'm not very keen with having module *dependencies* regarding test cases. Should'nt we have a clean version of the test stuff for l10n_server only ?
Comment #3
laurentchardin commentedI've decided to do the other way around, and propose new tests to the potx module to track the context + plurals issue.
See here : http://drupal.org/node/1039552
As soon as i'm getting some feedback, i'll update the test coverage for l10n_server as well.
Comment #4
sebcorbin commentedComment #5
gábor hojtsyDoes this apply to the Drupal 6 version?
Comment #7
gábor hojtsy3.0.x still has this bug unfortnately, in
L10nPo::parse(). That is the parser of translation imports and of .po uploads. After themsgstr[0],msgstr[1]lines of a plural entry, the parser is in theMSGSTR_ARRstate, but currently amsgidormsgctxtline ends the entry only after amsgstrline. Blank lines do not end entries. So when the entry after a plural entry has no comment line:"msgctxt" is unexpected.The packaged .po files and the compact exports have no comment lines. So currently, a re-import of a downloaded package loses each plural entry that another entry follows.
I ported the suggested fix from the issue summary: a
msgidormsgctxtline also ends the entry aftermsgstr[]lines. New kernel tests (PoParserTest) parse two files with entries after plural entries.LLM disclosure
LLM was used to triage and diagnose this issue. With human review.
Comment #10
gábor hojtsy