poio (version 0.0-4)

po: Create an object of class po

Description

Creates an object of class po, for storing package translations.

Usage

po(source_type, file_type, initial_comments, metadata, direct, countable)

Arguments

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 tibble of file metadata with columns "name" and "value".

direct

A tibble of messages with a direct translation, as created by stop, warning, message or gettext; its columns are described below.

countable

A data frame of messages where the translation depends upon a countable value, as created by ngettext; its columns are described below.

Value

An R6 object of class po.

References

Much of the logic for this function was determined from reading http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html