The command-not-found package needs to create a POT template on build

Bug #549106 reported by Ricardo Pérez López
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Translations
Fix Released
Low
Unassigned
command-not-found
Invalid
Undecided
Unassigned
command-not-found (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: command-not-found

command-not-found needs to generate a POT template on build for its translatable messages to be exposed in Launchpad.

In this way, on every upload the template will be refreshed in Launchpad. Right now, the template is present in Launchpad, but it's outdated, making it impossible to translate e.g. the "No command '%s' found, did you mean:" message, because it's not in Launchpad.

This is because the package contains an outdated po/command-not-found.pot file, and that's the one that gets imported. An easy fix is to simply add the following to debian/rules, just below the './setup.py build' line in the build-stamp rule:

cd po; intltool-update -p -g command-not-found

In the meantime, I've manually uploaded an updated template in Launchpad, which should be available shortly

For more info on this:

* https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Packaging#Translation%20templates
* https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/RecipeVerifyingTranslationUploads

Victor Vargas (kamus)
Changed in command-not-found (Ubuntu):
importance: Undecided → Low
David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
David Planella (dpm) wrote :

They are, however, in the upstream template, e.g. https://translations.edge.launchpad.net/command-not-found/trunk/+pots/command-not-found/ca/+translate?batch=10&show=all&search=did+you+mean

Could it be that in the Ubuntu package are not marked for translation?

This could be verified by looking at the sources of the Ubuntu package or by https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/RecipeVerifyingTranslationUploads

David Planella (dpm)
Changed in command-not-found:
status: New → Invalid
summary: - Some strings shows untranslated, and can't be translated via Launchpad
+ The command-not-found package needs to create a POT template on build
tags: added: needs-pot-on-build
David Planella (dpm)
description: updated
Revision history for this message
David Planella (dpm) wrote :

I've just discovered what's happening.

The source package contains an old .pot file from 2007, and this template is being picked up by Launchpad on upload. In principle, .pot files should not be shipped in source packages, as they are files which are constantly regenerated, but updating it in debian/rules does the trick as well.

I'm attaching a patch that does that: generate the .pot file at package build time. I'm not a packager, so it can probably be improved :)

For more info see https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Packaging#TranslationTemplates

tags: added: patch
Michael Vogt (mvo)
Changed in command-not-found (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 0.2.40ubuntu13

---------------
command-not-found (0.2.40ubuntu13) maverick; urgency=low

  * debian/rules:
    - generate pot during build (LP: #549106), thanks to
      David Planella
 -- Michael Vogt <email address hidden> Fri, 13 Aug 2010 12:23:33 +0200

Changed in command-not-found (Ubuntu):
status: Fix Committed → Fix Released
David Planella (dpm)
Changed in ubuntu-translations:
status: Triaged → Fix Released
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.