[][src]Struct i18n_config::GettextConfig

pub struct GettextConfig {
    pub output_dir: PathBuf,
    pub extract_to_parent: bool,
    pub collate_extracted_subcrates: bool,
    pub copyright_holder: Option<String>,
    pub msgid_bugs_address: Option<String>,
    pub xtr: Option<bool>,
    // some fields omitted
}

The data structure representing what is stored (and possible to store) within the gettext subsection of a i18n.toml file.

Fields

output_dir: PathBuf

Path to the output directory, relative to i18n.toml of the crate being localized.

extract_to_parent: boolcollate_extracted_subcrates: boolcopyright_holder: Option<String>

Set the copyright holder for the generated files.

msgid_bugs_address: Option<String>

The reporting address for msgid bugs. This is the email address or URL to which the translators shall report bugs in the untranslated strings.

xtr: Option<bool>

Whether or not to perform string extraction using the xtr command.

Methods

impl GettextConfig[src]

pub fn pot_dir(&self) -> PathBuf[src]

Path to where the pot files will be written to by the xtr command, and were they will be read from by msginit and msgmerge.

By default this is output_dir/pot.

pub fn po_dir(&self) -> PathBuf[src]

Path to where the po files will be stored/edited with the msgmerge and msginit commands, and where they will be read from with the msgfmt command.

By default this is output_dir/po.

pub fn mo_dir(&self) -> PathBuf[src]

Path to where the mo files will be written to by the msgfmt command.

By default this is output_dir/mo.

Trait Implementations

impl Debug for GettextConfig[src]

impl<'de> Deserialize<'de> for GettextConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.