29/06
2016
Add description here
Only tagged translations will be transfered into the .json.
The tag is an attribute in the
To have a translation transfered to json the trans-unit element has to look like:, (*2)
<trans-unit [...] [attribute-name]="Json source name"> <source>xlif source name</source> <target>xlif target name</target> </trans-unit>
The above example is converted to json like this:, (*3)
{ "Json source name": "xlif target name" }
If in xlif the element <target>
is not available the content of <source>
is used instead., (*4)
./flow xliftojson:parseXLF --pathToInputXlf "[/INPUT/PATH/TO].xlf" --pathToOutputJson "[/OUTPUT/PATH/TO].json" --attribute "[ATTRIBUTE-NAME]"
Description of the parameters:, (*5)
./flow xliftojson:parseXLF
--pathToInputXlf "[/INPUT/PATH/TO].xlf"
--pathToOutputJson "[/OUTPUT/PATH/TO].json"
Easiest way to get the absolute path is to navigate to the file in the bash and type pwd
.
--attribute "[ATTRIBUTE-NAME]"
Alternative: If used without the parameters (just: ./flow xliftojson:parseXLF
) you will be asked for the parameters one after another., (*6)