examples: Quote shell variables in hello-java*/configure
When running from xsmallpot.sh, embedded shell-script snippets are
stripped off from configure.ac and some variables are not set.
Make sure to quote them to avoid error.
* hello-java/configure.ac: Quote $BUILDJAVA.
* hello-java-awt/configure.ac: Quote $BUILDJAVAEXE and $BUILDJAVA.
* hello-java-qtjambi/configure.ac: Likewise.
* hello-java-swing/configure.ac: Likewise.
autogen.sh: Use included gettext-tools for bootstrap
To regenerate POT files, autogen.sh had an implicit dependency on
gettext-tools installed on system. This prohibited to use any new
features in our examples. Let autogen.sh use included version of
gettext-tools, by prepending $builddir to the PATH.
examples: Don't error out from configure in hello-c-gnome3
The configure script shouldn't fail even if there is a fatal
error, to allow the toplevel autogen.sh to regenerate POT files.
* hello-c-gnome3/configure.ac: Don't error out, but warn user.
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>.