Open huftis opened 8 years ago
This issue consists in a bug and a feature request. Please split them into two separate issues.
Hi @huftis, recently https://github.com/translate/pootle/issues/4302 was fixed where we restricted adding new and removing existing units. Only translation is available. @unho I hope there is no bug any more.
Thank you for the information. I’ll try upgrading to the latest Github version (in the coming days) and take a look and report if everything’s working as expected.
When uploading a .po file, the file on Pootle seems to be completely replaced by the uploaded file. So uploading a file can add strings (not existing in the template / original file) or remove strings (make them no longer available for translation). This can be a big problem. Example:
The strings on Pootle are:
The user uploads a file containing
The resulting file on Pootle will contain the contents of the uploaded file, i.e. 4 strings (2 of them new, 2 of them with updated content, and 1 of the old ones is deleted).
Expected result: Any translations on Pootle will be replaced by the ones in the uploaded file. No strings will be deleted, and no new strings added. So the result should have been:
If the uploaded file instead only contained
The result should have been
That is, the existing translation of ‘bar’ was replaced by the empty ‘translation’ in the uploaded file. (It is sometimes useful to remove (usually bad) translations this way.) Similarly, if the uploaded files contained a fuzzy string, the string on Pootle should be made fuzzy. Basically, the algorithm should be very simple:
For each string in Pootle, check if the same string exists (as a non-obsolete string) in the uploaded file. If it does, replace the translation in Pootle by the translation in the uploaded file (including any fuzzy status or translator comment).
Then the user can neither add new strings or delete old ones, making the PO file out of sync with the templates, but can update any strings (including changing its status or removing its translation). In other words, the user can do exactly the same actions as she/he could do in a normal PO editor. I think this is the expected behaviour for people working offline.