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

[TASK] Factor out mapping definition file

Change-Id: Iadab50ea8f8d9b3c4d8af1a9487b780964f317cd
Reviewed-on: http://review.typo3.org/44047

Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent cec2107b
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
FORCE_EXTENSION=$1 FORCE_EXTENSION=$1
EXT_PREFIX=TYPO3.core EXT_PREFIX=TYPO3.core
EXT_PREFIX_LENGTH=$(($(echo -n ${EXT_PREFIX} | wc -c) + 2)) EXT_PREFIX_LENGTH=$(($(echo -n ${EXT_PREFIX} | wc -c) + 2))
if [ ! -z "${FORCE_EXTENSION}" ]; then if [ ! -z "${FORCE_EXTENSION}" ]; then
EXTENSIONS=${FORCE_EXTENSION} EXTENSIONS=${FORCE_EXTENSION}
else else
...@@ -39,6 +40,12 @@ for EXTNAME in $EXTENSIONS; do ...@@ -39,6 +40,12 @@ for EXTNAME in $EXTENSIONS; do
echo " Processing TYPO3 ${VERSION}.x / $(date +'%d.%m.%Y %H:%M:%S')" echo " Processing TYPO3 ${VERSION}.x / $(date +'%d.%m.%Y %H:%M:%S')"
echo " -------------------------------------------" echo " -------------------------------------------"
MAPPING=${POOTLE_PO}/${EXT_PREFIX}.${EXTNAME}/.typo3/TYPO3${VERSION}.filemapping
if [ ! -f "${MAPPING}" ]; then
echo "Cannot find mapping file '${MAPPING}': skipping TYPO3 ${VERSION}.x."
continue
fi
rm -rf ${TER_L10N_PATH}/_$EXTNAME rm -rf ${TER_L10N_PATH}/_$EXTNAME
UPDATED_PACKAGES=0 UPDATED_PACKAGES=0
LANGUAGES="$(ls | grep -v templates)" LANGUAGES="$(ls | grep -v templates)"
...@@ -105,10 +112,6 @@ for EXTNAME in $EXTENSIONS; do ...@@ -105,10 +112,6 @@ for EXTNAME in $EXTENSIONS; do
cp -r $ORIG_LANG/* ${BUILD_PATH} cp -r $ORIG_LANG/* ${BUILD_PATH}
pushd ${BUILD_PATH} >/dev/null pushd ${BUILD_PATH} >/dev/null
for XLF in $(find . -type f -name \*.xlf | cut -b3-); do for XLF in $(find . -type f -name \*.xlf | cut -b3-); do
MAPPING=${POOTLE_PO}/${EXT_PREFIX}.${EXTNAME}/.typo3/TYPO3${VERSION}.filemapping
if [ ! -f "${MAPPING}" ]; then
continue
fi
TARGET_FILE=$(grep $XLF ${MAPPING} | cut -d' ' -f2) TARGET_FILE=$(grep $XLF ${MAPPING} | cut -d' ' -f2)
if [ -z "${TARGET_FILE}" ]; then if [ -z "${TARGET_FILE}" ]; then
echo $XLF | egrep -q '^locallang\.(.*)\.xlf$'; echo $XLF | egrep -q '^locallang\.(.*)\.xlf$';
......
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