Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/docker-ci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-09-12 08:46:16 +0300
committerJoas Schilling <coding@schilljs.com>2022-09-12 08:48:32 +0300
commitd70f0269d6eb324b289f024e9027735c511d8efb (patch)
tree2206465aa5635086f2a55004ff35cde362a9bbf5
parente51b72ed4c034380a9a5651790c2fd5cd46aa664 (diff)
Fix the source file name for apps where the resource id is not the app id
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rwxr-xr-xtranslations-app/handleAppTranslations.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/translations-app/handleAppTranslations.sh b/translations-app/handleAppTranslations.sh
index 1c1ce54..59c5bee 100755
--- a/translations-app/handleAppTranslations.sh
+++ b/translations-app/handleAppTranslations.sh
@@ -18,6 +18,8 @@ fi
APP_ID=$(grep -oE '<id>.*</id>' appinfo/info.xml | head --lines 1 | sed -E 's/<id>(.*)<\/id>/\1/')
RESOURCE_ID=$(grep -oE '\[nextcloud\..*\]' .tx/config | sed -E 's/\[nextcloud.(.*)\]/\1/')
+SOURCE_FILE=$( grep -oE '^source_file\s*=\s*(.+)$' | sed -E 's/source_file\s*=\s*(.+)/\1/')
+
if [ "$RESOURCE_ID" = "MYAPP" ]; then
echo "Invalid transifex configuration file .tx/config (translating MYAPP instead of real value)"
exit 2
@@ -72,13 +74,13 @@ done
for file in $(ls stable-templates/master.*)
do
name=$(echo $file | cut -b 25- )
- msgcat --use-first stable-templates/*.$name > translationfiles/templates/$name
+ msgcat --use-first stable-templates/*.$name > $SOURCE_FILE
done
# alternative merge of main branch
for file in $(ls stable-templates/main.*)
do
name=$(echo $file | cut -b 23- )
- msgcat --use-first stable-templates/*.$name > translationfiles/templates/$name
+ msgcat --use-first stable-templates/*.$name > $SOURCE_FILE
done
# remove intermediate POT files