+2013-11-14 Daiki Ueno <ueno@gnu.org>
+
+ * 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>.
+
2013-11-14 Daiki Ueno <ueno@gnu.org>
* x-javascript.c (comment_line_end): Add missing chars_to_remove
{
c = phase2_getc ();
if (c == UEOF || c == '\n')
- break;
+ {
+ comment_line_end (0);
+ break;
+ }
/* We skip all leading white space, but not EOLs. */
if (!(comment_at_start () && (c == ' ' || c == '\t')))
comment_add (c);
}
/* TRANSLATORS: This is a translator comment. */
gettext('Extract this fourth string');
+// TRANSLATORS: This is another translator comment.
+gettext('Extract this fifth string');
EOF
tmpfiles="$tmpfiles xg-js-1.err xg-js-1.tmp xg-js-1.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} --add-comments --no-location -o xg-js-1.tmp xg-js-1.js 2>xg-js-1.err
+${XGETTEXT} --add-comments=TRANSLATORS: --no-location -o xg-js-1.tmp xg-js-1.js 2>xg-js-1.err
test $? = 0 || { cat xg-js-1.err; rm -fr $tmpfiles; exit 1; }
# Don't simplify this to "grep ... < xg-js-1.tmp", otherwise OpenBSD 4.0 grep
# only outputs "Binary file (standard input) matches".
#. TRANSLATORS: This is a translator comment.
msgid "Extract this fourth string"
msgstr ""
+
+#. TRANSLATORS: This is another translator comment.
+msgid "Extract this fifth string"
+msgstr ""
EOF
: ${DIFF=diff}
tmpfiles="$tmpfiles xg-js-3.err xg-js-3.tmp xg-js-3.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} --add-comments --no-location -o xg-js-3.tmp xg-js-3.js 2>xg-js-3.err
+${XGETTEXT} --add-comments=TRANSLATORS: --no-location -o xg-js-3.tmp xg-js-3.js 2>xg-js-3.err
test $? = 0 || { cat xg-js-3.err; rm -fr $tmpfiles; exit 1; }
# Don't simplify this to "grep ... < xg-js-3.tmp", otherwise OpenBSD 4.0 grep
# only outputs "Binary file (standard input) matches".