#!/usr/bin/env python3 # coding=utf-8 # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2026 Alex """ Translation toolchain of the extension, without depending on gettext tools. python i18n.py # extract + update + compile python i18n.py extract # po/.pot from the .inx and the .py files python i18n.py update # merge the template into po/.po python i18n.py compile # po/.po -> locale//LC_MESSAGES/*.mo The domain is read from the translationdomain attribute of the .inx; the sources are the .inx and every .py file of the folder (except i18n.py and tests). Source texts (.inx and _() calls in the .py files) are in English: this is what Inkscape shows for a language without a catalog. The English catalog is filled automatically with the source texts; only fr.po is translated by hand. Strings taken from the .inx follow Inkscape's rules (inx.its): , gui-text and gui-description attributes, content of