File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,14 +90,12 @@ To pull the latest translations from Transifex:
9090 - Follow the installation instructions: [ Transifex CLI Installation] ( https://developers.transifex.com/docs/cli )
9191
92922 . ** Authenticate with Transifex** (if not already configured):
93- - Create a ` .transifexrc ` file in your home directory (` ~/.transifexrc ` ) with your API token:
94- ``` ini
95- [https://www.transifex.com]
96- rest_hostname = https://rest.api.transifex.com
97- token = YOUR_API_TOKEN_HERE
93+ - Set the ` TX_TOKEN ` environment variable with your API token:
94+ ``` sh
95+ export TX_TOKEN=" YOUR_API_TOKEN_HERE"
9896 ```
99- - You can get your API token from your [Transifex account settings](https://www.transifex.com/user/settings/api/)
100- - The CLI will prompt you for an API token if one is not configured
97+ - You can get your API token from [Transifex account settings](https://www.transifex.com/user/settings/api/)
98+ - Add it to ` ~/.zshrc ` or other shell rc file to persist across sessions
10199
1021003. ** Pull translations** :
103101 ` ` ` sh
Original file line number Diff line number Diff line change @@ -86,6 +86,13 @@ if ! command -v tx &> /dev/null; then
8686 exit 1
8787fi
8888
89+ # Check if TX_TOKEN is set
90+ if [ -z " $TX_TOKEN " ]; then
91+ echo " Error: TX_TOKEN environment variable is not set"
92+ echo " Please set it with your Transifex API token: export TX_TOKEN=\" your-token\" "
93+ exit 1
94+ fi
95+
8996# Run tx pull and check for errors
9097set +e # Temporarily disable exit on error to check tx pull status
9198tx pull -a
You can’t perform that action at this time.
0 commit comments