Skip to content

Conversation

@ben-kaufman
Copy link
Contributor

Adds a script to pull the latest Android translation files from Transifex and adjust the folders and format to match the project.

Note: iOS strings were outdated, which is the reason for large updates in many of the strings files.

@ben-kaufman ben-kaufman force-pushed the chore/update-translations branch from 0883e33 to 8dcf17f Compare November 11, 2025 01:53
@ben-kaufman ben-kaufman force-pushed the chore/update-translations branch from 8dcf17f to 65a3cc0 Compare November 11, 2025 02:16
@jvsena42 jvsena42 requested a review from Copilot November 11, 2025 13:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a script to automate pulling and processing translation files from Transifex for the iOS project. The script handles downloading translations, renaming locale directories to match iOS conventions, normalizing file formats, and cleaning up empty files. The Transifex configuration has been updated to work with iOS .strings files instead of JSON format.

Key changes:

  • New bash script for automated translation management
  • Updated Transifex configuration for iOS .strings format
  • Mass updates to translation files across multiple languages

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

File Description
scripts/pull-translations.sh New automation script for pulling and processing Transifex translations
README.md Updated documentation with instructions for pulling translations
.tx/config Simplified Transifex config to support iOS .strings format
*.lproj/Localizable.strings Updated translation files across all supported languages

Comment on lines +153 to +157
if awk '{
gsub(/[[:space:]]+$/, "")
if ($0 ~ /^"[^"]*"[[:space:]]*=[[:space:]]*"";[[:space:]]*$/) next
print
}' "$file" > "$file.tmp"; then
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The awk script embedded in the normalization step has complex regex logic without explanation. Add a comment describing what this pattern matches (empty string assignments) and why they are being removed.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +50
- Create a `.transifexrc` file in your home directory (`~/.transifexrc`) with your API token:
```ini
[https://www.transifex.com]
rest_hostname = https://rest.api.transifex.com
token = YOUR_API_TOKEN_HERE
```
- You can get your API token from your [Transifex account settings](https://www.transifex.com/user/settings/api/)
- The CLI will prompt you for an API token if one is not configured

Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation shows creating a .transifexrc file manually, but the modern Transifex CLI uses tx init and stores credentials differently. Consider updating the documentation to mention the recommended tx init approach or clarify that this is for legacy authentication.

Suggested change
- Create a `.transifexrc` file in your home directory (`~/.transifexrc`) with your API token:
```ini
[https://www.transifex.com]
rest_hostname = https://rest.api.transifex.com
token = YOUR_API_TOKEN_HERE
```
- You can get your API token from your [Transifex account settings](https://www.transifex.com/user/settings/api/)
- The CLI will prompt you for an API token if one is not configured
- **Recommended:** Run `tx init` and follow the prompts to authenticate with your API token:
```sh
tx init
```
- You can get your API token from your [Transifex account settings](https://www.transifex.com/user/settings/api/)
- The CLI will prompt you for an API token if one is not configured.
> [!NOTE]
> **Legacy/Advanced:** If you need to manually configure authentication (e.g., for CI or legacy workflows), you can create a `.transifexrc` file in your home directory (`~/.transifexrc`) with your API token:
> ```ini
> [https://www.transifex.com]
> rest_hostname = https://rest.api.transifex.com
> token = YOUR_API_TOKEN_HERE
> ```

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cli asks me the token every time I run the cript, tested setting on my home directory and in the root project 🤔

[https://app.transifex.com]
rest_hostname = https://rest.api.transifex.com
token         = tokentext

[https://www.transifex.com]
rest_hostname = https://rest.api.transifex.com
token         = tokentext

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the script worked for me, but it would be good to take a look at this copilot comment

@jvsena42 jvsena42 merged commit 06a4415 into master Nov 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants