[Tuxpaint-devel] Stamps POT/PO/TXT Python scripts updated for Python 3
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2023-01-04 08:22:28
|
I recently upgraded to Ubuntu 22.04 LTS, and it seems that I have Python 3 now, not Python 2. So the ancient old scripts that manage the Tux Paint Stamps description text files (".txt"), and the gettext translation catalog ("tuxpaint-stamps.pot" and the dozens of ".po" files) stopped working for me. So, I stabbed at the dark and Googled a bunch, and I believe I got it all working properly now. However, if anyone who's still out here is _versed_ in Python, please look over the scripts and let me know if anything needs adjusting (or feel free to play with it in the Git repo; or in a fork of the 'tuxpaint-stamps' repository, and send me a Pull Request over on SourceForge, if you'd prefer). In the end, my goal was that, when running "createpo.sh" (which runs "txt2po.py"), that the ".pot" and ".po" files in the "po/" subdirectory were not changed in any unexpected ways (per a `git diff`). And similarly, that running "createtxt.sh" (which runs "po2txt.py") didn't cause a ton of unexpected changed to the description ".txt" files found in the "stamps/..." hierarchy of directories. So far so good! Running it tonight, it did catch up with some PO changes that have come in since the June 2022 release of the Stamps package. And ALL translations to the description of the "seasonal/hanukkah/dreydl-shin" stamp went away, because the main English string at the top changed, so nothing matched it in the PO files... as expected! Thanks in advance, and happy new year!!! -- -bill! Sent from my computer |