Skip to content

Commit

Permalink
Fix the way Crowdin translations are imported
Browse files Browse the repository at this point in the history
  • Loading branch information
rm3l committed Jun 25, 2017
1 parent b901f87 commit 5223f39
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 126 deletions.
18 changes: 15 additions & 3 deletions crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,21 @@ files:
zu: zu

-
source: '/maoni-sample/src/main/play/en-US/whatsnew*'
source: '/maoni-sample/src/main/play/whatsnew*'
translation: '/maoni-sample/src/main/play/%locale%/%original_file_name%'

-
source: '/maoni-sample/src/main/play/en-US/listing/*'
translation: '/maoni-sample/src/main/play/%locale%/listing/%original_file_name%'
source: '/maoni-sample/src/main/play/listing_fulldescription'
translation: '/maoni-sample/src/main/play/%locale%/listing/fulldescription'

-
source: '/maoni-sample/src/main/play/listing_shortdescription'
translation: '/maoni-sample/src/main/play/%locale%/listing/shortdescription'

-
source: '/maoni-sample/src/main/play/listing_title'
translation: '/maoni-sample/src/main/play/%locale%/listing/title'

# -
# source: '/maoni-sample/src/main/play/listing_video'
# translation: '/maoni-sample/src/main/play/%locale%/listing/video'
121 changes: 0 additions & 121 deletions maoni-sample/src/main/play/en-US/listing/title

This file was deleted.

1 change: 1 addition & 0 deletions maoni-sample/src/main/play/listing_title
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Maoni: In-App Feedback library
File renamed without changes.
10 changes: 8 additions & 2 deletions tools/import-translations-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
java -jar crowdin-cli.jar download
rm crowdin-cli.jar

# import listing graphics
for playLangPath in ./maoni-sample/src/main/play/*-*; do
mkdir -p ${playLangPath}/listing
cp -vr ./maoni-sample/src/main/play/en-US/listing/* ${playLangPath}/listing/
done

#add, commit and push files
git add -f .
git remote rm origin
git remote add origin https://rm3l:$GITHUB_API_KEY@github.com/rm3l/maoni.git
git add -f .
git commit -q -m "Automatic translation import (build #$TRAVIS_BUILD_NUMBER)." \
git commit -m "Automatic translation import (build #$TRAVIS_BUILD_NUMBER)." \
-m "Commit $TRAVIS_COMMIT"
git push -q -f origin master > /dev/null
git push -f origin master 2>&1

echo -e "... Done with importing translations from Crowdin\n"
fi

0 comments on commit 5223f39

Please sign in to comment.