Incorrect claim of c-format in POT file

Bug #1707908 reported by Adam Collard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

Generating po/snappy.pot from snapd source using update-pot incorrectly claims that some strings are c-format[0] when they are not (e.g. they use golang fmt's %q).

This then leads to confusion in tools which expect c-format and contributes to issues like https://forum.snapcraft.io/t/strange-trailing-text-from-snap-login-in-en-gb-locale/1511

[0] https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

Revision history for this message
Adam Collard (adam-collard) wrote :

See also bug 1707890 (LP bug that contributed to the strange behaviour)

Michael Vogt (mvo)
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Michael Vogt (mvo) wrote :

I filed a bug upstream about this: https://savannah.gnu.org/bugs/index.php?52788

It seems like we have some options:
1. Switch our internal i18n/xgettext-go to emit "go-format" instead of "c-format". From the feedback I got from the LP developers it seems we will probably lose some sanity checks in launchpad translations if we do that (gettext_check_messages.py in the LP source).
2. Implement golang support in upstream gettext. I looked into this and it looks like its quite a bit of work, we will have to implement our own x-golang.c and format-golang.c.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.