Commit 71a2e892 authored by Xavier Perseguers's avatar Xavier Perseguers
Browse files

[TASK] Pootle table pootle_store_store should be migrated

Change-Id: I24163a96ba530a9bb575529fb8fed10c3eb300df
Reviewed-on: http://review.typo3.org/41481

Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent 1fa65168
......@@ -68,8 +68,8 @@ Migrating data from production
- Migrate XLIFF to global space with unique id::
$ sudo su - pootle
$ ~/scripts/bin/migration/migrate-typo3-xliff
$ ~/scripts/bin/migration/project-renamer
$ ~/scripts/bin/migration/1-migrate-typo3-xliff
$ ~/scripts/bin/migration/2-project-renamer
- Update your password to be "password"::
......
#!/usr/bin/env bash
. /home/pootle/scripts/etc/pootle.conf
. /home/pootle/scripts/etc/functions
pushd ${POOTLE_PO} >/dev/null
......@@ -18,7 +19,7 @@ for PROJECT in ${PROJECTS}; do
rm -rf .converted
mkdir .converted
FILES=$(find . -name \*.xlf)
FILES=$(find . -name \*.xlf | cut -b3-)
for FILE in ${FILES}; do
T3ID=$(xmlstarlet sel -t -m "//xliff/file" -v "@t3:id" ${FILE} 2>/dev/null)
if [ -z "${T3ID}" ]; then
......@@ -30,7 +31,15 @@ for PROJECT in ${PROJECTS}; do
echo "[ERROR] OOOPS! Duplicate T3ID ${T3ID} with $FILE" >&2
exit 1
fi
mv $FILE ${TARGET_NAME}
mysqlpipe "
UPDATE pootle_store_store SET
file = REPLACE(file, '${FILE}', 'locallang.${T3ID}.xlf'),
pootle_path = REPLACE(pootle_path, '${FILE}', 'locallang.${T3ID}.xlf'),
name = 'locallang.${T3ID}.xlf'
WHERE file LIKE '${PROJECT}/${LANGUAGE}/${FILE}'
"
mv ${FILE} ${TARGET_NAME}
done
mv .converted/*.xlf . >/dev/null 2>&1
......@@ -49,3 +58,5 @@ for PROJECT in ${PROJECTS}; do
done
popd >/dev/null
echo "[INFO] ====== UPDATE FINISHED ======"
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