Tiny doc update
Tiny doc update
This commit is contained in:
parent
011e79e676
commit
82f1c744dc
@ -1,3 +1,6 @@
|
|||||||
|
//! CAI-Watchdog is a lightweigth watchdog for *nix and Windows
|
||||||
|
//! Author: Alexander I. Chebykin (CAI) <alex.chebykin@gmail.com>
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate ini;
|
extern crate ini;
|
||||||
extern crate exitcode;
|
extern crate exitcode;
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
//! CAI-Watchdog filesystem module
|
||||||
|
//! Author: Alexander I. Chebykin (CAI) <alex.chebykin@gmail.com>
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
//! CAI-Watchdog localization module
|
||||||
|
//! Author: Alexander I. Chebykin (CAI) <alex.chebykin@gmail.com>
|
||||||
|
//!
|
||||||
|
//! External localizations stored in /locales/ directory
|
||||||
|
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
@ -162,6 +167,18 @@ impl Locale {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return object with locale data
|
||||||
|
///
|
||||||
|
/// If there is no localization file for current system locale, fallback (English) locale will be returned
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// let locale = mod_locales::Locale::new();
|
||||||
|
///
|
||||||
|
/// println!("\u{26a0} {}! {}.", locale.t().error, locale.t().cant_find_config_file);
|
||||||
|
/// println!("{}", locale.t().exiting);
|
||||||
|
/// ```
|
||||||
pub fn t(&self) -> &Lang {
|
pub fn t(&self) -> &Lang {
|
||||||
return self.locale.borrow().clone();
|
return self.locale.borrow().clone();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user