translate / pootle

Online translation tool
http://pootle.translatehouse.org
GNU General Public License v3.0
1.49k stars 287 forks source link

downloaded po files don't contain obsolete strings (difference to on-disk export) #5819

Open cloph opened 7 years ago

cloph commented 7 years ago

I guess this kinda falls in the bug or feature territory…

When using export for translating offline, the obsoleted strings are not included, while the result of sync_stores on disk has the obsolete strings (marked with #~ comment starter)

ta2-1 commented 7 years ago

hi @cloph can I ask if you need this feature? I'm checking how to make this behaviour consistent.

Currently sync_stores leave an obsolete unit within existing file on disk if the obsolete unit already was in the file. When export creates a new file and obsolete units are not included.

cloph commented 7 years ago

We (LibreOffice project) have rather large set of strings, and maintain multiple codelines at the same time, so translators that don't have complete translations face the issue of having to translate the same string in multiple projects. So while they can focus on translating the latest project, the templates are updated in that project more frequently, so already translated strings might get demoted to obsolete strings, and then are no longer available to them.

In similar notation, from time to time a update of templates contains janitorial style cleanups that affect the string, but don't alter the string that is meant to be translated (like changing msgctx or changing attributes within a xml-tag that's part of the source-string, but is not meant to be translated. For those cases we have scripts that grab the translation from the obsolete strings and apply it to the updated po file.

And I guess local translation memory could also make use of the obsolete strings.

So to answer whether it is needed: cannot really tell, what made me file the ticket is a recent post to our mailinglist where a contributor did write a script to copy translations between projects ( http://www.mail-archive.com/l10n@global.libreoffice.org/msg10696.html ) and during a exchange it came to my attention that the obsolete strings are not available to people using export, compared to admins that can access the files on disk. Translators did live without those strings before, but this is also the first time we had a master project and not just the release branches in pootle.

It certainly isn't super-high priority, since if it is really needed, we could provide export of the files on disk to translators via other means than the export via website.

phlax commented 7 years ago

hi @cloph this has generated quite a bit of discussion.

atm, Pootle uses obsolete for deleting units. When it updates/syncs it doesnt match the obsolete units and leaves the ones that are in the file.

This means that only the files synced in this way contain the obsoletes - they may/not be in the db along with potentially a lot of extra units.

There isnt a simple fix, but we could hack something if its important in the short term.

Longer term, i would like to see us add a "deleted" state for units, and then ensure that for formats like po that support obsolete units - we are able to sync/export etc correctly