Import XLIFF without cdata or processing does not decode tags when importing, that's wrong the tags must be decoded.

Comments

edurenye created an issue. See original summary.

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB
new2.91 KB

Fixed and tested.

The last submitted patch, 2: import_xliff_without-2733401-2-test_only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 2: import_xliff_without-2733401-2.patch, failed testing.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new2.64 KB
new1.03 KB

Fixed failing test, and now it makes more sense.

berdir’s picture

Title: Import XLIFF without cdata does not decode tags when importing » Import XLIFF without cdata/processing does not decode tags when importing
Version: 8.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Patch (to be ported)
+++ b/translators/tmgmt_file/src/Plugin/tmgmt_file/Format/Xliff.php
@@ -353,7 +353,7 @@ class Xliff extends \XMLWriter implements FormatInterface {
       foreach ($this->importedXML->xpath('//xliff:trans-unit') as $unit) {
-        if ($job->getSetting('xliff_cdata')) {
+        if (!$job->getSetting('xliff_processing')) {
           $this->importedTransUnits[(string) $unit['id']]['#text'] = (string) $unit->target;
           continue;
         }

Interesting way to fix this.

Makes sense and now I'm wondering if it is this addition that caused this regression.

Committed.

  • Berdir committed 52d4ba0 on 8.x-1.x authored by edurenye
    Issue #2733401 by edurenye: Import XLIFF without cdata/processing does...
berdir’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new2.28 KB

Git actually did a pretty nice job when cherry-picking the commit.

  • Berdir committed b071a1e on 7.x-1.x
    Issue #2733401 by edurenye, Berdir: Import XLIFF without cdata/...
berdir’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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