In the exported .po files, the msgctxt parts are in the middle but according to the .po file format's specification (http://www.gnu.org/software/hello/manual/gettext/PO-Files.html):

"Here also, a msgctxt context can be specified before msgid, like above."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

Can you provide an excerpt of how is this exactly broken?

Gábor Hojtsy’s picture

BTW we just use the Drupal 7 core code, which does exactly this (around line 1321). http://drupalcode.org/viewvc/drupal/drupal/includes/locale.inc?revision=...

aries’s picture

  1. Export a translation of D7.
  2. Check the stats of the export with msgfmt tool, eg msgfmt --stat drupal-7.0-alpha1-hu2.po
    You'll receive similar error messages:
    drupal-7.0-alpha1-hu.po:7787: missing `msgstr' section
    drupal-7.0-alpha1-hu.po:7789:7: syntax error
    drupal-7.0-alpha1-hu.po:7790: missing `msgstr' section
    drupal-7.0-alpha1-hu.po:7792:7: syntax error
    

    etc.

  3. If you check the export, you'll see this:
    msgid "January"
    msgctxt "Long month name"
    msgstr "január"
    

    The good version:

    msgctxt "Long month name"
    msgid "January"
    msgstr "január"
    
Gábor Hojtsy’s picture

Status: Postponed (maintainer needs more info) » Active

I've rolled out a quick fix live to help your work on the server and will come back to commit fixes to l10n_server and potx and submit a core issue.

Gábor Hojtsy’s picture

Status: Active » Fixed
FileSize
1.67 KB

Committed this one to l10n_server.

Gábor Hojtsy’s picture

Project: Localization server » Translation template extractor
Version: 6.x-1.x-dev » 6.x-3.x-dev
Component: Export » Code
FileSize
2.36 KB

This change should go into Potx module as well, also committed there.

Gábor Hojtsy’s picture

Version: 6.x-3.x-dev » 7.x-1.x-dev
FileSize
2.54 KB

And this goes to the 7.x branch of potx as well. Fun :) Committed there.

Gábor Hojtsy’s picture

Project: Translation template extractor » Drupal core
Version: 7.x-1.x-dev » 7.x-dev
Component: Code » language system
Priority: Critical » Normal
Status: Fixed » Needs review
FileSize
998 bytes

And here comes the Drupal 7 core patch. I'll not be able to commit, and we need to wait for automated testing on it anyway.

Gábor Hojtsy’s picture

@aries: looks good for an RTBC? :)

aries’s picture

@goba: I checked on a test environment, and looks ok, works well.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community
plach’s picture

Component: language system » locale.module

Cleaning-up the "language system" issue queue as per http://cyrve.com/criticals.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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