Translation/Templates not appear in LP Translation

Asked by Mustufa Rangwala (Open ERP) on 2010-08-19

Hello,

         We have https://code.launchpad.net/~openerp/openobject-addons/trunk this branch for our addons modules. Yesterday i have added i18n folder with resource module with resource.pot, fr.po, en_US.po. And commited on the branch. But I am not able to see its translation/templates https://translations.edge.launchpad.net/openobject-addons/trunk/+templates, https://translations.edge.launchpad.net/openobject-addons/trunk. So when i will get resource module translation over LP ?

i need to manually upload template/translation anywhere ? so that i can synchronize it with our branch.

Thank you,
mra

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Mustufa Rangwala (Open ERP)
Solved:
2010-08-30
Last query:
2010-08-30
Last reply:
2010-08-30

This question was reopened

Jeroen T. Vermeulen (jtv) said : #1

We're having a look… It looks as if the files did get onto the import queue (even the en_US one, though that shouldn't ever be imported) but the template did not get approved for some reason.

Jeroen T. Vermeulen (jtv) said : #2

Henning figured it out: a template was enabled for translation but wasn't present in the branch anymore. I'll figure out which one it was and disable it.

Hello Jeroen,

The resource template has now been imported successfully. I can see it in template + translation :)

Thank you,
Mustufa (mra)

Hello,

ok one more question:

What was problem ? because i will add more i18n to our remaining modules tommorow so if you tell me it will be nice for me.

Is anything i need to take care while adding i18n folder to module with branch.

thanks.

Jeroen T. Vermeulen (jtv) said : #5

This may be my fault because I re-enabled some templates in the past when there were uploads for them and I assumed that you wanted those imported.

I just went through the lists to compare active templates to what's actually in the branch. Differences I came across:
 * The branch has l10n-in whereas the templates list has l10n-chart-in. Is this a rename?
 * report-analytic-planning isn't in the branch anymore, so I disabled it.
 * The branch has scrum whereas the templates list has project-scrum. Renamed?

So two of the templates may have been renamed. The algorithm that matches templates from the branch to ones we already have in the database is a bit conservative and won't make assumptions: are these indeed renamed templates, or did two disappear and two others appear, or did one get split up and another removed, or one renamed, one removed, and one added? If they are renames, which of the new template names replaces which of the old ones? We're talking about making the algorithm a bit more aggressive, but it's not as easy a problem as it seems.

If you update the templates in the database to reflect how the importer should interpret the files in the branch, then automatic approvals of new templates should resume.

Jeroen T. Vermeulen (jtv) said : #6

The resource.pot template was imported because I approved it manually; the template names in the branch still have to match those in the database (at least, for the templates we actually have in the database), otherwise new templates won't be automatically approved.

The matching algorithm _is_ smart enough to deal with just added templates. It's removing or renaming templates that makes it give up when it sees unmatched templates coming in from the branch.

Hello,

* The branch has l10n-in whereas the templates list has l10n-chart-in. Is this a rename? => YES (module is renamed)
 * report-analytic-planning isn't in the branch anymore, so I disabled it. => OK
 * The branch has scrum whereas the templates list has project-scrum. Renamed? => yes scrum module rename to project_scrum

so everytime if i add i18n with my branch module..i need to tell you to approve/import my tempalte in to LP ?

thanks

Jeroen T. Vermeulen (jtv) said : #9

No. You need to make sure that if you rename or remove a template from the branch, you also rename or disable it in the database.

As long as that always happens, each of the template names you see in the Translations UI will match one template file in the branch. And as long as they are matched in that way, any new template you add in the branch will then be _automatically_ approved. No help from us needed.

What happens if the names are not matched? For example, say you delete a template called "foo" from the branch. There are now more active templates in the translations database than there are in the branch. Later, you add another template called "bar" to the branch. Now the importer can't be sure: did you just rename "foo" to "bar" in the branch? Or did you delete "foo" and add "bar"? So it does nothing and waits for humans to figure it out.

There are still many, many ways in which we can improve this and process more of the problem cases automatically. But probably, no single change is going to make all problems go away. (For example, in a bzr branch we can see if you rename a file; but in older revision control systems you "rename" a file by removing it in one place and adding it in another. And the branch you import from may be a mirror from one of those systems elsewhere).

Hello,

Ok i will take care while removing and renaming it.

And if i add new template in our branch it will directly come on template list + Related Translations on LP .

thanks,
mra

Jeroen T. Vermeulen (jtv) said : #11

Yes, then the new templates you add to the branch should just automatically appear in the translation UI.

Sorry for the rough edges; hope we can make it smoother in the future!

Hello Jeroen,

I have same problem again with some newly added i18n folders on our branch modules but it seems not coming to templates/translations List of LP UI.

see: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/4771

Can you please check ?

Thank you,
Mustufa (mra)

I've approved them manually. With such a big number of new templates introduced, I am not surprised that the approver didn't pick them up. Whenever you hit a similar problem, do feel free to open a new question so we can approve them manually.

hello Данило Шеган ,

thanks templates are imported to LP

Regards
Mustufa (mra)