Translating FlickOS
How FlickOS’s own text gets translated, how to translate it, and how to make another package translatable.
- What is translated
- How it works
- Translating: for translators
- Taking a translation in: for the maintainer
- Handing out the work
- Making a package translatable: for developers
- Not done yet
What is translated
Section titled “What is translated”Most of what a FlickOS user sees comes from Debian (Firefox, Thunar, GTK’s dialogs, apt) and Calamares, and those are translated already. Settings → Language & Region chooses the language, and apps started after that use it. FlickOS’s own programs were English-only until now. They are made translatable one package at a time:
| Package | Translatable | What |
|---|---|---|
flickos-welcome |
Yes (1.7) | The welcome window and its menu entry |
flickos-menu |
Yes (1.23) | The start menu (all three styles), Quick Settings and the phone popup |
flickos-greeter |
Yes (2.0) | The login screen; PAM’s messages and the keyboard layouts’ names come from those projects’ own translations |
flickos-switch |
Yes (1.0) | The Bring Files from Windows and Windows programs windows, their menu entries and the sentences in the list of Windows programs |
flickos-control |
Yes (1.65) | The Settings window, History’s descriptions of changes, the messages the window shows, its menu entry and the Displays entry; names of languages and keyboard layouts come from iso-codes’ and xkeyboard-config’s translations. Names and comments that other programs give (layouts, styles, the shortcut sheet) stay as those programs give them |
| Every other FlickOS package | Not yet | See the HIG audit (TXT-10) |
How it works
Section titled “How it works”FlickOS uses GNU gettext, like most of Debian:
packages/NAME/├── usr/bin/NAME text marked as _("…") and N_("…")└── po/ ├── POTFILES the files with text to translate ├── NAME.pot the template: every English text, no translations ├── LINGUAS the languages with a translation, one per line └── de.po, fil.po, … one translation per language- A developer marks the text in the program.
tools/update-po.sh NAMEreads the files inPOTFILESand writes the templateNAME.pot. - A translator copies the template to
LANG.poand fills in eachmsgstr. - The package build (
debian/rules) compiles each.poinLINGUASinto/usr/share/locale/LANG/LC_MESSAGES/NAME.mo, and writes the translatedName[LANG]=,Comment[LANG]=andKeywords[LANG]=lines into the desktop file. - At start the program loads the
.mofor the user’s language (LANGUAGE,LC_ALL,LC_MESSAGES,LANG, the first one that is set). If there is no translation for that language, or a text isn’t translated yet, it shows the English text.
A translation reaches installed systems the same way as any change: a new package version through the apt repository.
Translating: for translators
Section titled “Translating: for translators”You need the package’s .pot file (or the .po file of your language if it
already exists) and a translation editor. Poedit runs on
Linux, Windows and macOS; on Debian or FlickOS it’s sudo apt install poedit.
Lokalize and Gtranslator work too, as does any text editor.
-
Start the file. In Poedit: File → New from POT/PO file, choose
flickos-welcome.potand your language, and save it asLANG.po(de.po,pt_BR.po,fil.po). If you were given aLANG.poalready, just open it. -
Translate each text. Comments that start with Translators: explain a text. Keep these exactly as they are:
{placeholders}such as{version}. Move them to wherever your language puts them, but don’t translate or remove them. The build fails on a broken placeholder.- The underscore in
_Closeand_Do not show on startup. It marks the letter for the Alt shortcut. Put it before a letter of your translation, and avoid using the same letter twice in one window. - Semicolons in the search words (
welcome;first;start;…): one after each word, the last one included. Give the words people in your language would search for, not a word-by-word translation. - FlickOS, which is a name and is never translated.
-
Fill in the header in Translation → Properties: your name and email address (Last-Translator) and your language team, if there is one.
-
Check it. Poedit warns about errors as you save. From a terminal:
msgfmt --check --statistics -o /dev/null LANG.poshould print only the count of translated texts. -
Try it (optional, on FlickOS or Debian with the FlickOS source):
Terminal window mkdir -p /tmp/try/usr/share/locale/de/LC_MESSAGESmsgfmt -o /tmp/try/usr/share/locale/de/LC_MESSAGES/flickos-welcome.mo de.poFLICKOS_WELCOME_PREFIX=/tmp/try LANGUAGE=de packages/flickos-welcome/usr/bin/flickos-welcomeCheck that no text is cut off. The window gives text room to grow by about half (HIG TXT-9). If a translation can’t fit, say so instead of shortening its meaning.
-
Send it back as you were asked to: a pull request that adds
packages/NAME/po/LANG.po, or the file itself by email.
How to write: FlickOS’s English is short and plain (HIG 05 – Writing). Translate the meaning, not the words. Use the words your language’s GNOME and Xfce translations use for the same things (Settings, Shut Down, Log Out), so FlickOS matches the rest of the desktop. Use the informal or formal “you” as those translations do.
License. A translation becomes part of FlickOS under FlickOS’s license
(GPL-3.0-or-later). Sending one means you agree to that. You keep the
copyright, and your name goes in the file’s header and in the package’s
debian/copyright.
Taking a translation in: for the maintainer
Section titled “Taking a translation in: for the maintainer”When a .po file arrives:
-
Add the language if it’s new: put the file at
packages/NAME/po/LANG.poand the code on its own line inpo/LINGUAS. (To start an empty file for a translator instead:tools/update-po.sh NAME LANGwritespo/LANG.pofrom the template and adds it toLINGUAS.) -
Bring it up to date with the template:
tools/update-po.sh NAME. This merges the template into every.pofile and prints each language’s count of translated, fuzzy and untranslated texts. -
Credit the translator in
debian/copyright, afterFiles: *:Files: po/de.poCopyright: 2026 Anna Example <anna@example.org>License: GPL-3+ -
Bump and build:
dch -i -D trixie "German translation (Anna Example).", thensh packages/build.sh. The package’s tests compile every.poinLINGUASand fail on a broken one. -
Test it on FlickOS: install the
.deb, choose the language in Settings → Language & Region, log out and back in, and open the window. -
Publish as usual (05).
When English text changes, run tools/update-po.sh NAME in the same
commit. The package’s tests fail while the template is out of date. Changed
texts become fuzzy in each .po (still shown in English until a translator
checks them), and new ones are untranslated. Before a release, send the
.po files with untranslated or fuzzy texts to their translators.
Handing out the work
Section titled “Handing out the work”There is nothing to translate in a package until its text is marked, so the work comes in two kinds:
- Making packages translatable is a developer’s job: see the next section. One package per issue, in the audit’s order.
- Translating is one language per person, or per team. Give the
translator the
.pot(or the existingLANG.po) and this page. They need no access to the code.
The FlickOS repository is private. Choose how a contributor gets access:
| Way | Good for | How |
|---|---|---|
| Files by email | A few translators | Send the .pot/.po and this page; commit what comes back |
| Collaborator on GitHub | A regular contributor, or a developer | On GitHub: Settings → Collaborators → Add people. Triage lets them see the code and be assigned issues; Write also lets them push branches and open pull requests. Assign an issue in its Assignees box |
| A translation platform (Weblate) | Many languages | Weblate’s free hosting is for public repositories only: self-host it or pay for hosting. Worth it only with several active languages |
Write the assignment as an issue, so it’s clear who has which language:
Filipino translation of flickos-welcome Translate
packages/flickos-welcome/po/flickos-welcome.potintopo/fil.po. How:docs/12-translating.md. Done whenmsgfmt --checkpasses, nothing is fuzzy and the window has been checked in Filipino.
Making a package translatable: for developers
Section titled “Making a package translatable: for developers”flickos-welcome is the example to copy, and flickos-menu the one for a
program with a fast path or with code in more than one file. For a Python
program:
-
Load the translation after the constants, before any text:
import gettextLOCALE_DIR = PREFIX + "/usr/share/locale" # PREFIX: the package's testing root, if it has one_ = gettext.translation(NAME, LOCALE_DIR, fallback=True).gettextdef N_(text):"""Marks text for the translation template; _() translates it where it is shown."""return textfallback=Truemeans English when there’s no translation, never an error. A broken.mostill raises one, so a program that runs at login (flickos-control’sprepare) catches any exception there and usesgettext.NullTranslations(): English, never a login that stops.A program that must start fast for a click (flickos-menu’s
toggle) loads it at the first_()instead:import gettextcosts about 12 ms wherereisn’t loaded yet. A file the program loads itself (flickos-menu’squick.py,phone.py) has its own English_and gets the program’s after loading (module._ = _), so the tests can load it alone; it never calls_()while it loads. -
Mark the text people read:
_("…")where the text is used, andN_("…")in tables at module level (such asCARDS), with_()where the table’s text is shown. A table translated at import time would keep the language the module was loaded in. A program none of whose processes shows text for longer than a language lasts (flickos-control: the window and each command start afresh) may translate its tables where they are defined, with_(), so no place that shows them can forget to; a table whose English text also goes somewhere English (About’s labels, which go into bug reports) keepsN_(). When the English text is also a key (flickos-menu’s sections), keep it as the key and translate only where it’s shown; never compare a label with English text (label == "Home"), compare what it stands for (the path). -
Leave out text that programs read: values (
on/off), ids, JSON, tab-separated output, the words the boot test looks for (HIG TXT-7), log lines, bug reports and stderr messages.--helpstays English for now. A message a window also shows is translated even when the command line prints it (flickos-control’s errors andset’s notes, which its pages run), but not a confirmation the boot test looks for (Applied.,Kept:), and not a line another program filters (Software leaves outWaiting forlines ofpurchases claim). -
Placeholders by name, filled after translation:
_("Version {version}. Everything here can be changed later.").format(version=release). xgettext can’t read an f-string, and a translator must be able to move{version}. A text that is a whole sentence stays one string (HIG TXT-8). For plurals:gettext.translation(…).ngettext("{n} minute", "{n} minutes", n).format(n=n). -
Explain what isn’t obvious in a comment on the line above:
# Translators: {version} is the FlickOS version, such as 2.0.Mnemonic underscores, and words that must match another place (a menu entry’s name), need one. -
The
po/folder:POTFILESlists the program and the desktop files,LINGUASstarts with only comments, then runtools/update-po.sh NAMEto write the.pot. Text kept in a data file (flickos-switch’s Windows apps list) needs an executablepo/extractthat prints its entries;update-po.shadds them to the template after xgettext’s. -
debian/: copy flickos-welcome’srules(theLANGSline,override_dh_auto_build,override_dh_install) andclean, change the names, and addgettexttoBuild-Depends. -
Tests: copy
TranslationTestfrom flickos-welcome’s tests (from flickos-menu’s for several files). It checks that the template is current, thatLINGUASmatches the.pofiles and that they compile, and that a translation is shown while values stay as they are. flickos-menu’s also checks that no function binds_(for _ in,_ok, _ = …) and calls_(), which fails only when that window is drawn. flickos-control’s (tests/test_translation.py) is the one for a program that translates its tables at import: it loads a second copy with a made-up language, and allows no_binding at all (prefix, _skip, rest = …). -
Look at it: a pseudo-translation shows any text that isn’t marked. Every text becomes ⟦text⟧:
Terminal window msgen -o /tmp/en.po po/NAME.potsed -i 's/nplurals=INTEGER; plural=EXPRESSION;/nplurals=2; plural=(n != 1);/' /tmp/en.pomsgfilter --keep-header -i /tmp/en.po -o /tmp/xx.po sed -e 's/^/⟦/' -e 's/$/⟧/'mkdir -p /tmp/try/usr/share/locale/xx/LC_MESSAGESmsgfmt -o /tmp/try/usr/share/locale/xx/LC_MESSAGES/NAME.mo /tmp/xx.pothen run the program with
LANGUAGE=xxand its prefix variable pointing at/tmp/try. -
Bump the version, delete the package from the audit’s TXT-10 row, and add it to the table at the top of this page.
Things to look out for in the HIG (TXT-8 and TXT-9): build sentences in one string, no words in pictures, and labels that wrap or ellipsize.
Not done yet
Section titled “Not done yet”These need more than the Python pattern above, and are planned with the packages that have them:
- The labwc root menu (
menu.xmlin flickos-settings and flickos-installer): labwc can’t translate it, so it would need a menu per language, generated into the overlay. - Metainfo files (Software’s style descriptions):
msgfmt --xmlwith an ITS rule, oritstool. - The installer’s slideshow (
show.qml): its text is inqsTr()already, and Calamares loads.qmfiles from the branding’slang/folder, built with Qt’slrelease. - Shell scripts (
/usr/libexec/flickos/*):gettext.sh, when one shows text. - Polkit messages (flickos-control’s
org.flickos.control.policy, the password prompt’s “Authentication is required to …”): polkit translates<message xml:lang="…">, whichmsgfmt --xmlwrites with polkit’s ITS rules (polkit.itsin/usr/share/gettext/its/, which the build host doesn’t have yet: polkitd doesn’t ship it). - Panel text that flickos-layout generates (tooltips): marked like any Python text, but the panel only picks up a new language at the next login.