Description Usage Arguments Value Note References
Creates an object of class po
, for storing package translations.
1 | po(source_type, file_type, initial_comments, metadata, direct, countable)
|
source_type |
Either "r" or "c", depending upon whether the messages originated from R-level code, or C-level code. |
file_type |
Either "po" or "pot", depending upon whether the messages originated from a PO (language-specific) or POT (master translation) file. |
initial_comments |
A character vector of comments added by the translator. |
metadata |
A |
direct |
A |
countable |
A data frame of messages where the translation depends upon
a countable value, as created by |
An R6
object of class po
.
#' The direct
element of the po
object has the following columns.
Character. The untranslated (should be American English) message.
Character. The translated message, or empty strings in the case of POT files.
Logical. Is the message obsolete?
List of character. Disambiguating context information to allow multiple messages with the same ID.
List of character. Comments added by the translator, typically to explain unclear messages, or why translation choices were made.
List of character. Links to where the message occured in the source, in the form "filename:line".
List of character. Typically used to describe formatting directives. R uses C-style formatting, which would imply a "c-format" flag. For example string. "fuzzy" flags can appear when PO files are merged.
List of character. When PO files are merged with an updated POT file ,and a fuzzy flag is generated, the old msgid is stored in a previous string comment.
The countable
element of the po
object takes the same form as
the direct
element, with two differences.
Character. The plural form of the untranslated message.
This is now a list of character (rather than character.)
The direct
and countable
elements also have a read-only column
named msgkey
that acts as a key for the message. It is generated with
digest
and algo = "xxhash32"
on the msgid
and msgctxt
fields.
Much of the logic for this function was determined from reading http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.