[Bug 452897] Re: Preferences dialog is not translatable

David Planella david.planella at ubuntu.com
Fri Jan 29 21:55:27 GMT 2010


Hi Francesco,

El dv 29 de 01 de 2010 a les 21:10 +0000, en/na Francesco Fumanti va
escriure:
> Hi David,
> 
> First of all, thanks for your interest in onboard.
> 
> In the bug description you say: "The preferences dialog is not
> translatable due to its strings in the .ui file not being extracted and
> merged into the POT translation template."
> 
> Could you please tell me how launchpad gets the .pot file for its
> translations? Does it simply copy the file from the uploaded debian
> source package or does it generate a new .pot file from the debian
> source package?
> 

Launchpad does not generate any .pot templates, it just gets fed the
templates the debian package generates as a result of the build. This is
the only requirement for Ubuntu packages in main which need to have
their translations imported into Launchpad: they must produce a .pot
template during build.

The way this is generally achieved with CDBS-based packages is through
the langpack.mk rule in debian/rules, which takes care of all of this
for you (that's why I included it in the patch). 

You'll find more detailed info at:

* https://wiki.ubuntu.com/Translations/TranslationLifecycle
* https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Packaging

> If I remember correctly, the problem did not occur when I created the
> debian package from the checkout of the onboard repository and I might
> know why: the repository contains a POTFILES.in file specifying from
> what files it has to extract strings for the POT translation template.
> 

By looking at setup.py, I saw that you are using DistUtilsExtra.auto.
IIRC, the auto module takes care of inferring from which files to
extract strings from, without the explicit need of a POTFILES.in file.

> Unfortunately, I was not aware that the "./setup. py sdist" command that
> I used to create the release tarball does not include the POTFILES.in
> file into the release tarball; consequently, when building the debian
> package by using the release tarball without using the langpack.mk
> command in debian/rules, it does not merge the strings from the
> settings.ui file into the template.
> 

For the Ubuntu package you should probably be using the langpack.mk
rule. If I understand it correctly, the problem is when building the
package for Debian, where the langpack.mk rule is not needed and thus
not used?

Could it be that in the Debian version of python-distutils-extra the bug
where .ui files where ignored for extraction has not yet been fixed?

> Do you think that it makes sense to file a bug against the
> DistUtilsExtra package because it does not include the POTFILES into the
> release tarball? Or is there any reason for not including the POTFILES
> into the release tarball?

In any case, the DistUtilsExtra version in which bug 451170 is fixed
should recognize the .ui files and extract the translations without the
need of the POTFILES.in file. When I created the patch I tested this was
so. Is that not happening?

>  (Unfortunately, I don't have a good knowledge
> about these things.)
> 

Don't worry about this, I'm also learning as I go along :)

I hope this helps.

-- 
Preferences dialog is not translatable
https://bugs.launchpad.net/bugs/452897
You received this bug notification because you are a member of
Accessibility, which is subscribed to onboard in ubuntu.



More information about the Ubuntu-accessibility-bugs mailing list