Now that #369943: Support for extracting Drupal 7 context data is fixed for Drupal 7 context support in potx, we need to work on context support in l10n_server. The code in the Drupal 7 branch of potx is expected to be backported to Drupal 6, but that also requires an API change which l10n_server needs to obey. So I plan on coordinated releases of potx for Drupal 6 with the API change and l10n_server for Drupal 6 obeying that API change. Potx has support for parsing Drupal source for various versions of Drupal core, and backporting the added Drupal 7 support from the 7 branch should add Drupal 7 support to l10n_server as long as the correct APIs are used.

The attached patch is a start to add the context column (which in itself should not break any functionality). It does not add any context support in itself yet, so it is just a start. To be continued.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Added saving support for contexts as well as filtering on context. Works on a D7 dev zip file parsed up. Context shows up in database, filtering works properly. Also added little indication on context to singular strings in the View mode. That is to be acted upon (as well as import and export). Committed this for now however, so people keen on updating to potx 6.x-3.0 can take this one.

Gábor Hojtsy’s picture

FileSize
6.27 KB

Updated with this patch. Realized that string formatting is used for individual strings in plurals too, so we should not output the context info there. Now outputs context in view and translate mode as well.

Gábor Hojtsy’s picture

Also worked on Drupal 7 import support over the weekend. Backported the PO parsing code from Drupal 7 so we can store msgctxt information too. Found one bug in the import code, which is going to be rolled into the follow up patch in #334283: Add msgctxt-type context to t().

Still needs to work on export support.

Gábor Hojtsy’s picture

Status: Needs work » Fixed
FileSize
3.83 KB

Solving export was much simpler. This concludes the round of support for Drupal 7 contexts in l10n_server. Storage, filtering, import and export now all in.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.