+2013-11-14 Daiki Ueno <ueno@gnu.org>
+
+ * x-javascript.c (comment_line_end): Add missing chars_to_remove
+ argument; all callers changed.
+ Reported by Illimar Tambek at: <http://savannah.gnu.org/bugs/?40573>.
+
2013-11-11 Daiki Ueno <ueno@gnu.org>
* x-c.c (phase5_get): Fix misuse of a logical operator.
}
static inline const char *
-comment_line_end ()
+comment_line_end (size_t chars_to_remove)
{
char *buffer = unicode_string_buffer_result (&comment_buffer);
- size_t buflen = strlen (buffer);
+ size_t buflen = strlen (buffer) - chars_to_remove;
while (buflen >= 1
&& (buffer[buflen - 1] == ' ' || buffer[buflen - 1] == '\t'))
+2013-11-14 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext-javascript-1: Add a test to extract translator comments.
+
2013-08-30 Daiki Ueno <ueno@gnu.org>
* Makefile.am (gettextpo_1_prg_CPPFLAGS): Don't add 'gnulib-lib'
function foo(a) {
var s3 = "Prefix _(" + _("Extract this second string") + ") Postfix";
}
-if (document.getElementsById("foo")[0].innerHTML == _("Extract this thirth string")) {
+if (document.getElementsById("foo")[0].innerHTML == _("Extract this third string")) {
/* _("This is a comment and must not be extracted!") */
}
+/* TRANSLATORS: This is a translator comment. */
+gettext('Extract this fourth string');
EOF
tmpfiles="$tmpfiles xg-js-1.err xg-js-1.tmp xg-js-1.pot"
msgid "Extract this second string"
msgstr ""
-msgid "Extract this thirth string"
+msgid "Extract this third string"
+msgstr ""
+
+#. TRANSLATORS: This is a translator comment.
+msgid "Extract this fourth string"
msgstr ""
EOF