when exporting strings there is no contextual information associated with them which can make it more difficult for translation.

This patch adds a context-group and associated context tags to locale source strings and xliff export. Not a very clean patch but it's a start.

before

    <trans-unit id="1191][singular" resname="1191][singular">
     <source xml:lang="en">‹ previous</source>
     <target xml:lang="en-gb"/>
     <note>Singular</note>
    </trans-unit>

after

    <trans-unit id="1191][singular" resname="1191][singular">
     <source xml:lang="en">‹ previous</source>
     <target xml:lang="en-gb"/>
     <note>Singular</note>
     <context-group purpose="information">
      <context context-type="x-path">/fr/articles</context>
     </context-group>
    </trans-unit>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nod_ created an issue. See original summary.

nod_’s picture

Status: Active » Needs review
FileSize
2.49 KB

Status: Needs review » Needs work

The last submitted patch, 2: tmgmt-2940091.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Berdir’s picture

Hey _nod, will have a closer look at this later. The tests are probably failing because they are kernel tests and don't have that that table, should be easy to fix that by adding them in the setUp() method of the tests like the other tables.

Hope you otherwise like the project :)