Daiki Ueno [Mon, 24 Mar 2014 09:43:01 +0000 (18:43 +0900)]
Extend --add-location option to suppress line number output
The --add-location option of msgattrib, msgcat, msgcomm, msgconv,
msgen, msgfilter, msggrep, msgmerge, msguniq, and xgettext
commands now takes an optional argument 'never', 'full', or
'file', to control the format of "#: ..." comments.
The default catalog reader changed to always remember file
positions so the line number part can be suppressed in output
phase rather than input phase.
Daiki Ueno [Mon, 10 Mar 2014 09:28:44 +0000 (18:28 +0900)]
php: Recognize single and double quotes around heredoc label
Problem reported by Byrial Jensen in:
<https://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00001.html>.
Based on the patch by Andreas Stricker posted as:
<https://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00002.html>.
Roumen Petrov [Sun, 12 Jan 2014 19:37:30 +0000 (21:37 +0200)]
tests: fix "make check" under VPATH builds
Previously, we generated init.cfg in $builddir, while tests/init.sh
reads its configuration file (init.cfg) from $srcdir. This patch
moves the auto-generated part into a separate file
($builddir/init-env) and read the file from $srcdir/init.cfg.
Daiki Ueno [Thu, 5 Dec 2013 09:47:46 +0000 (18:47 +0900)]
autopoint: Allow user to specify custom autom4te executable
* autopoint.in (func_trace): Allow user to specify autom4te
executable name through $AUTOM4TE envvar.
* gettextize.in (func_trace): Likewise.
Suggested by Eric Blake at
<https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00006.html>.
Daiki Ueno [Wed, 20 Nov 2013 03:41:20 +0000 (12:41 +0900)]
xgettext: Add E4X support to JavaScript scanner
Reported by Piotr Drąg at: <https://savannah.gnu.org/bugs/?40125>.
* src/xgettext.h (enum lexical_context_ty): New enumeration items
lc_xml_open_tag, lc_xml_close_tag, lc_xml_content.
* src/x-javascript.c (phase5_scan_xml_markup): New
function.
(phase5_get): Handle '<', '>', '/', '=', '{', and '}' specially
to support E4X.
(enum token_type_ty): New enumeration item token_type_equal.
(xml_element_depth): New variable.
(inside_embedded_in_xml): New variable.
(extract_javascript): Initialize those variables.
* tests/Makefile.am (TESTS): Add xgettext-javascript-6.
* tests/xgettext-javascript-6: New file.
Daiki Ueno [Tue, 19 Nov 2013 03:08:10 +0000 (12:08 +0900)]
autopoint: disable m4_include and m4_esyscmd when tracing
* autopoint.in (func_trace): Disable m4_include and m4_esyscmd.
* gettextize.in (func_trace): Likewise.
Reported by Bernhard Voelker in
<https://lists.gnu.org/archive/html/bug-gettext/2013-11/msg00011.html>
and suggested by Eric Blake at <https://savannah.gnu.org/bugs/?40083>.
Daiki Ueno [Thu, 14 Nov 2013 07:10:03 +0000 (16:10 +0900)]
javascript: fix translator comment extraction in C++-style comments
* src/x-javascript.c (phase3_getc): Make sure to call comment_line_end
after parsing C++ style comment line.
Reported by Illimar Tambek at: <http://savannah.gnu.org/bugs/?40572>.
* tests/xgettext-javascript-1: Add a test to extract translator comments
from C++ style comment lines; only extract comments with
TRANSLATORS: tag.
* tests/xgettext-javascript-3: Only extract comments with TRANSLATORS:
tag.
* autopoint.in (omitintl): Don't set it 'no' when no
AM_GNU_GETTEXT call is found.
Reported by Sebastien Helleu in <http://savannah.gnu.org/bugs/?39536>.
The comments in that script state that its use is only required to
work around issues in aclocal from Automake 1.10, while the rest
of the Gettext build infrastructure assumes Automake >= 1.11 anyway.
* autogen.sh: Drop invocations of 'fixaclocal', simply invoke the
'aclocal' program directly.
* build-aux/fixaclocal: Remove.
* Makefile.am (EXTRA_DIST): Stop distributing it.
(ACLOCAL): Drop redefinition in function of 'fixaclocal'.
* gettext-runtime/Makefile.am (ACLOCAL): Likewise.
* gettext-runtime/libasprintf/Makefile.am (ACLOCAL): Likewise.
* gettext-tools/Makefile.am (ACLOCAL): Likewise.
* gettext-tools/examples/Makefile.am (ACLOCAL): Likewise.