Skip to content

i18n: fix synaptic-{pot,update-po} targets#269

Merged
mvo5 merged 2 commits into
masterfrom
i18n-fixes
Jul 24, 2026
Merged

i18n: fix synaptic-{pot,update-po} targets#269
mvo5 merged 2 commits into
masterfrom
i18n-fixes

Conversation

@mvo5

@mvo5 mvo5 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

With the meson merge we switched from intltool to plain xgettext/msgmerge. This means that we need to tweak some of the existing files to make translations fully working again. This PR contians the two fixes needed (see the individual commits).

Thanks to @AsciiWolf and @AtesComp for raising the i18n issues. This should also solve #263

I validated via:

$ meson build
$ ninja -C build synaptic-pot
$ grep   -A3 "synaptic\.desktop\.in" po/synaptic.pot 
#: gtk/rgmainwindow.cc:2312 data/synaptic.desktop.in:3
#: data/io.github.mvo5.synaptic.metainfo.xml.in:7
msgid "Synaptic Package Manager"
msgstr ""
--
#: data/synaptic.desktop.in:4
msgid "Package Manager"
msgstr ""

#: data/synaptic.desktop.in:5 data/io.github.mvo5.synaptic.metainfo.xml.in:11
msgid "Install, remove and upgrade software packages"
msgstr ""

mvo5 added 2 commits July 23, 2026 08:59
The underscore-prefixed tags (<_name>, <_summary>, <_p>, <_li>,
<_message>) are an intltool convention. Since the switch to meson,
i18n.merge_file() runs gettext's msgfmt, which does not understand
them: the installed metainfo contained literal <_name> tags (invalid
AppStream) and the strings stayed untranslated.

So we need to remove the "_" to make msgfmt/xgettext --xml work.

This is the metainfo/policy counterpart of 4e7668f, which already
fixed synaptic.desktop.in the same way (see discussion in PR#263).
Meson's gettext helper treats every non-comment line in POTFILES.in
as a file path, so the intltool-only "[encoding: UTF-8]" directive
and "[type: gettext/glade]" prefixes made the synaptic-pot target
fail with:

  xgettext: error while opening "[encoding: UTF-8]" for reading

xgettext detects GtkBuilder .ui files by extension, so the type
prefixes are not needed. With this change "ninja synaptic-pot"
succeeds and extracts 730 msgids, including the desktop, metainfo
and polkit policy strings.
@mvo5
mvo5 merged commit badfd03 into master Jul 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant