## GtrPo GtrPo |

## Functions

GQuark | gtr_po_error_quark ()
GType | gtr_po_register_type ()
GtrPo * | gtr_po_new ()
void | gtr_po_parse ()
void | gtr_po_save_header_in_msg ()
void | gtr_po_save_file ()
GtrPoState | gtr_po_get_state ()
void | gtr_po_set_state ()
GFile * | gtr_po_get_location ()
void | gtr_po_set_location ()
gboolean | gtr_po_get_write_perms ()
GList * | gtr_po_get_messages ()
void | gtr_po_set_messages ()
GList * | gtr_po_get_current_message ()
void | gtr_po_update_current_message ()
GList * | gtr_po_get_domains ()
po_file_t | gtr_po_get_po_file ()
GList * | gtr_po_get_next_fuzzy ()
GList * | gtr_po_get_prev_fuzzy ()
GList * | gtr_po_get_next_untrans ()
GList * | gtr_po_get_prev_untrans ()
GList * | gtr_po_get_next_fuzzy_or_untrans ()
GList * | gtr_po_get_prev_fuzzy_or_untrans ()
GList * | gtr_po_get_msg_from_number ()
GtrHeader * | gtr_po_get_header ()
gint | gtr_po_get_translated_count ()
gint | gtr_po_get_fuzzy_count ()
gint | gtr_po_get_untranslated_count ()
gint | gtr_po_get_messages_count ()
gint | gtr_po_get_message_position ()
gchar * | gtr_po_check_po_file ()

## Types and Values

#define | GTR_PO_ERROR
enum | GtrPoState

## Description

## Functions

### gtr_po_error_quark ()

    GQuark
    gtr_po_error_quark (void);

#### Returns

### gtr_po_register_type ()

    GType
    gtr_po_register_type (GTypeModule *module);

#### Returns

### gtr_po_new ()

    GtrPo *
    gtr_po_new (void);

Creates a new GtrPo.

#### Returns

a new GtrPo object

### gtr_po_parse ()

    void
    gtr_po_parse (GtrPo *po,
                  GFile *location,
                  GError **error);

Parses all things related to the GtrPo and initilizes all neccessary variables.

#### Parameters

po | a GtrPo |
location | the file to open |
error | a variable to store the errors |

### gtr_po_save_header_in_msg ()

    void
    gtr_po_save_header_in_msg (GtrPo *po,
                               GtrHeader *header);

### gtr_po_save_file ()

    void
    gtr_po_save_file (GtrPo *po,
                      GError **error);

It saves the po file and if there are any problem it stores the error in `error` .

#### Parameters

po | a GtrPo |
error | a GError to manage the exceptions |

### gtr_po_get_state ()

    GtrPoState
    gtr_po_get_state (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the GtrPoState value of the `po` .

### gtr_po_set_state ()

    void
    gtr_po_set_state (GtrPo *po,
                      GtrPoState state);

Sets the state for a GtrPo

#### Parameters

po | a GtrPo |
state | a GtrPoState |

### gtr_po_get_location ()

    GFile *
    gtr_po_get_location (GtrPo *po);

Gets the GFile of the po file.

#### Parameters

po | a GtrPo |

#### Returns

the GFile associated with the `po` . The returned location must be freed with g_object_unref.

[transfer full]

### gtr_po_set_location ()

    void
    gtr_po_set_location (GtrPo *po,
                         GFile *location);

Sets the GFile location within the GtrPo object.

#### Parameters

po | a GtrPo |
location | The GFile to set to the GtrPo |

### gtr_po_get_write_perms ()

    gboolean
    gtr_po_get_write_perms (GtrPo *po);

#### Returns

### gtr_po_get_messages ()

    GList *
    gtr_po_get_messages (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the messages list.

[transfer container][element-type Gtranslator.Msg]

### gtr_po_set_messages ()

    void
    gtr_po_set_messages (GtrPo *po,
                         GList *messages);

Sets an updated list of messages.

#### Parameters

po | a GtrPo |
messages | a pointer to a new messages list. | [element-type Gtranslator.Msg]

### gtr_po_get_current_message ()

    GList *
    gtr_po_get_current_message (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the current message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_update_current_message ()

    void
    gtr_po_update_current_message (GtrPo *po,
                                   GtrMsg *msg);

Sets the new current message to the message that is passed in the argument.

#### Parameters

po | a GtrPo |
msg | the message where should point the current message. |

### gtr_po_get_domains ()

    GList *
    gtr_po_get_domains (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the domains list.

[transfer none][element-type utf8]

### gtr_po_get_po_file ()

    po_file_t
    gtr_po_get_po_file (GtrPo *po);

Gets the gettext file.

#### Parameters

po | a GtrPo |

#### Returns

the gettext file

### gtr_po_get_next_fuzzy ()

    GList *
    gtr_po_get_next_fuzzy (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the next fuzzy message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_prev_fuzzy ()

    GList *
    gtr_po_get_prev_fuzzy (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the previously fuzzy message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_next_untrans ()

    GList *
    gtr_po_get_next_untrans (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the next untranslated message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_prev_untrans ()

    GList *
    gtr_po_get_prev_untrans (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the previously untranslated message or NULL if there are not previously untranslated message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_next_fuzzy_or_untrans ()

    GList *
    gtr_po_get_next_fuzzy_or_untrans (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the next fuzzy or untranslated message or NULL if there is not next fuzzy or untranslated message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_prev_fuzzy_or_untrans ()

    GList *
    gtr_po_get_prev_fuzzy_or_untrans (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

a pointer to the previously fuzzy or untranslated message or NULL if there is not previously fuzzy or untranslated message.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_msg_from_number ()

    GList *
    gtr_po_get_msg_from_number (GtrPo *po,
                                gint number);

Gets the message at the given position.

#### Parameters

po | a GtrPo |
number | the message to jump |

#### Returns

the message at the given position.

[transfer none][element-type Gtranslator.Msg]

### gtr_po_get_header ()

    GtrHeader *
    gtr_po_get_header (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

The GtrHeader of the `po` .

[transfer none]

### gtr_po_get_translated_count ()

    gint
    gtr_po_get_translated_count (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the count of the translated messages.

### gtr_po_get_fuzzy_count ()

    gint
    gtr_po_get_fuzzy_count (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the count of the fuzzy messages.

### gtr_po_get_untranslated_count ()

    gint
    gtr_po_get_untranslated_count (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the count of the untranslated messages.

### gtr_po_get_messages_count ()

    gint
    gtr_po_get_messages_count (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the number of messages messages.

### gtr_po_get_message_position ()

    gint
    gtr_po_get_message_position (GtrPo *po);

#### Parameters

po | a GtrPo |

#### Returns

the number of the current message.

### gtr_po_check_po_file ()

    gchar *
    gtr_po_check_po_file (GtrPo *po);

Test whether an entire PO file is valid, like msgfmt does it.

#### Parameters

po | a GtrPo |

#### Returns

If it is invalid, returns the error. The return value must be freed with g_free.

## Types and Values

### GTR_PO_ERROR

    #define GTR_PO_ERROR gtr_po_error_quark()

### enum GtrPoState

#### Members

GTR_PO_STATE_SAVED |  |
GTR_PO_STATE_MODIFIED |  |