]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Make --directory option work right with Ruby input files.
authorBruno Haible <bruno@clisp.org>
Fri, 4 Dec 2020 21:49:27 +0000 (22:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
commit747f688023f0eea9fe70461915c3d5b62667c6e2
tree11d7483251d9ebd4f319640a452de6af5a3112ac
parent42278df44c44ce6d4f6c95489a60caf79c864bc5
xgettext: Make --directory option work right with Ruby input files.

* gettext-tools/src/xgettext.c (extract_from_file_func): Add found_in_dir
argument.
(xgettext_find_file): Return also the directory that was used to find the file.
(extract_from_file): Pass the directory to the extractor.
* gettext-tools/src/x-ruby.h (extract_ruby): Add found_in_dir argument.
* gettext-tools/src/x-ruby.c (extract_ruby): Add found_in_dir argument. Pass the
logical_filename to rxgettext, and run rxgettext in the given directory.
* gettext-tools/tests/xgettext-16: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
gettext-tools/src/x-ruby.c
gettext-tools/src/x-ruby.h
gettext-tools/src/xgettext.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xgettext-16 [new file with mode: 0755]