![]() |
![]() |
![]() |
GTranslator Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct GtrMsg; struct GtrMsgClass; enum GtrMsgStatus; gboolean gtr_msg_is_translated (GtrMsg *msg
); gboolean gtr_msg_is_fuzzy (GtrMsg *msg
); void gtr_msg_set_fuzzy (GtrMsg *msg
,gboolean fuzzy
); void gtr_msg_set_status (GtrMsg *msg
,GtrMsgStatus status
); GtrMsgStatus gtr_msg_get_status (GtrMsg *msg
); const gchar * gtr_msg_get_msgid (GtrMsg *msg
); const gchar * gtr_msg_get_msgid_plural (GtrMsg *msg
); const gchar * gtr_msg_get_msgstr (GtrMsg *msg
); void gtr_msg_set_msgstr (GtrMsg *msg
,const gchar *msgstr
); const gchar * gtr_msg_get_msgstr_plural (GtrMsg *msg
,gint index
); void gtr_msg_set_msgstr_plural (GtrMsg *msg
,gint index
,const gchar *msgstr
); const gchar * gtr_msg_get_comment (GtrMsg *msg
); void gtr_msg_set_comment (GtrMsg *msg
,const gchar *comment
); gint gtr_msg_get_po_position (GtrMsg *msg
); void gtr_msg_set_po_position (GtrMsg *msg
,gint po_position
); const gchar * gtr_msg_get_extracted_comments (GtrMsg *msg
); const gchar * gtr_msg_get_filename (GtrMsg *msg
,gint i
); gint * gtr_msg_get_file_line (GtrMsg *msg
,gint i
); const gchar * gtr_msg_get_msgctxt (GtrMsg *msg
); const gchar * gtr_msg_get_format (GtrMsg *msg
); gchar * gtr_msg_check (GtrMsg *msg
); GtrMsgPrivate;
typedef enum { GTR_MSG_STATUS_UNTRANSLATED, GTR_MSG_STATUS_FUZZY, GTR_MSG_STATUS_TRANSLATED } GtrMsgStatus;
gboolean gtr_msg_is_translated (GtrMsg *msg
);
Gets whether or not the message is translated. See that a fuzzy message is also counted as translated so it must be checked first that the message is fuzzy.
|
a GtrMsg |
Returns : |
TRUE if the message is translated |
gboolean gtr_msg_is_fuzzy (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
TRUE if the message is fuzzy |
void gtr_msg_set_fuzzy (GtrMsg *msg
,gboolean fuzzy
);
Change the fuzzy mark of a message.
|
a GtrMsg |
|
the fuzzy value to set to the message |
void gtr_msg_set_status (GtrMsg *msg
,GtrMsgStatus status
);
Sets the status for a message.
|
a GtrMsg |
|
a GtrMsgStatus |
GtrMsgStatus gtr_msg_get_status (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the message's status. |
const gchar * gtr_msg_get_msgid (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the msgid (untranslated English string) of a message. |
const gchar * gtr_msg_get_msgid_plural (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the msgid_plural (untranslated English plural string) of a message, or NULL for a message without plural. [transfer none] |
const gchar * gtr_msg_get_msgstr (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the msgstr (translation) of a message. Return the empty string for an untranslated message. [transfer none] |
void gtr_msg_set_msgstr (GtrMsg *msg
,const gchar *msgstr
);
Change the msgstr (translation) of a message. Use an empty string to denote an untranslated message.
|
a GtrMsg |
|
the string to set in the msg
|
const gchar * gtr_msg_get_msgstr_plural (GtrMsg *msg
,gint index
);
|
a GtrMsg |
|
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. [transfer none] |
void gtr_msg_set_msgstr_plural (GtrMsg *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 GtrMsg |
|
the index where to set the msgstr |
|
the message to set in the msg |
const gchar * gtr_msg_get_comment (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
(transfer none) the comments for a message. |
void gtr_msg_set_comment (GtrMsg *msg
,const gchar *comment
);
Change the comments for a message. comments should be a multiline string, ending in a newline, or empty.
|
a GtrMsg |
|
the comment to set for a message |
gint gtr_msg_get_po_position (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the position of the message. Gets the position of this message in the PO file in relation to the other messages. |
void gtr_msg_set_po_position (GtrMsg *msg
,gint po_position
);
Sets the numerical position of this message in relation to other messages.
|
a GtrMsg |
|
the numerical position of the message. |
const gchar * gtr_msg_get_extracted_comments (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the extracted comments for a message. [transfer none] |
const gchar * gtr_msg_get_filename (GtrMsg *msg
,gint i
);
|
a GtrMsg |
|
the i-th file for a message. |
Returns : |
the i-th filename for a message, or NULL if
i is out of range. [transfer none]
|
gint * gtr_msg_get_file_line (GtrMsg *msg
,gint i
);
|
a GtrMsg |
|
the i-th file for a message. |
Returns : |
the i-th file line for a message, or NULL if
i is out of range. [transfer none]
|
const gchar * gtr_msg_get_msgctxt (GtrMsg *msg
);
|
a GtrMsg |
Returns : |
the context of a message, or NULL for a message not restricted to a context. [transfer none] |
const gchar * gtr_msg_get_format (GtrMsg *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 GtrMsg |
Returns : |
the pretty name associated with a format type or NULL if the message hasn't any format type. [transfer none] |
gchar * gtr_msg_check (GtrMsg *msg
);
Test whether the message translation is a valid format string if the message is marked as being a format string.
|
a GtrMsg |
Returns : |
the message error or NULL if there is not any error. Must be freed with g_free. [transfer full] |