]> 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>
Fri, 4 Dec 2020 21:49:27 +0000 (22:49 +0100)
commit9d16bbfc7f7f0435993f83e626ea25bc8ccbff6f
treebae2fe41c6532c003b7aa6b5c7b9aec44414e383
parent69ec1a10a096888341dd4fb460c9e94fed0784ab
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]