openteacher-translations-wont-import

Asked by Marten de Vries on 2010-10-02

Hi,

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:
/
    translations/
        translations.pot
        nl_NL.po
    openteacher.py
    ...

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

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jeroen T. Vermeulen
Solved:
Last query:
Last reply:
Jeroen T. Vermeulen (jtv) said : #1

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.

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'.

Best Jeroen T. Vermeulen (jtv) said : #3

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.

Thanks Jeroen T. Vermeulen, that solved my question.