Public bug reported:

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?

** Affects: update-manager (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1358229

Title:
  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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to