Struct i18n_config::GettextConfig [−][src]
pub struct GettextConfig { pub target_languages: Vec<String>, 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>, pub add_location: GettextAddLocation, pub use_fuzzy: 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
target_languages: Vec<String>
The languages that the software will be translated into.
output_dir: PathBuf
Path to the output directory, relative to i18n.toml
of the
crate being localized.
extract_to_parent: bool
collate_extracted_subcrates: bool
copyright_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.
add_location: GettextAddLocation
Generate ‘#: filename:line’ lines (default) in the pot files when
running the xtr
command. If the type is ‘full’ (the default),
it generates the lines with both file name and line number.
If it is ‘file’, the line number part is omitted. If it is ‘never’,
nothing is generated. [possible values: full, file, never].
use_fuzzy: bool
Enable the --use-fuzzy
option for the msgfmt
command.
By default this is false.
Implementations
impl GettextConfig
[src]
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 Clone for GettextConfig
[src]
impl Clone for GettextConfig
[src]fn clone(&self) -> GettextConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for GettextConfig
[src]
impl<'de> Deserialize<'de> for GettextConfig
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for GettextConfig
impl RefUnwindSafe for GettextConfig
impl Send for GettextConfig
impl Send for GettextConfig
impl Sync for GettextConfig
impl Sync for GettextConfig
impl Unpin for GettextConfig
impl Unpin for GettextConfig
impl UnwindSafe for GettextConfig
impl UnwindSafe for GettextConfig
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]