Closed keunes closed 2 years ago
Nice! Thanks!
Hi @mondeja I just updated mdpo and have now v0.3.80. It seems to have improved, but not all unused messages are removed: only the last one in the PO file is now removed, so I need to run md2po multiple times in order to remove all obsolete messages from the PO output.
Hmmm, weird. After deleting the PO file and let md2po create it from scratch, all unused strings are now removed properly after edits.
I can't reproduce it. Could you share a reproducible example?
What do you mean with a 'reproducable example'? My original post already lists the environment and project & files with which I had the original issue. The removing of one obsolete message per time happened like this:
I've tried it and I can't reproduce it. Could you reproduce it using some other environment? Maybe a repository with only the affected files? Maybe a script? It would be much more easy to debug by this way.
Is it possible to downgrade mdpo? If so I'm happy to test if I can reproduce :)
What do you mean with "downgrade mdpo"? You can install whatever version you want with pip install mdpo==X.Y.Z
@mondeja Ok, see repo https://github.com/keunes/mdpo-bug-test The PO file contains a few obsolete strings, created by mdpo v 0.3.73.
Running md2po en/*.md --po-filepath PO-files/site-general_en.PO --save --quiet --remove-not-found
(with mdpo v0.3.80) deletes the following two (out of the four) obsolete strings:
#~ msgid ""
#~ "You can download official AntennaPod builds on Google Play and on F-Droid."
#~ msgstr ""
#~ msgid ""
#~ "AntennaPod is a podcast player, completely free and respectful of your "
#~ "privacy. It's created by volunteers throughout the world without any "
#~ "commercial interest. Together we contribute to an open podcasting ecosystem."
#~ " So that you get to enjoy the web's best audio content."
#~ msgstr ""
These obsolete strings are still there:
#~ msgid ""
#~ "Press the button above to subscribe to this podcast in AntennaPod. If you "
#~ "don't have AntennaPod installed yet, you can [download the app "
#~ "here](/download)."
#~ msgstr ""
#~ msgid "Website theme"
#~ msgstr ""
Running the same command again removes the Press the button above...
string (and Website theme
is left).
Running the same command a third time removes also Website theme
.
Given
_i18n/PO-files
md2po _i18n/en/general/*.md --po-filepath _i18n/PO-files/site-general_en.PO --save --quiet --remove-not-found
the argument to remove not-used messages doesn't seem to have any effect: when I change a text in an MD file, then execute the above code, the message containing the old text is commented out (marked obsolete), but still in the PO file.