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

Translations are created both in the path of destdir option in the po4a config and in the current directory #420

Closed gemmaro closed 9 months ago

gemmaro commented 1 year ago

For example, when the files are located as:

.
├── po
│   ├── all.pot
│   └── ja.po
├── po4a.cfg
└── src
    └── foo.txt

and po4a.cfg is like:

[options] --destdir out

[po_directory] po

[type:text] src/foo.txt \
            ja:foo.txt

then after runnning po4a po4a.cfg:

.
├── foo.txt # <- ?!
├── out
│   └── foo.txt
├── po
│   ├── all.pot
│   └── ja.po
├── po4a.cfg
└── src
    └── foo.txt

If the destdir option is given explicitly as a command line argument (po4a po4a.cfg --destdir out), the problem doesn't occur; the translations are not created in the current directory:

.
├── out
│   ├── foo.txt
│   └── po
├── po
│   ├── all.pot
│   └── ja.po
├── po4a.cfg
└── src
    └── foo.txt

Here is a repository to reproduce: https://github.com/gemmaro/po4a-issues-420

Tested po4a versions: 0.68, 0.69.

mquinson commented 9 months ago

Thanks @gemmaro for this very good bug report. Your test case and analysis were really helpful. I would have difficulties to spot the issue if you didn't mention that providing the options on the command line were fixing the problem.

gemmaro commented 9 months ago

Thank you very much for taking care of this. I confirmed that it works fine now.