Skip to content

Translations Upload Design

Ed Mozley edited this page Dec 5, 2026 · 3 revisions

Translating without a development environment - Design

Status: BUILT after 5.19.0 (agreed by Ed, 5 December 2026). User side: Translations; code: Translations - Developer Guide. One change while building, with the reason: the fallback when uploads/ cannot be written is a cache in the server's temp folder rather than a database query - see the developer guide Β§3. #329, from @pappas81's suggestion in #303.

The idea

Download the strings a language is missing, translate them anywhere (by hand, or with an AI tool), upload the result - FreeITSM checks it and uses it. No PHP, no command line.

Decided

Date Decision Who
2026-12-05 Uploaded translations live in the database, read on top of the shipped language files (cached). Each uploaded chunk is checked exactly as scripts/i18n_verify_chunk.php checks one today (every key present, placeholders and HTML kept); what passes is stored, what fails is listed with the reason. Nothing is written into the application, so it works on read-only and Docker installs and survives upgrades. Export gives the merged files back, to contribute to the project. Ed
2026-12-05 No cost per page (Ed asked about performance): the database is the master copy, but pages never query it. Each upload writes the merged overrides for that locale and namespace to a cache file of plain data (JSON, never PHP) in the data folder, and the loader reads it like a language file. A locale with no overrides (and English) never looks. If the data folder cannot be written, the fallback is one indexed query per namespace per request, cached in memory for the rest of the request. Ed, me
2026-12-05 Not writing lang/*.php from the upload - it needs a web-writable app folder, is lost on upgrade, and a bug in the writer could run code Ed
2026-12-05 Not "check and download only" - one manual step too many for the people this is for Ed

Pieces

  • Download: a zip of the missing strings as TSV chunks, plus a short guide - the glossary of terms already used in that language, and the rules (keep {placeholders}, HTML and **bold**).
  • Upload: the zip back; per-chunk results.
  • A lang_overrides table (locale, namespace, key, value, who, when); the loader merges it over the files.
  • System administrators only; every upload audited.

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally