mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
127 stars 62 forks source link

po file generated with an extension ending by a dot at middle line height #433

Closed romualdginhoux closed 1 year ago

romualdginhoux commented 1 year ago

Dear support,

thanks and congratulations for this wonderful tool that helps so much in maintaining multilingual asciidoc documentation in combination with POEDIT on Windows.

I have updated from po4a 0.66 to 0.69 and I am experimenting the po4a.cfg concept to replace the calls to po4a-updatepo and po4a-translate in our makefile, since they are going to be deprecated. I have prepared a simple po4a.cfg file following the online help, but I am falling into a silly issue where the .po file generated from the .pot file has an extension ending with a dot at middle height! I cannot find any documentation about this issue.

Then of course the compilation fails because the expected .po file is not found:

romuald@OBERKIRCH:/mnt/wsl/docker-desktop-bind-mounts/Debian/ae8a1cfc628bd145e57bf9bbd03b89bdf7ecebf90d5e2d7610a7ac382ca179d6$ po4a po4a.cfg Invalid po file /mnt/wsl/docker-desktop-bind-mounts/Debian/ae8a1cfc628bd145e57bf9bbd03b89bdf7ecebf90d5e2d7610a7ac382ca179d6/docs/tms-cobot/docs/po/sandbox-mini.adoc/sandbox-mini.adoc.en.po:
msgfmt: error while opening "/mnt/wsl/docker-desktop-bind-mounts/Debian/ae8a1cfc628bd145e57bf9bbd03b89bdf7ecebf90d5e2d7610a7ac382ca179d6/docs/tms-cobot/docs/po/sandbox-mini.adoc/sandbox-mini.adoc.en.po" for reading: No such file or directory

See attached my cfg file and a screenshot of this strange po extension terminated by a dot at middle line height!

Capture d’écran 2023-08-09 175115

po4a.cfg.txt

Any idea?

I have reproduced this issue both with po4a v0.66 and v0.69 on a Debian terminal in VS Code.

Looking forward to your hints, Regards

mquinson commented 1 year ago

Hello, I suspect that there is a non-breaking space (as in ' ' or as explained in WP). Maybe you should grep your config file? No such thing appears in the .txt that you added to your report, but github or someone else may convert it on the fly.

romualdginhoux commented 1 year ago

Great, thanks for your help! From notepad++ I have converted the line breaks in my po4a.cfg file from Windows style (CR+LF) to Unix style (LF), and the non-breaking space after the po extension has disappeared. Now the po4a command does not fail anymore. Regards