GtranslatorMsg

GtranslatorMsg

Synopsis

                    GtranslatorMsgPrivate;
                    GtranslatorMsg;
enum                GtranslatorMsgStatus;
GType               gtranslator_msg_register_type       (GTypeModule *module);
GtranslatorMsg *    gtranslator_msg_new                 (po_message_iterator_t iter,
                                                         po_message_t message);
po_message_iterator_t  gtranslator_msg_get_iterator     (GtranslatorMsg *msg);
void                gtranslator_msg_set_iterator        (GtranslatorMsg *msg,
                                                         po_message_iterator_t iter);
po_message_t        gtranslator_msg_get_message         (GtranslatorMsg *msg);
void                gtranslator_msg_set_message         (GtranslatorMsg *msg,
                                                         po_message_t message);
GtkTreeRowReference * gtranslator_msg_get_row_reference (GtranslatorMsg *msg);
void                gtranslator_msg_set_row_reference   (GtranslatorMsg *msg,
                                                         GtkTreeRowReference *row_reference);
gboolean            gtranslator_msg_is_translated       (GtranslatorMsg *msg);
gboolean            gtranslator_msg_is_fuzzy            (GtranslatorMsg *msg);
void                gtranslator_msg_set_fuzzy           (GtranslatorMsg *msg,
                                                         gboolean fuzzy);
void                gtranslator_msg_set_status          (GtranslatorMsg *msg,
                                                         GtranslatorMsgStatus status);
GtranslatorMsgStatus  gtranslator_msg_get_status        (GtranslatorMsg *msg);
const gchar *       gtranslator_msg_get_msgid           (GtranslatorMsg *msg);
const gchar *       gtranslator_msg_get_msgid_plural    (GtranslatorMsg *msg);
const gchar *       gtranslator_msg_get_msgstr          (GtranslatorMsg *msg);
void                gtranslator_msg_set_msgstr          (GtranslatorMsg *msg,
                                                         const gchar *msgstr);
const gchar *       gtranslator_msg_get_msgstr_plural   (GtranslatorMsg *msg,
                                                         gint index);
void                gtranslator_msg_set_msgstr_plural   (GtranslatorMsg *msg,
                                                         gint index,
                                                         const gchar *msgstr);
const gchar *       gtranslator_msg_get_comment         (GtranslatorMsg *msg);
void                gtranslator_msg_set_comment         (GtranslatorMsg *msg,
                                                         const gchar *comment);
gint                gtranslator_msg_get_po_position     (GtranslatorMsg *msg);
void                gtranslator_msg_set_po_position     (GtranslatorMsg *msg,
                                                         gint po_position);
const gchar *       gtranslator_msg_get_extracted_comments
                                                        (GtranslatorMsg *msg);
const gchar *       gtranslator_msg_get_filename        (GtranslatorMsg *msg,
                                                         gint i);
gint *              gtranslator_msg_get_file_line       (GtranslatorMsg *msg,
                                                         gint i);
const gchar *       gtranslator_msg_get_msgctxt         (GtranslatorMsg *msg);
const gchar *       gtranslator_msg_get_format          (GtranslatorMsg *msg);
gchar *             gtranslator_msg_check               (GtranslatorMsg *msg);

Description

Details

GtranslatorMsgPrivate

typedef struct _GtranslatorMsgPrivate GtranslatorMsgPrivate;


GtranslatorMsg

typedef struct {
	GObject parent_instance;
} GtranslatorMsg;


enum GtranslatorMsgStatus

typedef enum
{
	GTR_MSG_STATUS_UNTRANSLATED,
	GTR_MSG_STATUS_FUZZY,
	GTR_MSG_STATUS_TRANSLATED
} GtranslatorMsgStatus;


gtranslator_msg_register_type ()

GType               gtranslator_msg_register_type       (GTypeModule *module);

module :

Returns :


gtranslator_msg_new ()

GtranslatorMsg *    gtranslator_msg_new                 (po_message_iterator_t iter,
                                                         po_message_t message);

Creates a new GtranslatorMsg.

iter :

message :

Returns :

a new GtranslatorMsg object

gtranslator_msg_get_iterator ()

