# beyond-all-reason/transifex-testing architecture

> Architecture diagram of the GitHub repository beyond-all-reason/transifex-testing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/beyond-all-reason/transifex-testing
- Repository: https://github.com/beyond-all-reason/transifex-testing

## Overview

#### Purpose and Entry Points
This repository is a minimal localization fixture for developing and validating Transifex integration against the BAR internal testing project. Its primary artifacts are source and translated JSON catalogs under `language/`; there is no application runtime or service code.

#### Translation Catalog Boundary
English appears to be the source-language catalog, split by domain:
- `language/en/animals.json`
- `language/en/ui.json`

German and French mirror those domain files as translation targets:
- `language/de/animals.json`
- `language/de/ui.json`
- `language/fr/animals.json`
- `language/fr/ui.json`

The stable per-locale/per-domain file layout is the core contract between the repository and Transifex.

#### Transifex Integration
`transifex.yml` defines the repository-to-Transifex resource mapping and governs upload/download behavior. The external translation-management boundary is the BAR Transifex project identified in `README.md`; repository changes are synchronized with that hosted service rather than processed by local application code.

#### CI Synchronization Workflows
GitHub Actions automate two distinct translation lifecycle stages:
- Merge translated content into the repository: `.github/workflows/transifex_merge.yml`
- Rebase or refresh translation work against current source content: `.github/workflows/transifex_rebase.yml`

These workflows are the operational entry points for integration testing and likely invoke Transifex automation using repository or organization secrets.

#### Resource Selection and Test Scope
Two control files constrain which resources participate in specific integration scenarios:
- `language/master_only.txt`
- `language/test.txt`

They are architecturally relevant as fixture selectors: they allow workflows or Transifex configuration to exercise subset behavior separately from the complete catalog set.

#### Primary Flow
1. Source strings are edited in `language/en/`.
2. `transifex.yml` maps those catalogs to hosted Transifex resources.
3. Translators or automation update target locales in Transifex.
4. GitHub workflows synchronize returned translations into `language/de/` and `language/fr/`.
5. Fixture selector files support focused merge/rebase and integration test cases.

