Open olifante opened 2 years ago
Here's a couple of examples using wagtail 4.0.2 + localize 1.3a4:
Thanks for this @olifante, will be looking at it on Friday
Alright, so we have two things here:
msgctxt
. This happens because paragraphs are extracted as their own segementsSo the things is two-prong:
msgctxt
if the same string is used in multiple placesNote: this will require several hours to a day
Same happens even if the context is the same
msgctxt "body" msgid "Hello" msgstr ""
msgctxt "body" msgid "Hello" msgstr ""
msgctxt "body" msgid "Hello" msgstr ""
poEdit deletes duplicates as invalid. wagtail-localize doesn't take single translation for all occurrences.
Hey there, we also stumbled across the problem in our project. Is there any progress on this issue?
Adding repeated text fragments to a source page and synchronising it to the target page results in some fragments showing apparently missing translations in the Admin for target page. However, publishing the target page actually shows no missing translations.
In a way, this makes sense, as PO files should have only one instance of each translatable text fragment. Instead, what we observe when we export the PO file for a target page with "missing" translations is that the same fragment appears multiple times, with and without translations. For the published page, one instance of a translatable text fragment is enough, and it will correctly use it to display the translated text.
This seems to consist of two related problems:
This behaviour is confusing for editors.
I reproduced this problem on a localised version of the bakery demo, using the following combinations: