-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAH-3002 | Add. Script To Push Translations To Transifex
* [Parvathy, Rahul] | BAH-3002 | Add. Script To Push Translations to Transifex Co-authored-by: Parvathy Babu <parvathy.babu@thoughtworks.com> * [Parvathy, Rahul] | BAH-3002 | Add. Resource To Transifex Config Co-authored-by: Parvathy Babu <parvathy.babu@thoughtworks.com> --------- Co-authored-by: Parvathy Babu <parvathy.babu@thoughtworks.com>
- Loading branch information
1 parent
469c441
commit a8bb471
Showing
4 changed files
with
110 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
function command_exists() { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
if ! command_exists tx; then | ||
echo "Transifex CLI is not installed. Installing..." | ||
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash | ||
mv tx /usr/local/bin/tx | ||
fi | ||
|
||
if [ ! -f .tx/config ]; then | ||
echo "Transifex config file (.tx/config) not found in the repository." | ||
exit 1 | ||
fi | ||
|
||
echo "Pushing translation source file to Transifex..." | ||
tx push -s | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Error: Transifex push failed. Please check the error message above." | ||
exit 1 | ||
else | ||
echo "Translation source file successfully pushed to Transifex." | ||
fi |
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
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