Module GettextPo


module GettextPo: sig .. end
Author(s): Sylvain Le Gall

val empty_po : GettextTypes.po_content
empty_po : value representing an empty PO
val add_po_translation_no_domain : GettextTypes.po_content ->
GettextTypes.po_location list * GettextTypes.po_translation ->
GettextTypes.po_content
add_po_translation_no_domain po (comment_lst,location_lst,translation) : add a translation to a corpus of already defined translation with no domain defined. If the translation already exist, they are merged concerning location, and follow these rules for the translation itself :
val add_po_translation_domain : GettextTypes.MapTextdomain.key ->
GettextTypes.po_content ->
GettextTypes.po_location list * GettextTypes.po_translation ->
GettextTypes.po_content
add_po_translation_domain po domain (comment_lst,location_lst,translation) : add a translation to the already defined translation with the domain defined. See add_translation_no_domain for details.
val merge_po : GettextTypes.po_content -> GettextTypes.po_content -> GettextTypes.po_content
merge_po po1 po2 : merge two PO. The rule for merging are the same as defined in add_po_translation_no_domain. Can raise PoInconsistentMerge
val merge_pot : GettextTypes.po_content -> GettextTypes.po_content -> GettextTypes.po_content
merge_pot po pot : merge a PO with a POT. Only consider strings that exists in the pot. Always use location as defined in the POT. If a string is not found, use the translation provided in the POT. If a plural is found and a singular should be used, downgrade the plural to singular. If a singular is found and a plural should be used, upgrade singular to plural, using the strings provided in the POT for ending the translation.
val input_po : Pervasives.in_channel -> GettextTypes.po_content
val output_po : Pervasives.out_channel -> GettextTypes.po_content -> unit
val translation_of_po_translation : GettextTypes.po_translation -> GettextTypes.translation