+2013-08-12 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext.c (remember_a_message): Handle multi-line extracted
+ comments.
+ Reported by Gabor Kelemen in
+ <http://lists.gnu.org/archive/html/bug-gettext/2013-08/msg00026.html>.
+
2013-07-11 Daiki Ueno <ueno@gnu.org>
Fix crash when parsing '..' with non-string argument.
nitems_before = (mp->comment_dot != NULL ? mp->comment_dot->nitems : 0);
if (extracted_comment != NULL)
- message_comment_dot_append (mp, extracted_comment);
+ {
+ char *copy = xstrdup (extracted_comment);
+ char *rest;
+
+ rest = copy;
+ while (*rest != '\0')
+ {
+ char *newline = strchr (rest, '\n');
+
+ if (newline != NULL)
+ {
+ *newline = '\0';
+ message_comment_dot_append (mp, rest);
+ rest = newline + 1;
+ }
+ else
+ {
+ message_comment_dot_append (mp, rest);
+ break;
+ }
+ }
+ free (copy);
+ }
add_all_remaining_comments = add_all_comments;
for (j = 0; ; ++j)
+2013-08-12 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext-glade-7: Add a test for multi-line extracted comments.
+
2013-07-11 Daiki Ueno <ueno@gnu.org>
* xgettext-lua-1: Add test case for string concatenation.
<col id="1" translatable="yes" context="This is not translatable">Please...</col>
<col id="2">86855555</col>
</row>
+ <row>
+ <col id="0" translatable="yes" context="First row">Hi</col>
+ <col id="1" translatable="yes" comments="A multiline comment.">Comment</col>
+ <col id="2">999</col>
+ </row>
</data>
</object>
<object class="GtkWindow" id="window">
tmpfiles="$tmpfiles xg-gl-7.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o - xg-gl-7.ui | grep -v 'POT-Creation-Date' > xg-gl-7.pot
+cp xg-gl-7.pot ..
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles xg-gl-7.ok"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: xg-gl-7.ui:30
+#: xg-gl-7.ui:30 xg-gl-7.ui:45
msgctxt "First row"
msgid "Hi"
msgstr ""
#. A comment.
-#: xg-gl-7.ui:31
+#. A multiline
+#. comment.
+#: xg-gl-7.ui:31 xg-gl-7.ui:46
msgid "Comment"
msgstr ""
msgstr ""
#. This thing is the menu label
-#: xg-gl-7.ui:62
+#: xg-gl-7.ui:67
msgctxt "Menu"
msgid "One thing"
msgstr ""
#. This thing is the label in the inner menu.
-#: xg-gl-7.ui:70
+#: xg-gl-7.ui:75
msgctxt "One thing"
msgid "One thing"
msgstr ""
#. This is easy.
-#: xg-gl-7.ui:87
+#: xg-gl-7.ui:92
msgctxt "Menu"
msgid "H_elp"
msgstr ""
#. This one thing is for the second menu.
-#: xg-gl-7.ui:95
+#: xg-gl-7.ui:100
msgctxt "Second menu"
msgid "One thing"
msgstr ""
#. To you too.
-#: xg-gl-7.ui:105
+#: xg-gl-7.ui:110
msgctxt "Second menu"
msgid "Greetings"
msgstr ""
#. This one thing is the button.
-#: xg-gl-7.ui:142
+#: xg-gl-7.ui:147
msgctxt "Button"
msgid "One thing"
msgstr ""