diff --git a/translators/file/tmgmt_file.format.xliff.inc b/translators/file/tmgmt_file.format.xliff.inc index 6a2457d..41cec8c 100644 --- a/translators/file/tmgmt_file.format.xliff.inc +++ b/translators/file/tmgmt_file.format.xliff.inc @@ -243,6 +243,8 @@ class TMGMTFileformatXLIFF extends XMLWriter implements TMGMTFileFormatInterface $xliff_validation = $job->getSetting('xliff_validation'); foreach ($targets as $id => $target) { + $array_key = tmgmt_ensure_keys_array($id); + $job_item = tmgmt_job_item_load(array_shift($array_key)); $count = 0; $reader->XML('' . $target['#text'] . ''); while ($reader->read()) { @@ -253,8 +255,8 @@ class TMGMTFileformatXLIFF extends XMLWriter implements TMGMTFileFormatInterface } if (!isset($xliff_validation[$id]) || $xliff_validation[$id] != $count) { - $job->addMessage('Failed to validate semantic integrity of %key element. Please check also the HTML code of the element in the review process.', - array('%key' => $id)); + $job_item->addMessage('Failed to validate semantic integrity of %key element. Please check also the HTML code of the element in the review process.', + array('%key' => tmgmt_ensure_keys_string($array_key))); } } diff --git a/translators/file/tmgmt_file.test b/translators/file/tmgmt_file.test index fe3434a..62dba27 100644 --- a/translators/file/tmgmt_file.test +++ b/translators/file/tmgmt_file.test @@ -120,7 +120,7 @@ class TMGMTFileTestCase extends TMGMTBaseTestCase { $integrity_check_failed = FALSE; /** @var TMGMTMessage $message */ foreach ($job->getMessages() as $message) { - if ($message->getMessage() == t('Failed to validate semantic integrity of %key element. Please check also the HTML code of the element in the review process.', array('%key' => '2][dummy][deep_nesting'))) { + if ($message->getMessage() == t('Failed to validate semantic integrity of %key element. Please check also the HTML code of the element in the review process.', array('%key' => 'dummy][deep_nesting'))) { $integrity_check_failed = TRUE; break; }