mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
removed i18n.get
This commit is contained in:
parent
9e22ae01a0
commit
4a71698048
@ -233,28 +233,6 @@ pub struct LocalizationGuard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl LocalizationGuard {
|
impl LocalizationGuard {
|
||||||
/// !!!DEPRECATED!!!
|
|
||||||
///
|
|
||||||
/// Get a localized text from the given key
|
|
||||||
///
|
|
||||||
/// First lookup is done in the active language, second in
|
|
||||||
/// the fallback (if present).
|
|
||||||
/// If the key is not present in the localization object
|
|
||||||
/// then the key itself is returned.
|
|
||||||
///
|
|
||||||
/// # NOTE:
|
|
||||||
/// This function shouldn't be used in new code.
|
|
||||||
/// It is kept for compatibility with old code that uses
|
|
||||||
/// old style dot-separated keys and this function internally
|
|
||||||
/// replaces them with dashes.
|
|
||||||
// FIXME (i18n old style keys):
|
|
||||||
// this is deprecated, fix all usages of this asap
|
|
||||||
pub fn get(&self, key: &str) -> Cow<str> {
|
|
||||||
// Fluent uses `-` as informal separator, while in the past with our
|
|
||||||
// RON based system we used `.` for that purpose.
|
|
||||||
self.get_msg(&key.replace('.', "-"))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a localized text from the given key
|
/// Get a localized text from the given key
|
||||||
///
|
///
|
||||||
/// First lookup is done in the active language, second in
|
/// First lookup is done in the active language, second in
|
||||||
|
Loading…
Reference in New Issue
Block a user