Le 31/01/2022 à 18:27, Petter Reinholdtsen a écrit :
[Yvan Masson]As I believe WhosWho can be of interest for Debian Edu users, I am asking for help: I am currently stuck at building the software with translations done on Weblate (particularly to generate .desktop file and Appstream metainfo file) and more generally to provide a proper build system. I suppose this should be done by improving setup.py, but could not find how. Note that I am not a programmer, so my skills in this domain are really basic.I started by completing the Bokmål translation on <URL: https://hosted.weblate.org/projects/whoswho/#components > and hope others will complete the translation into their languages.
I really appreciate. I am not really at ease with IRC, so I will do my best to explain on the list:Happy to help, but I do not really understand the problem. Can you explain what you want to do, what you are doing, and list the output you get when you do it? Feel free to ping me on IRC (#debian-edu?) if you want to do this interactively.
Concretely, after translations are done on Weblate, I am able to `git merge` the changes to my git repository (I know this can be done automatically but it is not a big deal to do it manually for now). After that, I know that I should use `msgfmt` command from GNU GetText to produce .mo files for each language. I believe I do it properly, even if I have not tested the result yet:
$ cd WhosWho/translations $ langue=fr $ msgfmt $langue.po --output-file=compiled/$langue/LC_MESSAGES/whoswho.moThen, I think I should run two similar `msgfmt` commands, to respectively produce whoswho.desktop and Appstream .metainfo.xml files. I can not find the proper syntax to run those commands, and can not find the proper syntax for XML and .desktop "templates" (as named in `msgfmt` manpage).
Then, I am absolutely not sure if my project structure is correct: `WhosWho/WhosWho/translations/compiled/the_languages/LC_MESSAGES/whoswho.mo`
Also, I don't know if the resulting files (.mo, .desktop and .metadata.xml) should appear in my git repository or not.
Finally, I suppose it is better to handle all the `msgfmt` commands in the `setup.py` script I use to produce the .whl file, but I don't know if there is a standard way to do so.
Hope it is clear enough :-)
Description: OpenPGP digital signature