Laboratory Diary: Amigram under translation pressure

On this page

A translation can be right in a dictionary and wrong inside a program. In the public Amigram repository, my Telegram client for Amiga systems, the catalogs show how a longer word, a different character or a misplaced placeholder can affect both code and interface. This is not a new-release announcement. It is a look at the constraints that an additional language exposes.

An ID is not a sentence

In locale/amigram.cd, each string has an ID and a built-in English form. A language’s .ct file associates its own wording with that ID; scripts/catalog.py produces the C header and the catalog loaded through locale.library. IDs from a release remain stable: a new string gets a new ID rather than renumbering old ones. When a translation is absent, the built-in English remains. That separates changing the words from changing the references used by the program.

Beta 0.7 already includes Italian, as the earlier RetroLab report explains. Nine further language catalogs appear in a November 30 commit after the Beta 0.7 tag. Being on the main branch does not put them in that beta. The guide says a catalog reaches the update channel with a release; fetching a language from Settings is main-branch code, not a claim about the build already shipped.

Words the compiler must reject

A string containing %s or %lu carries instructions for inserting a name or number. Changing the type or order is not a stylistic choice. The check in catalog.py compares the sequence of conversions with the English original and flags a stray percent sign in formatted text. It counts the | separators between requester buttons, preserves leading and trailing spaces and line breaks, limits status lines to 47 characters or the English length when that is already greater, and caps console and session strings at 600 characters. These are source-code checks, not results of an Amiga hardware test performed for this article.

The 47-character limit makes the issue tangible: a better-sounding word may not fit the status line. Shortening it without losing meaning is an interface decision as well as a linguistic one. For longer strings, the guide calls for bounded copies and a formatting function that truncates to the available buffer. Catalog validation does not replace those C-side safeguards.

Three paths for the same characters

The current catalog is Latin-1 because the window draws one byte per letter. The code distinguishes Latin-1 GUI text (TG_STR), UTF-8 text to join with Telegram content (TG_STR_U8), and text prepared for the console (TG_TSTR), Latin-1 on Amiga or UTF-8 under --charset utf8. Mixing these paths can corrupt visible characters even when the translation is grammatically sound. The guide defers languages whose characters fall outside Latin-1 until the window can draw them; adding a .ct file alone is not enough.

A documented check, not a claimed test

The guide specifies python3 scripts/catalog.py all to build and check catalogs, followed by TG_CATALOG=Catalogs/<language>/amigram.catalog build/host/Amigram --gui-self-test to check translated layout on the host build. It also documents a session self-test with a catalog and smaller catalogs for the 68000 text client. These are available verification paths, not a claim that new tests ran for this issue, on hardware or elsewhere.

Translation thus makes a useful software stress test: it forces the contracts between text, format, bytes and available space into the open. What the repository establishes today is the design of those checks. Success on every Amiga configuration would require further testing and cannot be inferred from the catalog files alone.

AUTHOR

IT specialist, developer and systems engineer with a long history across code, Linux servers, retrocomputers and e-learning platforms. On AndroidLab he brings a technical, pragmatic eye: less brochure smoke, more attention to infrastructure, usability, privacy, updates and the real consequences of manufacturers' choices.

Leave a Comment