This repo houses scripts which are shared between the different platform repos for Session, it also contains a number of Actions used to automatically sync some shared elements across the repos.
Automated workflow that downloads translations from Crowdin, validates them, and creates PRs for iOS and Android platforms and for the Typescript Localization Module for Desktop and QA.
| Secret | Description |
|---|---|
CROWDIN_API_TOKEN |
Crowdin personal access token (see scopes below) |
CROWDIN_PR_TOKEN |
GitHub token with PR creation permissions |
Crowdin scopes personal access tokens per endpoint family, so a token missing one
scope returns 403 Forbidden on just those endpoints while every other call keeps
working. The scripts in this repo need:
| Scope | Value | Needed for |
|---|---|---|
| Projects | project |
Project details and the target-language list |
| Source files & strings | project.source |
Listing source strings (approve_strings.py, multiple-translations report) |
| Translations | project.translation |
Translation exports, plus reading/adding approvals and translations |
| Glossaries | glossary |
Non-translatable strings (glossary terms) |
Note: Scopes only cap what a token may do — they don't grant anything the token's Crowdin account can't already do, so the account also needs a project role that allows it (manager/proofreader for anything that writes, e.g. the approvals
POSTinapprove_strings.py).
| Input | Default | Description |
|---|---|---|
UPDATE_PULL_REQUESTS |
true |
Create/update PRs for all platforms |
SKIP_VALIDATION_ERRORS |
false |
Continue even if string validation fails |
Runs automatically every Monday at 00:00 UTC.
- Valid
{variable}syntax - No broken braces ({,},{},{ space }) - Allowed HTML tags only - Only
<b>,<br/>,<span> - Valid tag syntax - No malformed
<(e.g.,<script>,<123>)
- Variables match English - Same
{variables}as source locale - Tag count matches English - Same number of tags (warning only)
- No extra keys - No strings that don't exist in English
Note: Plural strings skip variable/tag comparison because languages have different plural forms (English: 2, Arabic: 6, Russian: 4). It would be nice to add suppot for plural validation in the future.
If a workflow fails and is in the list of workflows monitored by the failure notificaiton workflow, the failure notificaiton workflow will send a message to a discord webhook.
| Secret | Description |
|---|---|
DISCORD_WEBHOOK_URL |
Url for the Discord webhook |
DISCORD_ROLE_ID |
Discord role id to tag in messages |
The failure notification can be triggered by manualy running the Test Failure Notification workflow.