Adam BlansettSenior Full-Stack & AI Engineer
Autonomous AI WorkforceProduction-Hardened v1.0 (MIT)

AI Content Localization & Translation Manager

Self-hosted i18n platform with round-trip JSON/PO/ARB/XLIFF/Android/iOS sync, pgvector translation memory, ICU/RTL BiDi QA, and a GitHub PR + CLI release gate.

Engineering RoleLead Systems & AI Architect

01. Problem & Context

Web and mobile product teams shipping multilingual releases routinely break ICU plural strings, strip interpolation placeholders, misalign RTL BiDi layouts, or merge stale keys because translation spreadsheets sit disconnected from Git repositories and CI pipelines.

02. Engineering Solution

Engineered a production-hardened v1.0 localization platform combining a FastAPI + async SQLAlchemy 2.0 backend (`catalogs/`, `tm_glossary/`, `qa_checks/`, `llm/`, `workers/`, `integrations/`, `cli/`, `core/`) with a React 18 TypeScript workbench verified by Chromium Playwright E2E tests. Supports 7 round-trip asset formats, native `pgvector` HNSW translation memory, deterministic linguistic/cultural QA, GitHub pull/PR sync, and the `l10n-gate` CLI + composite GitHub Action.

03. System Architecture

Modular FastAPI packages (`catalogs/`, `tm_glossary/`, `qa_checks/`, `llm/`, `workers/`, `integrations/`, `cli/`, `core/`) run over Alembic-migrated PostgreSQL (`pgvector` HNSW `vector_cosine_ops` `<=>` with SQLite fallback), Celery + Redis async jobs with SSE progress (`/jobs/events`), HS256 JWT + PBKDF2-SHA256 RBAC (`admin`, `localization_engineer`, `linguist`, `viewer`), memory/Redis ZSET rate limiting, OpenTelemetry, and Prometheus `/api/v1/metrics`.

Core Architectural Components

7-Format Round-Trip Catalog Sync (`catalogs/`)

Parses, serializes, and accepts multipart uploads (`POST /catalogs/upload`) across JSON, GNU gettext PO, Flutter ARB, Markdown, XLIFF 2.0/1.2, Android `strings.xml`, and iOS `.strings` with SHA-256 key-diff and stale-translation detection.

pgvector Translation Memory & DNT Glossary (`tm_glossary/`)

Combines PostgreSQL `pgvector` HNSW cosine search (`<=>`) and lexical fuzzy matching over 384-dim embeddings with automatic TM harvesting on linguist approval and strict Do-Not-Translate / forbidden-variant rules.

Deterministic Placeholder, ICU, RTL BiDi & Register QA (`qa_checks/`)

Validates `{var}`, `{{var}}`, `%(name)s`, `%1$s`, `${var}`, and ICU `{count, plural, ...}` syntax, HTML/Markdown balance, `maxLength` expansion budgets, RTL BiDi isolation (`\u2068...\u2069`), formality registers (`es`/`de`/`fr`/`ja`), French punctuation spacing, and US date/currency drift.

Reversible-PII LLM Router, GitHub PR Sync & `l10n-gate` CLI (`llm/`, `integrations/`, `cli/`)

Routes `tm_exact` hits first before `mock`/Ollama/Gemini with reversible PII scrubbing that preserves i18n placeholders, executes Celery + SSE jobs, pulls/exports GitHub PRs (`/git/pull`, `/git/export-pr`), and gates CI via `l10n-gate` and `.github/actions/l10n-gate/action.yml`.

04. Notable Engineering Decisions

Deterministic Placeholder & BiDi Protection Around LLM Inference

LLMs frequently corrupt `{var}` tokens or strip PII markers alongside placeholders. Reversible PII scrubbing preserves i18n placeholders verbatim while deterministic QA blocks malformed output before merge.

Native pgvector HNSW Translation Memory Harvesting

Harvesting linguist-approved translations automatically into `pgvector` HNSW indexes reduces recurring translation spend and prioritizes `tm_exact` hits before invoking any model.

CI Release Gate CLI (`l10n-gate`) & Composite GitHub Action

Embedding `l10n-gate check` directly into pull requests prevents missing keys, broken ICU syntax, or stale translations from reaching web and Flutter production builds.

05. Engineering Challenges & Solutions

Challenge: Preserving format-specific metadata and comments across JSON, PO, Flutter ARB, XLIFF, Android XML, and iOS `.strings`.

Engineering Solution: Built format-preserving round-trip serializers paired with SHA-256 source-string hashing to detect stale target translations accurately.

Challenge: Catching subtle RTL BiDi ordering bugs and locale-specific punctuation or register mismatches.

Engineering Solution: Implemented deterministic BiDi isolation checks (`\u2068...\u2069`), formality register validators for `es`/`de`/`fr`/`ja`, and French double-punctuation rules.

06. Implementation Highlights

  • Round-trip parsing & multipart upload across JSON, GNU PO, Flutter ARB, Markdown, XLIFF 2.0/1.2, Android `strings.xml`, and iOS `.strings`
  • PostgreSQL `pgvector` HNSW (`vector_cosine_ops` `<=>`) translation memory + auto-harvesting and DNT termbase rules
  • Deterministic QA for placeholders, ICU plurals, HTML/Markdown balance, `maxLength`, RTL BiDi (`\u2068...\u2069`), and `es`/`de`/`fr`/`ja` register
  • Local-first `tm_exact` → `mock`/Ollama/Gemini routing with reversible PII scrubbing and Celery + SSE job streaming
  • GitHub source pull & PR export (`/git/pull`, `/git/export-pr`), standalone `l10n-gate` CLI, and composite GitHub Action
  • React 18 workbench with RTL editor verified via Ruff, Mypy, pytest, Vitest, `npm audit`, Chromium Playwright E2E, and Trivy CI