gtranslator r3456 - branches/GOBJECT_WORK/src
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gtranslator r3456 - branches/GOBJECT_WORK/src
- Date: Fri, 25 Jan 2008 14:59:12 +0000 (GMT)
Author: icq
Date: Fri Jan 25 14:59:11 2008
New Revision: 3456
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3456&view=rev
Log:
2008-01-25 Ignacio Casal Quinteiro <nacho resa gmail com>
* msg.ch:
* comment.c:
Added msgctxt support.
* Makefile.am: Removed compile.h.
Modified:
branches/GOBJECT_WORK/src/ChangeLog
branches/GOBJECT_WORK/src/Makefile.am
branches/GOBJECT_WORK/src/comment.c
branches/GOBJECT_WORK/src/msg.c
branches/GOBJECT_WORK/src/msg.h
Modified: branches/GOBJECT_WORK/src/Makefile.am
==============================================================================
--- branches/GOBJECT_WORK/src/Makefile.am (original)
+++ branches/GOBJECT_WORK/src/Makefile.am Fri Jan 25 14:59:11 2008
@@ -72,7 +72,6 @@
libgtranslator_la_SOURCES = \
$(BUILT_SOURCES) \
application.c \
- compile.h \
draw-spaces.c draw-spaces.h \
message-area.c \
message-table.c \
Modified: branches/GOBJECT_WORK/src/comment.c
==============================================================================
--- branches/GOBJECT_WORK/src/comment.c (original)
+++ branches/GOBJECT_WORK/src/comment.c Fri Jan 25 14:59:11 2008
@@ -48,8 +48,24 @@
GtranslatorMsg *msg,
GtranslatorCommentPanel *panel)
{
+
+ gchar *extracted;
+ gchar *context;
+ gchar *toset;
+
+ context = g_strconcat(_("Context:\n"), gtranslator_msg_get_msgctxt (msg), NULL);
+ extracted = g_strconcat(_("Extracted comments:\n"),
+ gtranslator_msg_get_extracted_comments(msg), NULL);
+
+ toset = g_strdup_printf("%s\n%s", context, extracted);
+
+ g_free(context);
+ g_free(extracted);
+
gtranslator_comment_panel_set_extracted_comments(panel,
- gtranslator_msg_get_extracted_comments(msg));
+ toset);
+
+ g_free(toset);
gtranslator_comment_panel_set_comments(panel,
gtranslator_msg_get_comment(msg));
Modified: branches/GOBJECT_WORK/src/msg.c
==============================================================================
--- branches/GOBJECT_WORK/src/msg.c (original)
+++ branches/GOBJECT_WORK/src/msg.c Fri Jan 25 14:59:11 2008
@@ -430,6 +430,21 @@
return (gint *)po_filepos_start_line(filepos);
}
+/*
+ * gtranslator_msg_get_msgctxt:
+ * @msg: a #GtranslatorMsg
+ *
+ * Return value: the context of a message, or NULL for a
+ * message not restricted to a context.
+ */
+const gchar *
+gtranslator_msg_get_msgctxt(GtranslatorMsg *msg)
+{
+ g_return_val_if_fail(GTR_IS_MSG(msg), NULL);
+
+ return po_message_msgctxt(msg->priv->message);
+}
+
static void
on_gettext_po_xerror(gint severity,
po_message_t message,
Modified: branches/GOBJECT_WORK/src/msg.h
==============================================================================
--- branches/GOBJECT_WORK/src/msg.h (original)
+++ branches/GOBJECT_WORK/src/msg.h Fri Jan 25 14:59:11 2008
@@ -137,6 +137,8 @@
gint *gtranslator_msg_get_file_line (GtranslatorMsg *msg,
gint i);
+const gchar *gtranslator_msg_get_msgctxt (GtranslatorMsg *msg);
+
const gchar *gtranslator_msg_check (GtranslatorMsg *msg);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]