-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Parvathy, Rahul] | BAH-3002 | Add. Script To Push Translations to Tr…
…ansifex Co-authored-by: Parvathy Babu <[email protected]>
- Loading branch information
1 parent
fd1454a
commit 59e3f1f
Showing
2 changed files
with
31 additions
and
0 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