| GTranslator Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
GtranslatorPoPrivate;
GtranslatorPo;
#define GTR_PO_ERROR
enum GtranslatorPoState;
GQuark gtranslator_po_error_quark (void);
GType gtranslator_po_register_type (GTypeModule *module);
GtranslatorPo * gtranslator_po_new (void);
void gtranslator_po_parse (GtranslatorPo *po,
GFile *filename,
GError **error);
void gtranslator_po_save_header_in_msg (GtranslatorPo *po,
GtranslatorHeader *header);
void gtranslator_po_save_file (GtranslatorPo *po,
GError **error);
GtranslatorPoState gtranslator_po_get_state (GtranslatorPo *po);
void gtranslator_po_set_state (GtranslatorPo *po,
GtranslatorPoState state);
GFile * gtranslator_po_get_location (GtranslatorPo *po);
void gtranslator_po_set_location (GtranslatorPo *po,
GFile *location);
gboolean gtranslator_po_get_write_perms (GtranslatorPo *po);
GList * gtranslator_po_get_messages (GtranslatorPo *po);
void gtranslator_po_set_messages (GtranslatorPo *po,
GList *messages);
GList * gtranslator_po_get_current_message (GtranslatorPo *po);
GList * gtranslator_po_get_domains (GtranslatorPo *po);
po_file_t gtranslator_po_get_po_file (GtranslatorPo *po);
GList * gtranslator_po_get_next_fuzzy (GtranslatorPo *po);
GList * gtranslator_po_get_prev_fuzzy (GtranslatorPo *po);
GList * gtranslator_po_get_next_untrans (GtranslatorPo *po);
GList * gtranslator_po_get_prev_untrans (GtranslatorPo *po);
GList * gtranslator_po_get_next_fuzzy_or_untrans
(GtranslatorPo *po);
GList * gtranslator_po_get_prev_fuzzy_or_untrans
(GtranslatorPo *po);
GList * gtranslator_po_get_msg_from_number (GtranslatorPo *po,
gint number);
void gtranslator_po_set_header (GtranslatorPo *po,
GtranslatorHeader *header);
gint gtranslator_po_get_translated_count (GtranslatorPo *po);
gint gtranslator_po_get_fuzzy_count (GtranslatorPo *po);
gint gtranslator_po_get_untranslated_count
(GtranslatorPo *po);
gint gtranslator_po_get_messages_count (GtranslatorPo *po);
gint gtranslator_po_get_message_position (GtranslatorPo *po);
gchar * gtranslator_po_check_po_file (GtranslatorPo *po);
typedef enum
{
GTR_PO_STATE_SAVED,
GTR_PO_STATE_MODIFIED
}GtranslatorPoState;
GType gtranslator_po_register_type (GTypeModule *module);
|
|
Returns : |
GtranslatorPo * gtranslator_po_new (void);
Creates a new GtranslatorPo.
Returns : |
a new GtranslatorPo object |
void gtranslator_po_parse (GtranslatorPo *po, GFile *filename, GError **error);
Parses all things related to the GtranslatorPo and initilizes all neccessary variables.
|
a GtranslatorPo |
|
|
|
a variable to store the errors |
void gtranslator_po_save_header_in_msg (GtranslatorPo *po, GtranslatorHeader *header);
It saves the header's values into the msgstr
|
a GtranslatorPo |
|
void gtranslator_po_save_file (GtranslatorPo *po, GError **error);
It saves the po file and if there are any problem it stores the error
in error.
|
a GtranslatorPo |
|
a GError to manage the exceptions |
GtranslatorPoState gtranslator_po_get_state (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the GtranslatorPoState value of the po.
|
void gtranslator_po_set_state (GtranslatorPo *po, GtranslatorPoState state);
Sets the state for a GtranslatorPo
|
a GtranslatorPo |
|
a GtranslatorPoState |
GFile * gtranslator_po_get_location (GtranslatorPo *po);
|
|
Returns : |
void gtranslator_po_set_location (GtranslatorPo *po, GFile *location);
Sets the GFile location within the GtranslatorPo object.
|
a GtranslatorPo |
|
The GFile to set to the GtranslatorPo |
gboolean gtranslator_po_get_write_perms (GtranslatorPo *po);
|
|
Returns : |
GList * gtranslator_po_get_messages (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the messages list |
void gtranslator_po_set_messages (GtranslatorPo *po, GList *messages);
Sets an updated list of messages.
|
a GtranslatorPo |
|
a pointer to a new messages list. |
GList * gtranslator_po_get_current_message (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the current message |
GList * gtranslator_po_get_domains (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the domains list |
po_file_t gtranslator_po_get_po_file (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the gettext file |
GList * gtranslator_po_get_next_fuzzy (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the next fuzzy message |
GList * gtranslator_po_get_prev_fuzzy (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the previously fuzzy message |
GList * gtranslator_po_get_next_untrans (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the next untranslated message |
GList * gtranslator_po_get_prev_untrans (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the previously untranslated message or NULL if there are not previously untranslated message. |
GList * gtranslator_po_get_next_fuzzy_or_untrans (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the next fuzzy or untranslated message or NULL if there is not next fuzzy or untranslated message. |
GList * gtranslator_po_get_prev_fuzzy_or_untrans (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
a pointer to the previously fuzzy or untranslated message or NULL if there is not previously fuzzy or untranslated message. |
GList * gtranslator_po_get_msg_from_number (GtranslatorPo *po, gint number);
Gets the message at the given position.
|
a GtranslatorPo |
|
the message to jump |
Returns : |
void gtranslator_po_set_header (GtranslatorPo *po, GtranslatorHeader *header);
|
|
|
gint gtranslator_po_get_translated_count (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the count of the translated messages. |
gint gtranslator_po_get_fuzzy_count (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the count of the fuzzy messages. |
gint gtranslator_po_get_untranslated_count (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the count of the untranslated messages. |
gint gtranslator_po_get_messages_count (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the number of messages messages. |
gint gtranslator_po_get_message_position (GtranslatorPo *po);
|
a GtranslatorPo |
Returns : |
the number of the current message. |
gchar * gtranslator_po_check_po_file (GtranslatorPo *po);
Test whether an entire PO file is valid, like msgfmt does it.
|
a GtranslatorPo |
Returns : |
If it is invalid, returns the error. The return value must be freed with g_free. |