Struct i18n_config::GettextConfig [−][src]
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].
Implementations
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]
fn clone(&self) -> GettextConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug 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
[src]
impl Send for GettextConfig
[src]
impl Sync for GettextConfig
[src]
impl Unpin for GettextConfig
[src]
impl UnwindSafe for GettextConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,