po_message_iterator_t  gtranslator_msg_get_iterator     (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the message iterator in gettext format

gtranslator_msg_set_iterator ()

void                gtranslator_msg_set_iterator        (GtranslatorMsg *msg,
                                                         po_message_iterator_t iter);

Sets the iterator into the GtranslatorMsg class.

msg :

a GtranslatorMsg

iter :


gtranslator_msg_get_message ()

po_message_t        gtranslator_msg_get_message         (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the message in gettext format

gtranslator_msg_set_message ()

void                gtranslator_msg_set_message         (GtranslatorMsg *msg,
                                                         po_message_t message);

Sets the message into the GtranslatorMsg class.

msg :

a GtranslatorMsg

message :

the po_message_t to set into the msg

gtranslator_msg_get_row_reference ()

GtkTreeRowReference * gtranslator_msg_get_row_reference (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the GtkTreeRowReference corresponding to the message's place in the message table

gtranslator_msg_set_row_reference ()

void                gtranslator_msg_set_row_reference   (GtranslatorMsg *msg,
                                                         GtkTreeRowReference *row_reference);

Sets the GtkTreeRowReference from the messages table for the given message

msg :

a GtranslatorMsg

row_reference :


gtranslator_msg_is_translated ()

gboolean            gtranslator_msg_is_translated       (GtranslatorMsg *msg);

msg :

Returns :


gtranslator_msg_is_fuzzy ()

gboolean            gtranslator_msg_is_fuzzy            (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

TRUE if the message is fuzzy

gtranslator_msg_set_fuzzy ()

void                gtranslator_msg_set_fuzzy           (GtranslatorMsg *msg,
                                                         gboolean fuzzy);

Change the fuzzy mark of a message.

msg :

a GtranslatorMsg

fuzzy :

the fuzzy value to set to the message

gtranslator_msg_set_status ()

void                gtranslator_msg_set_status          (GtranslatorMsg *msg,
                                                         GtranslatorMsgStatus status);

Sets the status for a message.

msg :

a GtranslatorMsg

status :

a GtranslatorMsgStatus

gtranslator_msg_get_status ()

GtranslatorMsgStatus  gtranslator_msg_get_status        (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the message's status.

gtranslator_msg_get_msgid ()

const gchar *       gtranslator_msg_get_msgid           (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the msgid (untranslated English string) of a message.

gtranslator_msg_get_msgid_plural ()

const gchar *       gtranslator_msg_get_msgid_plural    (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the msgid_plural (untranslated English plural string) of a message, or NULL for a message without plural.

gtranslator_msg_get_msgstr ()

const gchar *       gtranslator_msg_get_msgstr          (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the msgstr (translation) of a message. Return the empty string for an untranslated message.

gtranslator_msg_set_msgstr ()

void                gtranslator_msg_set_msgstr          (GtranslatorMsg *msg,
                                                         const gchar *msgstr);

Change the msgstr (translation) of a message. Use an empty string to denote an untranslated message.

msg :

a GtranslatorMsg

msgstr :

the string to set in the msg

gtranslator_msg_get_msgstr_plural ()

const gchar *       gtranslator_msg_get_msgstr_plural   (GtranslatorMsg *msg,
                                                         gint index);

msg :

a GtranslatorMsg

index :

the index of the plural array

Returns :

the msgstr[index] for a message with plural handling, or NULL when the index is out of range or for a message without plural.

gtranslator_msg_set_msgstr_plural ()

void                gtranslator_msg_set_msgstr_plural   (GtranslatorMsg *msg,
                                                         gint index,
                                                         const gchar *msgstr);

Change the msgstr[index] for a message with plural handling. Use a NULL value at the end to reduce the number of plural forms.

msg :

a GtranslatorMsg

index :

the index where to set the msgstr

msgstr :

the message to set in the msg

gtranslator_msg_get_comment ()

const gchar *       gtranslator_msg_get_comment         (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the comments for a message.

gtranslator_msg_set_comment ()

void                gtranslator_msg_set_comment         (GtranslatorMsg *msg,
                                                         const gchar *comment);

Change the comments for a message. comments should be a multiline string, ending in a newline, or empty.

msg :

a GtranslatorMsg

comment :

the comment to set for a message

gtranslator_msg_get_po_position ()

gint                gtranslator_msg_get_po_position     (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the position of the message. Gets the position of this message in the PO file in relation to the other messages.

gtranslator_msg_set_po_position ()

void                gtranslator_msg_set_po_position     (GtranslatorMsg *msg,
                                                         gint po_position);

Sets the numerical position of this message in relation to other messages.

msg :

a GtranslatorMsg

po_position :

the numerical position of the message.

gtranslator_msg_get_extracted_comments ()

const gchar *       gtranslator_msg_get_extracted_comments
                                                        (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the extracted comments for a message.

gtranslator_msg_get_filename ()

const gchar *       gtranslator_msg_get_filename        (GtranslatorMsg *msg,
                                                         gint i);

msg :

a GtranslatorMsg

i :

the i-th file for a message.

Returns :

the i-th filename for a message, or NULL if i is out of range.

gtranslator_msg_get_file_line ()

gint *              gtranslator_msg_get_file_line       (GtranslatorMsg *msg,
                                                         gint i);

msg :

a GtranslatorMsg

i :

the i-th file for a message.

Returns :

the i-th file line for a message, or NULL if i is out of range.

gtranslator_msg_get_msgctxt ()

const gchar *       gtranslator_msg_get_msgctxt         (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the context of a message, or NULL for a message not restricted to a context.

gtranslator_msg_get_format ()

const gchar *       gtranslator_msg_get_format          (GtranslatorMsg *msg);

Return the pretty name associated with a format type. For example, for "csharp-format", return "C#". Return NULL if the are no format type in the message.

msg :

a GtranslatorMsg

Returns :

the pretty name associated with a format type or NULL if the message hasn't any format type.

gtranslator_msg_check ()

gchar *             gtranslator_msg_check               (GtranslatorMsg *msg);

msg :

a GtranslatorMsg

Returns :

the message error or NULL if there is not any error. Must be freed with g_free. Test whether the message translation is a valid format string if the message is marked as being a format string.