Repository navigation
Translations
fpdb ships 14 locale catalogues. Choose one from View → Language; the choice is saved and takes effect when fpdb next starts.
The menu shows how much of each language is translated. French is complete; the others are partly translated, and the untranslated parts show in English. This is where help is most welcome.

ca_ES Catalan |
de_DE German |
es_ES Spanish |
fr_FR French |
hu_HU Hungarian |
it_IT Italian |
ja_JP Japanese |
lt_LT Lithuanian |
nl_NL Dutch |
pl_PL Polish |
pt_BR Portuguese (Brazil) |
ro_RO Romanian |
ru_RU Russian |
zh_CN Chinese (Simplified) |
Two entries in the Language menu are not locales:
- system — follow the operating system's language. The default.
-
en — the source strings, untranslated. There is no
encatalogue because the strings in the code are English.
Catalogues are plain gettext .po files, one per language, in locale/:
locale/fpdb-fr_FR.po
-
Edit it with any
.poeditor — Poedit, Lokalize, or a text editor. -
Compile and check:
python tools/compile_translations.py fr_FR
It prints the message count and where it wrote the
.mo. -
Run fpdb, switch to that language, and look at the screens you changed. A string that is correct in isolation can still be wrong in a button eight characters wide.
-
Open a pull request against
developmentwith the.poonly.
Do not commit .mo files. They are build artifacts and are git-ignored.
i18n_compile.py builds them lazily at startup, so a contributor who pulls your
.po gets the translation without running anything.
- Copy
locale/fpdb.pottolocale/fpdb-<code>.poand fill in the header. - Translate.
python tools/compile_translations.py <code>
The language then appears in View → Language on its own: the menu is built from the catalogues actually present, so there is no list to register in.
Two functions, in fpdb_3_legacy/i18n.py:
from fpdb_3_legacy.i18n import gettext as _
from fpdb_3_legacy.i18n import N_
button = QPushButton(_("Create database")) # translate now
MENU = (N_("File"), N_("Import")) # mark now, translate later_() translates through the catalogue installed at startup, and returns the text
unchanged when none is — which is why modules can mark strings without depending
on i18n being set up, and why tests do not need a locale.
N_() is a no-op marker. It exists for strings defined at module level, in
data that is rendered later: menu_layout.py describes the whole menu bar as
data, marked with N_, and translated when Qt menus are actually built. Using
_() there would translate at import time, before any language has been chosen,
and freeze the menu into whatever locale happened to be active.
A string extractor collects both, with --keyword=N_ for the second.
i18n_compile.py parses .po and writes .mo itself — no msgfmt binary, no
babel, no polib. That is why the only prerequisite for working on a translation
is a text editor.
- Wrap user-visible strings in
_(), orN_()if they are module-level data. -
Do not build a sentence by concatenation.
_("Imported ") + n + _(" hands")cannot be translated into a language that orders those differently. Use a format placeholder:_("Imported %d hands") % n. - Leave the placeholders in the string, and keep them named or positional consistently — a translator has to be able to reorder them.
- After adding strings, refresh
locale/fpdb.potso translators see them.
That script is from the pre-package layout: it runs pygettext over *.py in a
flat directory and produces fpdb-en_GB.pot, which is neither the current source
layout nor the current template name. Use tools/compile_translations.py;
localise.sh is kept for reference and should not be run as-is.
- HUD overview
- HUD — installation and first run
- HUD — configuration from the GUI
- HUD — Fast-Fold tables
- HUD — importing a PokerTracker 4 layout
- HUD — troubleshooting
- HUD_config.xml reference
- Research and study
- Packs and moving from another tracker
- Hand Replayer
- Auto Notes
- Reports and graphs
- Statistics reference