Main entry points: [`README.md`](https://github.com/beyond-all-reason/transifex-testing/blob/master/README.md) (BAR Transifex project), [`.github/workflows/transifex_merge.yml`](https://github.com/beyond-all-reason/transifex-testing/blob/master/.github/workflows/transifex_merge.yml) (Translation merge), [`transifex.yml`](https://github.com/beyond-all-reason/transifex-testing/blob/master/transifex.yml) (Transifex mapping), [`language/test.txt`](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/test.txt) (Test selector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalogs["Translation catalogs"]
  node_source_en["English source catalogs<br/>JSON catalogs"]
  node_en_animals["animals source<br/>JSON catalog<br/>[animals.json]"]
  node_en_ui["UI source<br/>JSON catalog<br/>[ui.json]"]
  node_target_de["German catalogs<br/>translated JSON catalogs"]
  node_de_animals["German animals<br/>JSON catalog<br/>[animals.json]"]
  node_de_ui["German UI<br/>JSON catalog<br/>[ui.json]"]
  node_target_fr["French catalogs<br/>translated JSON catalogs"]
  node_fr_animals["French animals<br/>JSON catalog<br/>[animals.json]"]
  node_fr_ui["French UI<br/>JSON catalog<br/>[ui.json]"]
end

subgraph group_automation["CI synchronization"]
  node_merge_workflow["Translation merge<br/>GitHub Actions workflow"]
  node_rebase_workflow["Translation rebase<br/>GitHub Actions workflow"]
end

node_transifex_config["Transifex mapping<br/>integration config<br/>[transifex.yml]"]
node_transifex_project{{"BAR Transifex project<br/>hosted translation service<br/>[README.md]"}}
node_master_selector["Master-only selector<br/>fixture selector<br/>[master_only.txt]"]
node_test_selector["Test selector<br/>fixture selector<br/>[test.txt]"]

node_source_en -->|"contains"| node_en_animals
node_source_en -->|"contains"| node_en_ui
node_en_animals -->|"mapped by"| node_transifex_config
node_en_ui -->|"mapped by"| node_transifex_config
node_transifex_config -->|"syncs resources"| node_transifex_project
node_transifex_project -->|"provides translations"| node_target_de
node_transifex_project -->|"provides translations"| node_target_fr
node_target_de -->|"contains"| node_de_animals
node_target_de -->|"contains"| node_de_ui
node_target_fr -->|"contains"| node_fr_animals
node_target_fr -->|"contains"| node_fr_ui
node_merge_workflow -->|"downloads translations"| node_transifex_project
node_merge_workflow -->|"updates"| node_target_de
node_merge_workflow -->|"updates"| node_target_fr
node_rebase_workflow -->|"refreshes work"| node_transifex_project
node_master_selector -.->|"selects resources"| node_transifex_config
node_test_selector -.->|"scopes scenarios"| node_merge_workflow
node_test_selector -.->|"scopes scenarios"| node_rebase_workflow

click node_en_animals "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/en/animals.json"
click node_en_ui "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/en/ui.json"
click node_transifex_config "https://github.com/beyond-all-reason/transifex-testing/blob/master/transifex.yml"
click node_transifex_project "https://github.com/beyond-all-reason/transifex-testing/blob/master/README.md"
click node_de_animals "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/de/animals.json"
click node_de_ui "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/de/ui.json"
click node_fr_animals "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/fr/animals.json"
click node_fr_ui "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/fr/ui.json"
click node_merge_workflow "https://github.com/beyond-all-reason/transifex-testing/blob/master/.github/workflows/transifex_merge.yml"
click node_rebase_workflow "https://github.com/beyond-all-reason/transifex-testing/blob/master/.github/workflows/transifex_rebase.yml"
click node_master_selector "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/master_only.txt"
click node_test_selector "https://github.com/beyond-all-reason/transifex-testing/blob/master/language/test.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_source_en,node_en_animals,node_en_ui,node_target_de,node_de_animals,node_de_ui,node_target_fr,node_fr_animals,node_fr_ui toneBlue
class node_merge_workflow,node_rebase_workflow toneAmber
class node_transifex_config,node_transifex_project,node_master_selector,node_test_selector toneNeutral
```

## Components

### Translation catalogs

Stable locale/domain layout used as the Transifex contract.

- **English source catalogs**: JSON catalogs · Source strings split into animals and UI domains.
- [animals source](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/en/animals.json): JSON catalog · `language/en/animals.json`
- [UI source](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/en/ui.json): JSON catalog · `language/en/ui.json`
- **German catalogs**: translated JSON catalogs
- [German animals](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/de/animals.json): JSON catalog · `language/de/animals.json`
- [German UI](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/de/ui.json): JSON catalog · `language/de/ui.json`
- **French catalogs**: translated JSON catalogs
- [French animals](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/fr/animals.json): JSON catalog · `language/fr/animals.json`
- [French UI](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/fr/ui.json): JSON catalog · `language/fr/ui.json`

### CI synchronization

GitHub Actions translation lifecycle workflows.

- [Translation merge](https://github.com/beyond-all-reason/transifex-testing/blob/master/.github/workflows/transifex_merge.yml): GitHub Actions workflow · Synchronizes returned translations into the repository. · `.github/workflows/transifex_merge.yml`
- [Translation rebase](https://github.com/beyond-all-reason/transifex-testing/blob/master/.github/workflows/transifex_rebase.yml): GitHub Actions workflow · Refreshes translation work against current sources. · `.github/workflows/transifex_rebase.yml`

### Other components

- [Transifex mapping](https://github.com/beyond-all-reason/transifex-testing/blob/master/transifex.yml): integration config · Maps repository catalogs to hosted resources and controls synchronization. · `transifex.yml`
- [BAR Transifex project](https://github.com/beyond-all-reason/transifex-testing/blob/master/README.md): hosted translation service · External translation-management boundary. · `README.md`
- [Master-only selector](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/master_only.txt): fixture selector · Constrains resources for master-only scenarios. · `language/master_only.txt`
- [Test selector](https://github.com/beyond-all-reason/transifex-testing/blob/master/language/test.txt): fixture selector · Constrains resources for focused integration scenarios. · `language/test.txt`

## Connections

- English source catalogs → animals source: contains
- English source catalogs → UI source: contains
- animals source → Transifex mapping: mapped by
- UI source → Transifex mapping: mapped by
- Transifex mapping → BAR Transifex project: syncs resources
- BAR Transifex project → German catalogs: provides translations
- BAR Transifex project → French catalogs: provides translations
- German catalogs → German animals: contains
- German catalogs → German UI: contains
- French catalogs → French animals: contains
- French catalogs → French UI: contains
- Translation merge → BAR Transifex project: downloads translations
- Translation merge → German catalogs: updates
- Translation merge → French catalogs: updates
- Translation rebase → BAR Transifex project: refreshes work
- Master-only selector → Transifex mapping: selects resources
- Test selector → Translation merge: scopes scenarios
- Test selector → Translation rebase: scopes scenarios
