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

Included files should be searched in the path of the master #72

Open mquinson opened 6 years ago

mquinson commented 6 years ago

(reported on 07/08/2004 on Alioth by myself, and manually migrated on 02/06/2018)

If you want to handle a file being in another directory, all included ones are
not found because they are searched in the current directory instead of 
where the master file is.

Comment by Jordi Vilalta on 09/08/2004:

Could this be fixed together with the generalized way to include files for all the 
modules?

Comment by me on 10/08/2004:

Could be hacked in the meanwhile ;)
mquinson commented 6 years ago

The first step would be to add a new include($) primitive to the TransTractor that would factorize the code currently in each format-specific parsers, and then to use that code in each format-specific parser instead.

Once all this factorization work is done, you can actually fix the current but, that is, extend this include($) primitive to search not only in the current dir, but also where the master file is.

Many many thanks for your contributions.

ciampix commented 6 years ago

Am I right or this could solve also the missing compliance of the include directive present in the asciidoc format? If I understand it correctly this can be be a great new feature!

mquinson commented 6 years ago

Well, it would probably be possible to implement include in ascii doc in another way (eg by duplicating the include-related code in other formats) but the Right Thing to do is certainly to factorize code between formats, as advised above.