When are deleted terms really removed from Rosetta?

Asked by Olivier Dony (Odoo)

In the openobject-addons project, we do regular cleanup of our 150+ POT templates, sometimes removing obsolete terms in the process.

Once the relevant commit has been automatically imported by Launchpad (since our trunk series has translations sync'ed with Rosetta in both directions), the terms do not disappear immediately from Rosetta's web interface (as a term to translate for translators), or from the PO files that Rosetta commits everyday.

Could we have more explanations on how this works and how we can perhaps speed up the disappearance (both in Rosetta's web interface and in the PO files).

Here are 2 examples that puzzle us:
This term was removed from most of our POT templates in revision 3937: "Invalid XML for View Architecture!"
You can see the removal here: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/3937

Now we have different results depending on the language/POT domain:
A. In base_calendar/i18n/fr.po, the corresponding term was removed in the next commit: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/3938

B. In warning/i18n/fr.po, the corresponding term is still there, even though Launchpad has committed this file several times after revision 3937-38.
Edit: here is the link: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/annotate/3996/warning/i18n/fr.po#L104

Why the discrepancy between A and B? How can we avoid this?

Many thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Данило Шеган
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) said :
#1

Here is the link to see the file for example B, at current revision 3996:
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/annotate/3996/warning/i18n/fr.po#L104

Revision history for this message
Данило Шеган (danilo) said :
#2

In general, it should work as you expect it.

However, looking at revision 3937 diff for warning/i18n/warning.pot I don't see that message being removed: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/3937/warning/i18n/warning.pot

However, that message is indeed not present in warning.pot[1], but I don't see it present in fr.po either. It _is_ there as an "obsolete"* message, which is the standard way for gettext (and PO files) to deal with these things. We can't really remove them because they might be useful to translators (that's the only way they can get to them today), and it is generally suggested that you keep them as well because translators might want to use them when translating offline (eg. to get better translation suggestions based on similar messages and such).
 *) Obsolete messages in PO files are those commented out with "#~", and not considered "current" in the last version of the template

Also, note that in general keeping old translations in PO files is not a big deal because of the way most gettext applications behave (they ignore them). Thus, sometimes, when some part is very slow/hard we make use of this fact to make something faster/leaner, though if it becomes a nuisance for somebody, we do try to fix it. We just recently fixed a related bug 669831.

[1] http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/annotate/head:/warning/i18n/warning.pot
[2] http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/annotate/head:/warning/i18n/fr.po

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) said :
#3

> 14/12/10 14:36, Данило Шеган proposed the following answer:
> However, looking at revision 3937 diff for warning/i18n/warning.pot I
> don't see that message being removed:
> http://bazaar.launchpad.net/~openerp/openobject-
> addons/trunk/revision/3937/warning/i18n/warning.pot

D'oh, sorry about that, I messed up my commands when trying to track
down the changes (did not notice I had used bzr diff -r instead -c for
the 'warning' one)
Indeed the removal happened in revision 3980 [1], and the removal in the
.po file at the next export, in revision 3997 [2].

So as you say, it works as I expect it! Thanks!

Now let's say my updated POT was imported today and removed 200 terms,
does the Rosetta interface reflect it immediately, i.e. all the
languages have 200 terms less to translate, even if the updated PO will
not be re-exported immediately?
If it does, then it means that all is fine for us.

Thank you again for your very complete answer, as always (the related
bug reference was very interesting too)

[1]
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/3980/warning/i18n/warning.pot
[2]
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/3997/warning/i18n/fr.po

Revision history for this message
Best Данило Шеган (danilo) said :
#4

Yes, that's exactly right: if you remove 200 messages, all languages will reflect that immediatelly. Export is only done once a day as an optimization (roughly around 0600 UTC, though it varies depending on the amount of work it needs to do), so if you wait a day, you should see it in the exported file as well.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) said :
#5

Thanks Данило Шеган, that solved my question.