gettext v0.16.1 Gettext.PO.Translation View Source

A struct that holds information on a translation.

This struct describes a translation that has no plural form, such as the one in the following snippet of .po file:

msgid "Hello world!"
msgstr "Ciao mondo!"

Translations with a plural form are not represented as Gettext.PO.Translation structs, but as Gettext.PO.PluralTranslation structs.

This struct contains the following fields:

  • msgid - the id of the translation.
  • msgstr - the translated string.
  • comments - a list of comments as they are found in the PO file (for example, ["# foo"]).
  • extracted_comments - a list of extracted comments (for example, ["#. foo", "#. bar"]).
  • references - a list of references (files this translation comes from) in the form {file, line}.
  • flags - a set of flags for this translation.
  • po_source_line - the line this translation is on in the PO file where it comes from.

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %Gettext.PO.Translation{
  comments: [binary()],
  extracted_comments: [binary()],
  flags: MapSet.t(),
  msgid: [binary()],
  msgstr: [binary()],
  po_source_line: pos_integer(),
  references: [{binary(), pos_integer()}]
}