[Bug 1358229] Re: Set --language=python for XGETTEXT_ARGS in po/Makefile
Launchpad Bug Tracker
1358229 at bugs.launchpad.net
Mon Aug 18 12:31:22 UTC 2014
This bug was fixed in the package update-manager - 1:14.10.3
---------------
update-manager (1:14.10.3) utopic; urgency=low
[ Mitsuya Shibata ]
* lp:~cosmos-door/ubuntu/trusty/update-manager/fix1358229:
- ensure all scripts are treated as python by gettext
LP: #1358229
-- Michael Vogt <michael.vogt at ubuntu.com> Mon, 18 Aug 2014 13:36:51 +0200
** Changed in: update-manager (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1358229
Title:
Set --language=python for XGETTEXT_ARGS in po/Makefile
Status in “update-manager” package in Ubuntu:
Fix Released
Bug description:
The ubuntu-support-status is a python script. However it doesn't
have extention, then xgettext recongnize as "source code of C".
ref: "Choice of input file language" in xgettext(1)
If code is treated as C, it will be not set "python-format" flag
and Launchpad translations validator does not work.
For example, in ubuntu-support-statatus has following code:
---
ubuntu-support-status:145-151
print(_("Support status summary of '%s':") % os.uname()[1])
print()
for (time, tset) in supported_by_time.items():
print(_("You have %(num)s packages (%(percent).1f%%) supported until %(time)s") % {
'num' : len(tset),
'percent' : len(tset) * 100.0 / total,
'time' : time})
---
xgettext generates following po templates:
---
#: ../ubuntu-support-status:142
#, c-format <- TREATED AS C-LANGUAGE, BUT NO PROBLEM
msgid "Support status summary of '%s':"
msgstr ""
#: ../ubuntu-support-status:145 <- NEEDS "#, python-format" TO VALIDATE ON LP
msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
msgstr ""
---
If any translator translate following (missing last 's'), Launchpad does not
treat as error, but occur exception on exec ubuntu-support-sutatus script.
---
msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
msgstr "You have %(num)s packages (%(percent).1f%%) supported until %(time)"
---
It seems that update-manager only has python script.
Could you set --language=python for XGETTEXT_ARGS in po/Makefile?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1358229/+subscriptions
More information about the foundations-bugs
mailing list