How can I activate Launchpad Translation in my project?

Asked by Navrang Oza

Hello LP Team,

I have a project on Launchpad.
https://code.launchpad.net/~openerp/openobject-client-web/trunk

I want to use Launchpad Translation feature.
So can anyone help me that which steps should I follow ?

My Locale, .po, .pot files path will work for using Translation ?
My directory structure will work here ? Or should I have to change any thing ?

Please have a look at my project and let me know some valuable comments for my question.
Thanks in advance.

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Planella (dpm) said :
#1

El dc 06 de 10 de 2010 a les 06:10 +0000, en/na noz (Open ERP) va
escriure:
> New question #128101 on Launchpad Translations:
> https://answers.edge.launchpad.net/rosetta/+question/128101
>
> Hello LP Team,
>
> I have a project on Launchpad.
> https://code.launchpad.net/~openerp/openobject-client-web/trunk
>
> I want to use Launchpad Translation feature.
> So can anyone help me that which steps should I follow ?
>

You'll find all the information you need at:

https://help.launchpad.net/Translations/YourProject/

There is more practical-oriented info here:

https://help.launchpad.net/Translations/YourProject/BestPractices

If there is any particular step that is not clear or in which you need
help, please tell us exactly what it is and we can give you a hand.

> My Locale, .po, .pot files path will work for using Translation ?
> My directory structure will work here ? Or should I have to change any thing ?
>

You should create a po/ folder at the root of your project tree and move
all the PO files there. You should also have a POT template there,
presumably named openobject-client-web. It should look like:

po/openobject-client-web
po/ca.po
po/zh_CN.po
...

More info at:
https://help.launchpad.net/Translations/YourProject/ImportPolicy#Sample%20directory%20layout

> Please have a look at my project and let me know some valuable comments for my question.
> Thanks in advance.
>

I hope you find this useful. If not, please feel free to come back to
us.

Regards,
David.

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

I think there's one typo in David's explanation: the template file's name should end in ".pot" so in this example:

po/openobject-client-web.pot
po/ca.po
po/zh_CN.po

Also, be careful with the automatic exports to the branch. Here's how I would do it:

1. Disable the automatic exports, to prevent accidents.
2. Move the translation files in your branch to the directory where you want them (in the example, po/).
3. Add the template, in the same directory as the translations.
4. Commit your changes and push to Launchpad.
5. Import the template, either by letting Launchpad import it from your branch or by uploading a tarball.
6. Re-enable the automatic exports.

Importing the template from your branch is the easiest and safest way to do it. It also means that changes you commit to the template in the branch will be imported automatically in the future.

The problem with uploading yourself is that if you upload just one file, the browser will tell us the filename but not its path. You can work around that by uploading a tarball containing the full path. Again following the example:

po/openobject-client-web.pot

Jeroen

Revision history for this message
Navrang Oza (noz-tiny) said :
#3

Hello,

Thanks for your comments.
I have changed something to improve layout structure.

Can you check it once my structure ?
https://code.launchpad.net/~openerp/openobject-client-web/trunk

Thanks.

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

I had a look at the import queue. Unfortunately all the files there still follow bad layouts:

 * There are multiple templates. In that case, you need to give every template its own directory, so that when a translation file is uploaded, Launchpad can see which template it's for.

 * You should put the translation files for a template directly in the same directory as the template.

 * Don't use language codes with redundant country codes such as "de_DE." Use just "de" instead. The country code is normally only appropriate in a few cases: zh_CN/zh_TW (Simplified vs. Traditional Chinese), pt_BR (Brazilian Portuguese), and en_GB (British English).

 * The base filename of a translation should be its language code, not its template name.

So a normal layout would look something like:
    po/template1/template1.pot
    po/template1/de.po
    po/template1/fr.po
    po/template1/pt.po
    po/template1/pt_BR.po
    po/template1/tr.po
    po/template1/zh_CN.po
    po/template2/template2.pot
    po/template2/de.po
    po/template2/en_GB.po
    po/template2/fr.po
    po/template2/pt.po
    po/template2/pt_BR.po
    po/template2/tr.po

Revision history for this message
Navrang Oza (noz-tiny) said :
#5

Hello,

Can any one from LP team activate my current branch for translation ?

Right now in this link, its old one.
https://translations.launchpad.net/openobject-client-web/trunk/+templates

But I want to do for new branch.
Thanks.

Can you help with this problem?

Provide an answer of your own, or ask Navrang Oza for more information if necessary.

To post a message you must log in.