Skip to content

Commit 4733115

Browse files
ovitrifclaude
andcommitted
fix: use TX_TOKEN for transifex authentication
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 40c1e3c commit 4733115

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff 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

9292
2. **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

102100
3. **Pull translations**:
103101
```sh

scripts/pull-translations.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ if ! command -v tx &> /dev/null; then
8686
exit 1
8787
fi
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
9097
set +e # Temporarily disable exit on error to check tx pull status
9198
tx pull -a

0 commit comments

Comments
 (0)