Skip to content

Translate ClamUI

The easiest way to help is ClamUI on Hosted Weblate. Sign in, pick your language and translate in the browser; no local setup or gettext tools needed. Weblate checks placeholders and plural forms and opens a pull request with your changes. To start a new language, use Start new translation on the project page.

The rest of this page covers the manual workflow in the repository.

Translations are GNU gettext catalogs in po/:

File Role
po/clamui.pot Source template
po/LINGUAS Active languages; everything listed here ships
po/<LANG>.po One translation

Shipped languages: German (de), English (en), Spanish (es), French (fr), Hungarian (hu), Italian (it), Norwegian Bokmål (nb), Brazilian Portuguese (pt_BR), Vietnamese (vi), Simplified Chinese (zh_CN). The build compiles every listed catalog for the core and UI; do not commit .mo files or build output.

Terminal window
sudo apt install gettext
  1. Regenerate the template after source strings changed:

    Terminal window
    ( cd desktop && bun install --frozen-lockfile )
    ./scripts/update-pot.sh
  2. Merge it into every active catalog, then translate the new and fuzzy entries:

    Terminal window
    for language in de en es fr hu it nb pt_BR vi zh_CN; do
    msgmerge --update "po/${language}.po" po/clamui.pot
    done
  3. Run the checks. They reject fuzzy entries, missing or extra keys, empty forms, and changed {placeholders}:

    Terminal window
    ./scripts/update-pot.sh --check
    ./scripts/check-translations.sh
  4. Look at it in the app with the development workflow. Switch language in Preferences → Behavior → Language, then restart ClamUI so every string reloads.

Terminal window
msginit --input=po/clamui.pot --output-file=po/<LANG>.po --locale=<LANG>

Add <LANG> to po/LINGUAS only once every entry, including plural forms, is translated: listing it makes it a shipped, selectable language. Submit po/<LANG>.po and po/LINGUAS together.

  • Translate: labels, dialogs, errors, tooltips, descriptions, notifications, tray labels, CLI text.
  • Keep as is: ClamUI, commands, settings keys, D-Bus paths, CSS names, developer log messages, and the file-manager entry Scan with ClamUI.
  • Preserve: placeholders ({count}, {name}, %s), whitespace, newlines, markup (<b>, &amp;), and every msgstr[N].
  • Read each entry’s #. translator note.
Plural-Forms headers

The header is runtime data and must match the language:

Languages Forms Rule
de, en, es, hu, it, nb 2 n != 1
fr, pt_BR 2 n > 1 (0 and 1 are singular)
vi, zh_CN 1 always form 0
Typography pitfalls
  • Dashes and ellipses: source uses an em dash (—) to separate clauses and an ellipsis (…) where one is intended. Use the punctuation and spacing customary in the target language rather than replacing prose punctuation with ASCII - or --.
  • Ranges: an en dash (–) denotes a range, such as 1–28. Translate the range with the target language’s normal typography, spacing, dash, or wording.
  • Quotation marks: source may use ASCII '…' or "…". Use the target language’s quotation marks. A quoted UI label must use exactly the translation of that label elsewhere in the interface; a quoted command, key, package name, or file name stays unchanged. The external file-manager entry Scan with ClamUI remains English.
  • Markup: keep every markup tag and entity, including <b>, <big>, <small>, and &amp;, intact. Broken markup can hide text.
  • Historical pseudo-plurals: older entries such as file(s) are translated naturally. New source messages must use real plural forms through the existing plural API.

When adding a source message that needs this context, put a // Translators: comment immediately above the string literal argument, not above a standalone call or macro opener. State the expected translation treatment precisely. The Rust and TypeScript extraction path projects static literals to gettext; recognized Translators: comments are emitted beside the entry as #. catalog notes.

Translate translator-credits only to real contributor names, or leave it empty. Never leave the literal translator-credits. The About contributor list comes from the root AUTHORS file, one name per line.

Put a // Translators: comment directly above the string literal argument (not above the call) to give translators context; it becomes a #. note in the catalog. Historical scan-summary recognition is embedded Rust data, not a catalog. No step needs Python.