Commit c3b3213d authored by Xavier Perseguers's avatar Xavier Perseguers
Browse files

[BUGFIX] ll-XML fails to be converted to XLIFF

When updating extensions from TER, ll-XML are not properly
converted to XLIFF. This leads to empty labels in Pootle.

Change-Id: I797c2fe91f0f548b833fb724eae1d3b284fabc4a
Related: #68637
Reviewed-on: http://review.typo3.org/42128

Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent 990cfb78
......@@ -66,12 +66,14 @@ fi
#
# Extract t3x
rm -rf ${EXTENSION}
${T3XUTILS} extract ${EXTENSION_T3X} ${EXTENSION} >/dev/null
IFS=$(echo -en "\n\b")
#
# Create directory structure for templates
rm -rf /tmp/TYPO3.ext.${EXTENSION}
for FILE in $(find ${EXTENSION}/ -name \*.xml); do
grep "T3locallang" "${FILE}" >/dev/null
if [ $? -eq 0 ]; then
......@@ -94,12 +96,10 @@ for FILE in $(find TYPO3.ext.${EXTENSION} -name \*.xml); do
XLF_FILE=$(echo ${FILE} | sed s/.xml$/.xlf/)
if [ ! -f ${XLF_FILE} ]; then
echo "[INFO] Convert LLXML to XLIFF for file ${FILE}"
if [ ! -f $XLF_FILE ]; then
xsltproc --stringparam lang en \
--stringparam extension ${EXTENSION} \
--stringparam date "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" ${XSL_LLXML2TEMPLATE $FILE} | \
xmlstarlet ed --insert "/xliff/file/body/trans-unit" --type attr -n xml:space -v preserve > ${XLF_FILE}
fi
xsltproc --stringparam lang en \
--stringparam extension ${EXTENSION} \
--stringparam date "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" ${XSL_LLXML2TEMPLATE} ${FILE} | \
xmlstarlet ed --insert "/xliff/file/body/trans-unit" --type attr -n xml:space -v preserve > ${XLF_FILE}
fi
fi
rm -f ${FILE}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment