# karprog12/sdlxliff_python_converter architecture

> Architecture diagram of the GitHub repository karprog12/sdlxliff_python_converter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karprog12/sdlxliff_python_converter
- Repository: https://github.com/karprog12/sdlxliff_python_converter

## Overview

The repository is a desktop SDLXLIFF translation-workflow tool, with a separate lightweight source-text extractor described in the README and a small interactive XML search utility. The primary workflow selects SDLXLIFF, exports editable segment data (optionally checking terminology), and imports translations back; JSON/TXT conversion is an additional workflow. Edges reflect only calls visible in the GUI excerpt or documented README behavior; converter internals are only partially sampled.

Main entry points: [`transmAIte.py`](https://github.com/karprog12/sdlxliff_python_converter/blob/main/transmAIte.py) (Workflow GUI), [`converter.py`](https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py) (Segment export), [`README.md`](https://github.com/karprog12/sdlxliff_python_converter/blob/main/README.md) (Source text extractor), [`xliff_dev_search_minitool.py`](https://github.com/karprog12/sdlxliff_python_converter/blob/main/xliff_dev_search_minitool.py) (XML structure search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_translator["Workflow GUI<br/>[transmAIte.py]"]
end

subgraph group_translation["Translation exchange"]
  node_sdlx_export["Segment export<br/>[converter.py]"]
  node_terminology["Termbase matching<br/>[converter.py]"]
  node_sdlx_import["Translation import<br/>[converter.py]"]
  node_text_exchange["JSON / TXT exchange<br/>[converter.py]"]
end

subgraph group_utilities["XML utilities"]
  node_source_extractor["Source text extractor<br/>[README.md]"]
  node_xml_search["XML structure search"]
end

node_translator_user(("Translator"))
node_sdlx_file["SDLXLIFF file"]
node_json_data["JSON export"]
node_text_files["TXT files"]
node_source_file["XLIFF / XML file"]

node_translator_user -->|"selects workflow"| node_translator
node_translator -->|"calls export"| node_sdlx_export
node_translator -->|"loads termbase"| node_terminology
node_sdlx_export -->|"writes JSON"| node_json_data
node_sdlx_file -->|"provides segments"| node_sdlx_export
node_translator -->|"calls import"| node_sdlx_import
node_json_data -->|"provides translations"| node_sdlx_import
node_sdlx_import -->|"writes translations"| node_sdlx_file
node_translator -->|"calls conversions"| node_text_exchange
node_json_data -->|"exchanges content"| node_text_exchange
node_text_exchange -->|"reads and writes"| node_text_files
node_translator_user -.->|"selects files"| node_source_extractor
node_source_extractor -.->|"extracts source text"| node_source_file
node_translator_user -->|"enters query"| node_xml_search
node_xml_search -->|"searches XML"| node_source_file

click node_translator "https://github.com/karprog12/sdlxliff_python_converter/blob/main/transmAIte.py"
click node_sdlx_export "https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py"
click node_terminology "https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py"
click node_sdlx_import "https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py"
click node_text_exchange "https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py"
click node_source_extractor "https://github.com/karprog12/sdlxliff_python_converter/blob/main/README.md"
click node_xml_search "https://github.com/karprog12/sdlxliff_python_converter/blob/main/xliff_dev_search_minitool.py"

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_translator toneBlue
class node_sdlx_export,node_terminology,node_sdlx_import,node_text_exchange toneAmber
class node_source_extractor,node_xml_search toneMint
class node_translator_user,node_sdlx_file,node_json_data,node_text_files,node_source_file toneIndigo
```

## Components

### Desktop interface

- [Workflow GUI](https://github.com/karprog12/sdlxliff_python_converter/blob/main/transmAIte.py): `transmAIte.py`

### Translation exchange

- [Segment export](https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py): `converter.py`
- [Termbase matching](https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py): `converter.py`
- [Translation import](https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py): `converter.py`
- [JSON / TXT exchange](https://github.com/karprog12/sdlxliff_python_converter/blob/main/converter.py): `converter.py`

### XML utilities

- [Source text extractor](https://github.com/karprog12/sdlxliff_python_converter/blob/main/README.md): `README.md`
- [XML structure search](https://github.com/karprog12/sdlxliff_python_converter/blob/main/xliff_dev_search_minitool.py): `xliff_dev_search_minitool.py`

### Other components

- **Translator**
- **SDLXLIFF file**
- **JSON export**
- **TXT files**
- **XLIFF / XML file**

## Connections

- Translator → Workflow GUI: selects workflow (evidence: `transmAIte.py`)
- Workflow GUI → Segment export: calls export (evidence: `transmAIte.py`)
- Workflow GUI → Termbase matching: loads termbase (evidence: `transmAIte.py`)
- Segment export → JSON export: writes JSON (evidence: `converter.py`)
- SDLXLIFF file → Segment export: provides segments (evidence: `converter.py`)
- Workflow GUI → Translation import: calls import (evidence: `transmAIte.py`)
- JSON export → Translation import: provides translations (evidence: `converter.py`)
- Translation import → SDLXLIFF file: writes translations (evidence: `converter.py`)
- Workflow GUI → JSON / TXT exchange: calls conversions (evidence: `transmAIte.py`)
- JSON export → JSON / TXT exchange: exchanges content
- JSON / TXT exchange → TXT files: reads and writes (evidence: `converter.py`)
- Translator → Source text extractor: selects files (evidence: `README.md`)
- Source text extractor → XLIFF / XML file: extracts source text (evidence: `README.md`)
- Translator → XML structure search: enters query (evidence: `xliff_dev_search_minitool.py`)
- XML structure search → XLIFF / XML file: searches XML (evidence: `xliff_dev_search_minitool.py`)
