Hello. I've run into a rather minor issue.
An "out of range" error occurs during export if an .xlf file contains source tags without readable text (e.g, empty or only with placeholders like ph).
Adding the attribute translate="no" to tags prevents the exception, but it would probably be better if it didn't happen even without the attribute.
Steps to Reproduce:
- Import the provided .xlf file (it's valid according to this)
- Attempt to export the file back to .xlf format.
- See the error
Expected Result:
The file exports successfully. Empty sources or placeholder-only sources are preserved.
The file:
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.1" srcLang="en" trgLang="es">
<file id="original_id">
<unit id="unit_0">
<segment>
<source>Hello, World!</source>
</segment>
</unit>
<!-- Triggers error: Source contains only a placeholder tag -->
<unit id="unit_1">
<segment>
<source><ph id="0" disp="{Confirm_Button}" equiv="$BTN_CONF$" type="ui"/></source>
</segment>
</unit>
<!-- Workaround: Empty source passes because translate="no" is set -->
<unit id="unit_2" translate="no">
<segment>
<source></source>
</segment>
</unit>
<!-- Triggers error: Empty source without translate="no" -->
<unit id="unit_3">
<segment>
<source></source>
</segment>
</unit>
<unit id="unit_4">
<segment>
<source>Normal translatable text.</source>
</segment>
</unit>
</file>
</xliff>
Hello. I've run into a rather minor issue.
An "out of range" error occurs during export if an .xlf file contains
sourcetags without readable text (e.g, empty or only with placeholders likeph).Adding the attribute translate="no" to tags prevents the exception, but it would probably be better if it didn't happen even without the attribute.
Steps to Reproduce:
Expected Result:
The file exports successfully. Empty sources or placeholder-only sources are preserved.
The file: