debconf-updatepo fails to setup translations due to crash.c, livepatch.c and livepatch-tray.c

Bug #1901741 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce on Focal system:

$ git clone -b master https://git.launchpad.net/update-notifier
Cloning into 'update-notifier'...
...

$ debconf-updatepo
ERROR: xgettext failed to generate PO template file because there is non-ASCII
       string marked for translation. Please make sure that all strings marked
       for translation are in uniform encoding (say UTF-8), then *prepend* the
       following line to POTFILES.in and rerun intltool-update:

           [encoding: UTF-8]

debconf-updatepo succeeds when applying the following diff:
diff --git a/po/POTFILES.in b/po/POTFILES.in
index de4ee8a..f5dd85f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,11 +7,8 @@
 data/apt_check.py
 data/apt-cdrom-check
 data/cddistupgrader
-src/crash.c
 src/cdroms.c
 src/hooks.c
-src/livepatch.c
-src/livepatch-tray.c
 src/update.c
 src/update-notifier.c
 [type: gettext/glade]ui/hooks-dialog.ui
csmith@uptown:/tmp/update-notifier$ debconf-updatepo
csmith@uptown:/tmp/update-notifier$ echo $?
0

Revision history for this message
Chad Smith (chad.smith) wrote :

Update: turns out livepatch.c livepatch-tray.c, crash.c and the untranslated system-crash.c all attempt to translate the horizontal ellipsis unicode char, so we need to follow the error message instructions and prepend the [encoding: UTF-8] to the POTFILES.in line.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the report and work there. But those files shouldn't aren't handled by debconf, why do you use that command and why does it care? The po/ template is updated with 'intltool-update -p'

Balint Reczey (rbalint)
Changed in update-notifier (Ubuntu):
status: New → Incomplete
Revision history for this message
Chad Smith (chad.smith) wrote :

Awesome. Thanks @seb128 for the review here!! Using debconf-updatepo was only due to my lack of understanding of how update-notifier generated translations. Will back out this changeset and the bug is invalid.

Changed in update-notifier (Ubuntu):
status: Incomplete → Invalid
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.