Asked by Marten de Vries


I'm one of the maintainers of OpenTeacher. I've tried to import our translations into launchpad in the past few weeks. Our template is imported, but our Dutch translation which is already almost complete, nl_NL.po, isn't. I can't find a import rule which we're breaking, so can anybody help us?

Our directory structure:

The branch used is lp:openteacher, and we're trying to translate the trunk series.

We're generating our translation with the 'ts2po' script, because we're using Qt. We're planning to convert them back with the 'po2ts'-script.

Thanks in advance,
Marten de Vries

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Jeroen T. Vermeulen
Last query:
Last reply:
Revision history for this message
Jeroen T. Vermeulen (jtv) said :

The correct language code is nl ("Dutch"), not nl_NL ("Dutch as spoken in the Netherlands"). The nl_NL code is redundant and will cause confusion.

Avoid adding country codes if at all possible. There are only a few cases where they really make sense:
 * pt_BR (Brazilian Portuguese) because it's very different from pt (Portuguese) and has many translators.
 * zh_CN (Simplified Chinese) which is very distinct from zh_TW (Traditional Chinese) as a written language and there's no zh ("some unspecified kind of Chinese") inbetween.
 * en_GB (English as spoken in the United Kingdom) because computer English is basically United States English by default.

In all other cases, use language code only: de, es, fr, nl, and so on.

Revision history for this message
Marten de Vries (marten-de-vries) said :

Thanks for your response, Jeroen Vermeulen.

I've in our latest trunk changed the names of the .po files, but I still don't have success. I know launchpad scans the branch because the template (.pot) is updated, but the translations (.po), stay in the import queue with the status 'Needs review'.

Revision history for this message
Best Jeroen T. Vermeulen (jtv) said :

Another template upload in the same directory was in the Blocked state, and this was stopping auto-approval.

The presence of that upload made the auto-approver unsure: it thought you might possibly want to create a new template in the same directory later, based on the blocked upload. And if you were planning to do that, the nl.po and de.po translations could be either for that new template or for the existing template. So importing those to the existing template would be unsafe.

I marked the blocked template upload as Deleted. That took it out of the way and made the situation clear to the auto-approver. The translations are now imported. (The deleted entry will be cleaned up in 3 days).

The code that deals with these possibilities is tricky and complicated. We're going to rewrite it or get rid of it, but that's a hazardous task and it's not quite at the top of our priority list yet. Something we could probably do is make the code that detects this particular case a tiny bit smarter: if the blocked template upload has the exact same path as an existing template, it's clearly not meant to create a new one, so approval should be able to proceed. I'll run an experimental branch through the test suite to see if it detects any other scenarios that this change might break.

Revision history for this message
Marten de Vries (marten-de-vries) said :

Thanks Jeroen T. Vermeulen, that solved my question.