-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(translations): Allow to validate the sync setup of an app
Signed-off-by: Joas Schilling <coding@schilljs.com>
- Loading branch information
1 parent
a33e8f2
commit 21e15c6
Showing
4 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -d "temp" ]; then | ||
mkdir "temp" | ||
fi | ||
|
||
cd temp | ||
echo $PWD | ||
|
||
versions='main master stable31 stable30 stable29' | ||
if [ -f '.tx/backport' ]; then | ||
versions="main master $(cat .tx/backport)" | ||
fi | ||
|
||
git clone git@github.com:$1/$2 | ||
cd $2 | ||
|
||
for version in $versions | ||
do | ||
# skip if the branch doesn't exist | ||
if git branch -r | egrep "^\W*origin/$version$" ; then | ||
echo "Validating branch: $version" | ||
echo "---" | ||
else | ||
echo "Invalid branch: $version" | ||
continue | ||
fi | ||
git checkout $version | ||
|
||
if [ ! -f '.tx/config' ]; then | ||
echo 'Translation config .tx/config is missing' | ||
fi | ||
|
||
if [ ! -f 'l10n/.gitkeep' ]; then | ||
echo 'l10n/.gitkeep is missing' | ||
fi | ||
|
||
if [ ! -f '.l10nignore' ]; then | ||
echo 'Consider adding .l10nignore and exclude 3rd-party directories like vendor/ and vendor-bin/ as well as directories with compiled javascript assets like js/' | ||
fi | ||
|
||
echo 'Checking translation source strings' | ||
|
||
php ../../translations/translationtool/translationtool.phar prepare-source-validation | ||
../../translations/validateTranslationFiles.sh . | ||
done | ||
|
||
cd ../../ | ||
rm -rf temp | ||
|