-
Bug
-
Resolution: Fixed
-
None
-
Critical
-
Emptyshow more show less
problem
If a segment contains framing bpt and ept tags in source and target, this tags are excluded in import, and are technically moved into the skeleton file.
On export such segments produces the following error:
ERROR editor_Models_Import_FileParser_InvalidXMLException: E1024 - Invalid XML: expected closing "bpt" tag, but got tag "ept".
in core /home/tlauria/www/translate5-master/application/modules/editor/Models/Import/FileParser/XmlParser.php (569)
Trace:
#0 /home/tlauria/www/translate5-master/application/modules/editor/Models/Import/FileParser/XmlParser.php(126): editor_Models_Import_FileParser_XmlParser->handleElementEnd()
#1 /home/tlauria/www/translate5-master/application/modules/editor/Models/Import/FileParser/XmlParser.php(106): editor_Models_Import_FileParser_XmlParser->parseList()
#2 /home/tlauria/www/translate5-master/application/modules/editor/Models/Export/FileParser/Xlf.php(164): editor_Models_Import_FileParser_XmlParser->parse()
#3 /home/tlauria/www/translate5-master/application/modules/editor/Models/Export/FileParser.php(202): editor_Models_Export_FileParser_Xlf->parse()
#4 /home/tlauria/www/translate5-master/application/modules/editor/Models/Export/FileParser.php(208): editor_Models_Export_FileParser->getFile()
#5 /home/tlauria/www/translate5-master/application/modules/editor/Models/Export.php(119): editor_Models_Export_FileParser->saveFile()
#6 /home/tlauria/www/translate5-master/application/modules/editor/Models/Export/Worker.php(111): editor_Models_Export->export()
#7 /home/tlauria/www/translate5-master/library/ZfExtended/Worker/Abstract.php(512): editor_Models_Export_Worker->work()
#8 /home/tlauria/www/translate5-master/library/ZfExtended/Worker/Abstract.php(461): ZfExtended_Worker_Abstract->_run()
#9 /home/tlauria/www/translate5-master/library/ZfExtended/Controllers/WorkerController.php(119): ZfExtended_Worker_Abstract->runQueued()
#10 /home/tlauria/libaries/zf1-php7.3/library/Zend/Controller/Action.php(516): ZfExtended_WorkerController->putAction()
#11 /home/tlauria/www/translate5-master/library/ZfExtended/Controllers/AAARestController.php(287): Zend_Controller_Action->dispatch()
#12 /home/tlauria/libaries/zf1-php7.3/library/Zend/Controller/Dispatcher/Standard.php(308): ZfExtended_RestController->dispatch()
#13 /home/tlauria/libaries/zf1-php7.3/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()
#14 /home/tlauria/libaries/zf1-php7.3/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#15 /home/tlauria/libaries/zf1-php7.3/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#16 /home/tlauria/www/translate5-master/library/ZfExtended/Application.php(47): Zend_Application->run()
#17 /home/tlauria/www/translate5-master/library/ZfExtended/BaseIndex.php(147): ZfExtended_Application->run()
#18 /home/tlauria/www/translate5-master/public/index.php(35): ZfExtended_BaseIndex->startApplication()
#19 {main}
followed by
ERROR ZfExtended_Exception: E9999 - Worker "editor_Models_Export_ExportedWorker (id: 54991, state: defunct, slot: default)" is defunct!
in core /home/tlauria/www/translate5-master/library/ZfExtended/Worker/Abstract.php (401)
reason
The reason is defect in the replacement of framing tags. The following trans-unit produces a invalid skeleton xlf:
Imported XLF:
<trans-unit id="1">
<source xml:space="preserve"><bpt id="1" ctype="bold">{}</bpt>-<ept id="1">{}</ept></source>
<target xml:space="preserve"><bpt id="1" ctype="bold">{}</bpt>-<ept id="1">{}</ept></target>
</trans-unit>
Skeleton:
<trans-unit id="1">
<source xml:space="preserve"><bpt id="1" ctype="bold">{}</bpt>-<ept id="1">{}</ept></source>
<target xml:space="preserve"><bpt id="1" ctype="bold"><lekTargetSeg id="4125227" field="target" /></ept></target>
</trans-unit>
- relates to
-
TRANSLATE-1305 Exclude framing internal tags from xliff import also for translation projects
- Done
Since this problem is occured only once no fix script for existing skeleton files is written. Repairing it manually if it can not exported is much faster.