module GettextTypes: sig
.. end
Types and exception of ocaml-gettext.
Author(s): Sylvain Le Gall
type
range = Int32.t * Int32.t
type
textdomain = string
type
locale = string
type
dir = string
type
filename = string
type
codeset = string
exception CompileProblemReadingFile of filename * string
Filename wich generates the error message str
of filename * string * int
While extracting filename the command str returns exit code i.
of filename * string * int
While extracting filename the command receive signal i.
exception DomainFileDoesntExist of filename list
Cannot the filename corresponding to a textdomain among the specified files.
exception FormatInconsistent of string * string
The two strings returned doesn't have the same meaning regarding Printf
syntax.
exception GettextUninitialized
A part of the code try to translate a string, but ocaml-gettext is not
initialized.
exception MoInvalidOptions of Lexing.lexbuf * string
There is an invalid field in the content information of a MO file.
exception MoInvalidPlurals of Lexing.lexbuf * string
The plural-form field is not correct.
exception MoInvalidContentType of Lexing.lexbuf * string
The content-type field is not correct.
exception MoInvalidTranslationSingular of string * int
A plural translation of a singular string has occured.
exception MoInvalidTranslationPlural of string list * int
An out-of-bound plural translation has occured.
exception MoJunk of string * string list
There is more plural translation than the number of plural forms.
exception MoEmptyEntry
exception MoInvalidFile
A MO corrupted file has been read.
The MO file specified a negative number of strings.
of range * range
Offset of the string table is out of bound.
of range * range
Offset of the translation table is out of bound.
of range * range
String and translation table overlap.
exception MoInvalidStringOutOfBound of int * int
The offset and length of a string entry leads to an access beyond the end
of the MO file.
exception MoInvalidTranslationOutOfBound of int * int
The offset and length of a translation entry leads to an access beyond the end
of the MO file.
exception MoCannotOpenFile of string
An error occured when trying to open a MO file.
exception PoInvalidFile of string * Lexing.lexbuf * Pervasives.in_channel
A PO file cannot be parsed.
exception PoFileInvalidIndex of string * int
When parsing a PO file, found an out of order table indices in a plural
form.
exception PoFileDoesntExist of string
The PO file doesn't exist.
exception PoInconsistentMerge of string * string
Cannot merge two PO files.
exception TranslateStringNotFound of string
A string to translate cannot be found.
exception LocalePosixUnparseable of string
Cannot parse the POSIX representation of the locale.
type
dependencies = (textdomain * codeset option *
dir option)
list
module type INIT_TYPE = sig
.. end
module MapString: Map.Make
(
String
)
module SetString: Set.Make
(
String
)
module MapTextdomain: Map.Make
(
sig
end
)
type
failsafe =
| |
Ignore |
| |
InformStderr of (exn -> string) |
| |
RaiseException |
Defines behavior regarding exception in the ocaml-gettext library
type
t = {
}
Data structure handling initialization variable of ocaml-gettext
type
t' = bool ->
textdomain option ->
string -> (string * int) option -> GettextCategory.category -> string
Function to translate effectively a string
type
endianess =
| |
BigEndian |
| |
LittleEndian |
Endianess of a MO file
Specification of .MO file
= {
|
: endianess ; |
|
: int32 ; |
|
: int32 ; |
|
: int32 ; |
|
: int32 ; |
|
: int32 ; |
|
: int32 ; |
}
type
mo_translation = {
|
project_id_version : string option ; |
|
report_msgid_bugs_to : string option ; |
|
pot_creation_date : string option ; |
|
po_revision_date : string option ; |
|
last_translator : string option ; |
|
language_tream : string option ; |
|
mime_version : string option ; |
|
content_type : string option ; |
|
content_transfer_encoding : string option ; |
|
plural_forms : string option ; |
|
content_type_charset : string ; |
|
nplurals : int ; |
|
fun_plural_forms : int -> int ; |
}
Details associated with ""
Project-Id-Version: PACKAGE VERSION\n
Report-Msgid-Bugs-To: \n
POT-Creation-Date: 2004-05-31 16:53+0200\n
PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
Last-Translator: FULL NAME <EMAIL@ADDRESS>\n
Language-Team: LANGUAGE <LL
type
translation =
| |
Singular of string * string |
| |
Plural of string * string * string list |
Base type of MO content : translation of string. The first string members are
the string identifier ( singular form ).
type
po_translation =
| |
PoSingular of string list * string list |
| |
PoPlural of string list * string list * string list list |
Types for the PO processing. The main difference with the type translation
comes from the necessity of keeping a maximum of comment.
type
po_filepos = filename * int
PO string localizator : represents in which file/lineno a string can be
found
type
po_special = string
PO keyword: represents special keyword like fuzzy, wrap, c-format...
= {
}
type
po_translations = po_commented_translation MapString.t
Mapping of PO content using the string identifier as the key.
type
po_content = {
}
Content of a PO file. Since comments should be saved, and that we only save
comments before and in message translation, we need to keep trace of the
last comments, which is not attached to any translation
module type REALIZE_TYPE = sig
.. end
Signature for module handling transformation of initialization parameters
to concrete translation function.