This is missing.

Comments

laurentchardin’s picture

Status: Active » Needs review
StatusFileSize
new1.16 KB

Background : the l10n_server module is using a modified version of Drupal 7's _locale_import_read_po() which is l10n_server_parse_po().
This versions was not updated with the latest D7 one and is failing to import plurals with a context.
I proposed a patch to re-align this method : http://drupal.org/node/1960638

However, in order to update the test cases, i've discovered a big dependency with potx module.
l10n_server is actually *using* the potx samples for simpletest.

I stumple upon this issue and i'm proposing to update the potx tests to:
- add context support for plurals
- keep l10n_server module in line

Currently, i'm only adding one case on the potx_test_7_page() method.
Any feedback to make those context + plurals more complete is welcome of course.

This patch is focusing on the D7 version.

gábor hojtsy’s picture

The test should assert that the strings were recorded with context, no? As-is they are, they just ensure that the string was recorded, not that the context was associated with them.

gábor hojtsy’s picture

Status: Needs review » Needs work
gábor hojtsy’s picture

Status: Needs work » Closed (duplicate)

This actually happened as a sub-commit of #1860254: Support for Drupal 8/7 context extraction for JS translations, still will need to be ported from there to 7.x.