mquinson/po4a

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

gemmaro opened this issue · 2 comments

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.

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.

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