![]() |
![]() |
![]() |
GTranslator Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
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);
typedef enum { GTR_MSG_STATUS_UNTRANSLATED, GTR_MSG_STATUS_FUZZY, GTR_MSG_STATUS_TRANSLATED } GtranslatorMsgStatus;
GType gtranslator_msg_register_type (GTypeModule *module);
|
|
Returns : |
GtranslatorMsg * gtranslator_msg_new (po_message_iterator_t iter, po_message_t message);
Creates a new GtranslatorMsg.
|
|
|
|
Returns : |
a new GtranslatorMsg object |
po_message_iterator_t gtranslator_msg_get_iterator (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the message iterator in gettext format |
void gtranslator_msg_set_iterator (GtranslatorMsg *msg, po_message_iterator_t iter);
Sets the iterator into the GtranslatorMsg class.
|
a GtranslatorMsg |
|
po_message_t gtranslator_msg_get_message (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the message in gettext format |
void gtranslator_msg_set_message (GtranslatorMsg *msg, po_message_t message);
Sets the message into the GtranslatorMsg class.
|
a GtranslatorMsg |
|
the po_message_t to set into the msg
|
GtkTreeRowReference * gtranslator_msg_get_row_reference (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the GtkTreeRowReference corresponding to the message's place in the message table |
void gtranslator_msg_set_row_reference (GtranslatorMsg *msg, GtkTreeRowReference *row_reference);
Sets the GtkTreeRowReference from the messages table for the given message
|
a GtranslatorMsg |
|
gboolean gtranslator_msg_is_translated (GtranslatorMsg *msg);
|
|
Returns : |
gboolean gtranslator_msg_is_fuzzy (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
TRUE if the message is fuzzy |
void gtranslator_msg_set_fuzzy (GtranslatorMsg *msg, gboolean fuzzy);
Change the fuzzy mark of a message.
|
a GtranslatorMsg |
|
the fuzzy value to set to the message |
void gtranslator_msg_set_status (GtranslatorMsg *msg, GtranslatorMsgStatus status);
Sets the status for a message.
|
a GtranslatorMsg |
|
a GtranslatorMsgStatus |
GtranslatorMsgStatus gtranslator_msg_get_status (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the message's status. |
const gchar * gtranslator_msg_get_msgid (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the msgid (untranslated English string) of a message. |
const gchar * gtranslator_msg_get_msgid_plural (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the msgid_plural (untranslated English plural string) of a message, or NULL for a message without plural. |
const gchar * gtranslator_msg_get_msgstr (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the msgstr (translation) of a message. Return the empty string for an untranslated message. |
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.
|
a GtranslatorMsg |
|
the string to set in the msg
|
const gchar * gtranslator_msg_get_msgstr_plural (GtranslatorMsg *msg, gint index);
|
a GtranslatorMsg |
|
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. |
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.
|
a GtranslatorMsg |
|
the index where to set the msgstr |
|
the message to set in the msg |
const gchar * gtranslator_msg_get_comment (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the comments for a message. |
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.
|
a GtranslatorMsg |
|
the comment to set for a message |
gint gtranslator_msg_get_po_position (GtranslatorMsg *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. |
void gtranslator_msg_set_po_position (GtranslatorMsg *msg, gint po_position);
Sets the numerical position of this message in relation to other messages.
|
a GtranslatorMsg |
|
the numerical position of the message. |
const gchar * gtranslator_msg_get_extracted_comments (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the extracted comments for a message. |
const gchar * gtranslator_msg_get_filename (GtranslatorMsg *msg, gint i);
|
a GtranslatorMsg |
|
the i-th file for a message. |
Returns : |
the i-th filename for a message, or NULL if i is out
of range.
|
gint * gtranslator_msg_get_file_line (GtranslatorMsg *msg, gint i);
|
a GtranslatorMsg |
|
the i-th file for a message. |
Returns : |
the i-th file line for a message, or NULL if i is out
of range.
|
const gchar * gtranslator_msg_get_msgctxt (GtranslatorMsg *msg);
|
a GtranslatorMsg |
Returns : |
the context of a message, or NULL for a message not restricted to a context. |
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.
|
a GtranslatorMsg |
Returns : |
the pretty name associated with a format type or NULL if the message hasn't any format type. |
gchar * gtranslator_msg_check (GtranslatorMsg *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. |