Commit 1fa65168 authored by Xavier Perseguers's avatar Xavier Perseguers
Browse files

[!!!][TASK] Rename TYPO3.TYPO3.* project into TYPO3.*

Change-Id: Iaa31b403e043d1a2f51e2ec245f1483ae73c24dc
Reviewed-on: http://review.typo3.org/41468

Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent 1fc5a907
......@@ -69,10 +69,7 @@ Migrating data from production
$ sudo su - pootle
$ ~/scripts/bin/migration/migrate-typo3-xliff
- Create Pootle projects:
- TYPO3.TYPO3.core.frontend
- TYPO3.TYPO3.core.compatibility6
$ ~/scripts/bin/migration/project-renamer
- Update your password to be "password"::
......
......@@ -6,7 +6,7 @@
# -- no need to modify anything below
FORCE_EXTENSION=$1
EXT_PREFIX=TYPO3.TYPO3.ext
EXT_PREFIX=TYPO3.ext
EXT_PREFIX_LENGTH=$(($(echo -n ${EXT_PREFIX} | wc -c) + 2))
if [ ! -z "${FORCE_EXTENSION}" ]; then
EXTENSIONS=${FORCE_EXTENSION}
......
......@@ -6,7 +6,7 @@
# -- no need to modify anything below
FORCE_EXTENSION=$1
EXT_PREFIX=TYPO3.TYPO3.core
EXT_PREFIX=TYPO3.core
EXT_PREFIX_LENGTH=$(($(echo -n ${EXT_PREFIX} | wc -c) + 2))
if [ ! -z "${FORCE_EXTENSION}" ]; then
EXTENSIONS=${FORCE_EXTENSION}
......
#!/usr/bin/env bash
. /home/pootle/scripts/etc/pootle.conf
. /home/pootle/scripts/etc/functions
echo
echo "This script will rename TYPO3.TYPO3.* projects into TYPO3.*"
echo "Press ENTER to continue"
read
pushd ${POOTLE_PO} >/dev/null
PROJECTS=$(find . -maxdepth 1 -name TYPO3.TYPO3.\* -type d | cut -b3- | sort)
for PROJECT in ${PROJECTS}; do
NEW_NAME=$(echo ${PROJECT} | cut -b7-)
echo "[INFO] Renaming project ${PROJECT}"
mysqlpipe "
UPDATE pootle_app_project SET
code = REPLACE(code, 'TYPO3.TYPO3.', 'TYPO3.'),
fullname = REPLACE(fullname, 'TYPO3.TYPO3.', 'TYPO3.')
WHERE code = '${PROJECT}'
"
mysqlpipe "
UPDATE pootle_app_translationproject SET
real_path = REPLACE(real_path, 'TYPO3.TYPO3.', 'TYPO3.'),
pootle_path = REPLACE(pootle_path, 'TYPO3.TYPO3.', 'TYPO3.')
WHERE real_path LIKE '${PROJECT}/%'
"
mysqlpipe "
UPDATE pootle_store_store SET
file = REPLACE(file, 'TYPO3.TYPO3.', 'TYPO3.'),
pootle_path = REPLACE(pootle_path, 'TYPO3.TYPO3.', 'TYPO3.')
WHERE file LIKE '${PROJECT}/%'
"
mv ${PROJECT} ${NEW_NAME}
done
popd >/dev/null
echo "[INFO] ====== UPDATE FINISHED ======"
\ No newline at end of file
......@@ -8,11 +8,11 @@ SOURCES=${LOCAL_GIT_CLONE_DIRECTORY}/TYPO3.CMS
cd $(dirname $0)
# Usage; check_typo3_typo3_core_projects_languages
function check_typo3_typo3_core_projects_languages() {
# Usage; check_typo3_core_projects_languages
function check_typo3_core_projects_languages() {
echo
echo "[INFO] Check available languages"
for CORE_PROJECT in $(list_typo3_typo3_core_projects); do
for CORE_PROJECT in $(list_typo3_core_projects); do
check_available_languages $CORE_PROJECT
done
}
......@@ -21,7 +21,7 @@ function check_typo3_typo3_core_projects_languages() {
trap "exit" INT
# Check project language configuration
check_typo3_typo3_core_projects_languages
check_typo3_core_projects_languages
if [ ! -d ${SOURCES}/.git ]; then
echo "[INIT] Cloning TYPO3 CMS sources into ${SOURCES}"
......@@ -63,7 +63,7 @@ for VERSION in ${VERSIONS}; do
SYSTEM_EXTENSIONS=$(find . -maxdepth 1 -type d | cut -b3- | sort)
for EXTENSION in ${SYSTEM_EXTENSIONS}; do
PROJECT="TYPO3.TYPO3.core.${EXTENSION}"
PROJECT="TYPO3.core.${EXTENSION}"
if [ $(find ${EXTENSION} -name \*.xlf | wc -l) -eq 0 ]; then
continue
......@@ -234,7 +234,7 @@ done
pushd ${POOTLE_PO} >/dev/null
PROJECTS=$(find . -maxdepth 1 -name TYPO3.TYPO3.core.\* -type d | cut -b3- | sort)
PROJECTS=$(find . -maxdepth 1 -name TYPO3.core.\* -type d | cut -b3- | sort)
for PROJECT in ${PROJECTS}; do
echo "[INFO] Refreshing Pootle for project ${PROJECT}"
......
......@@ -21,10 +21,10 @@ function log_notice() {
# Usage: mysqlpipe "sql-query"
function mysqlpipe() {
local DATABASE_NAME=$(grep ^DATABASE_NAME ${POOTLE_CONF} | sed -r "s/.* = '([^']+)'.*/\1/")
local DATABASE_USER=$(grep ^DATABASE_USER ${POOTLE_CONF} | sed -r "s/.* = '([^']+)'.*/\1/")
local DATABASE_PASSWORD=$(grep ^DATABASE_PASSWORD ${POOTLE_CONF} | sed -r "s/.* = '([^']+)'.*/\1/")
local DATABASE_HOST=$(grep ^DATABASE_HOST ${POOTLE_CONF} | sed -r "s/.* = '([^']+)'.*/\1/")
local DATABASE_NAME=$(grep -A8 DATABASES ${POOTLE_CONF} | grep NAME | sed -r "s/^.*: '(.*)'.*$/\1/")
local DATABASE_USER=$(grep -A8 DATABASES ${POOTLE_CONF} | grep USER | sed -r "s/^.*: '(.*)'.*$/\1/")
local DATABASE_PASSWORD=$(grep -A8 DATABASES ${POOTLE_CONF} | grep PASSWORD | sed -r "s/^.*: '(.*)'.*$/\1/")
local DATABASE_HOST=$(grep -A8 DATABASES ${POOTLE_CONF} | grep HOST | sed -r "s/^.*: '(.*)'.*$/\1/")
echo $@ | mysql -u ${DATABASE_USER} -p"${DATABASE_PASSWORD}" -h ${DATABASE_HOST} ${DATABASE_NAME} | sed '1d'
}
......@@ -58,12 +58,12 @@ function llxml2xliff() {
# Usage: list_all_typo3_project
function list_all_typo3_project() {
ls ${POOTLE_PO} | grep ^TYPO3.TYPO3
ls ${POOTLE_PO} | grep ^TYPO3.
}
# Usage: list_typo3_typo3_core_projects
function list_typo3_typo3_core_projects() {
ls ${POOTLE_PO} | grep ^TYPO3.TYPO3.core
# Usage: list_typo3_core_projects
function list_typo3_core_projects() {
ls ${POOTLE_PO} | grep ^TYPO3.core.
}
# Usage: project_exist project.name
......
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