Please approve an import of .po files

Asked by Emilien Klein on 2010-06-04

Hi,

I've set up a Launchpad project for KeepRight in order to do the translations [1] here in Launchpad (with the approval of the project leader/main developer/unique developer).

I've configured it for auto-import of both templates and translation files. The template has been approved quickly. I've blocked 2 .po files that are example files, but the 2 other files (Austrian German and Brazilian Portuguese) are still in "Needs Review".

The (upstream) structure is as follows:

web/locale/keepright.pot
web/locale/de_AT/LC_MESSAGES/de_AT.po
web/locale/pt_BR/LC_MESSAGES/pt_BR.po

Is this structure going to be a problem for the import of the project? Do I need to bug upstream to change the structure (which means introducing a new step before each commit because the web app will not be able to locate the .po files correctly if they're all in the same folder)?

[1] https://translations.launchpad.net/keepright/+imports

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Adi Roiban
Solved:
2010-06-07
Last query:
2010-06-07
Last reply:
2010-06-07
Best Adi Roiban (adiroiban) said : #1

Hi Emilien,

The structure is a problem. It is not supported by Launchpad, and as far as I know it is not going to be supported soon.

Launchpad will search the same folder for the PO files associated to a POT file.

„locale/de_AT/LC_MESSAGES/file.po” structure correspond to the binary MO files ... for translations it is like having the source file in an bin/ folder.

The „production” application should read .mo file and not .po ... but maybe your application is engineered in a different way.

It would be nice if you could move all PO files in the same folder with the POT file (web/locale).

You can have a „make deploy” build command that will prepare the final „web” folder for deployment.

Cheers,

Emilien Klein (emilien-klein) said : #2

OK, thanks for the response.

I've contacted upstream about changing this. In the meantime, I've manually uploaded those 2 .po files so that they get imported before somebody gets the chance to start translating those languages again. I guess I just have to wait for automatic approval, right?

Thanks Adi.

Adi Roiban (adiroiban) said : #3

It looks like the de.po and pt_BR.po were successfully imported.

To enable automatic translation export you will have to create an empty branch.

The current „lp:~emilien-klein/keepright/translations-export” was not initialized.
To initialized and push that branch you can do:

$ mkdir translations-export-branch
$ cd translations-export-branch
$ echo "Branch used for automatic translations export. For more details see: https://launchpad.net/keepright " > README
$ bzr init
$ bzr add *
$ bzr ci -m"Initial commit"
$ bzr push lp:~emilien-klein/keepright/translations-export

Cheers

Emilien Klein (emilien-klein) said : #4

Thanks Adi,

I had indeed noticed that the exports where not working. I thought that just creating a new branch would be sufficient, as it was linked from the translations export page. I will file a bug so that an uninitialized branch can be automatically initialized if it's linked as an export branch.

Cheers,
Emilien.

Emilien Klein (emilien-klein) said : #5

Thanks Adi Roiban, that solved my question.

Jeroen T. Vermeulen (jtv) said : #6

The problem where a branch has been "registered" in the Code app but not yet created in bzr, and then set as a translations export branch is bug 409686, a fix for which is already committed. After the Launchpad 10.06 release later this month, the export script will send out notification emails about this situation. The email contains instructions similar to those Adi gave.

Unfortunately creating an empty branch automatically has been found not to be a proper solution for the problem. But the Code team is planning to make the process clearer and less error-prone.