package gettext
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=08dd9df55b2af1838e2312be4be942b4375dbc18c2aed0ca1924488750e34f5d
sha512=4a09eab6d6f0d6ec435ca3d70305e2f97cbcc04bea72f85efcf649a0ead2faa322a0b054eb953b719f6dea98fb08de32fc80b4cf967681465c5a51e335aaf8d4
doc/gettext.extension/GettextCompile/index.html
Module GettextCompile
Source
Functions for extraction/compilation/installation of PO/MO file.
val extract :
string ->
string ->
string Stdlib__Map.Make(String).t ->
String.t list ->
string ->
unit
extract cmd default_option file_options src_files ppf : extract the translatable strings from all the src_files provided. Each source file will be extracted using the command cmd, which should be an executable that has the same output as ocaml-xgettext. If cmd is not provided, it will be searched in the current path. The command will be called with default_option, or if the file being extracted is mapped in file_options, with the option associated to the filename in file_options. The result will be written using module Format to the formatter ppf. The result of the extraction should be used as a po template file.
compile input_po output_mo : create a binary representation of the PO file provided as input_pot. The output file is output_mo.
val install :
bool ->
string ->
string ->
GettextCategory.category ->
string ->
FilePath.filename ->
unit
install destdir language category textdomain fln : copy the given filename ( should be a MO file ) to the filename defined by all the other parameters ( typically destdir/language/category/textdomain.mo ).
uninstall orgdir language category textdomain : remove the MO file defined by all the other parameters ( typically destdir/language/category/textdomain.mo ).
merge fln_pot fln_po_lst backup_ext : use fln_pot as a POT file and merge the current content of the listed PO file ( fln_po_lst ) with it. Backup all the PO file using the provided backup extension backup_ext and produce a merged PO file in place.