ki18n 1.2.0

A crate to use KF5I18n from rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use lazy_static::lazy_static;
use std::sync::Mutex;

lazy_static! {
    pub static ref TEST_MUTEX: Mutex<()> = Mutex::new(());
}

/// There can only be one thread running at the time with a QQuickEngine
/// (in principle, everything should be in the same main thread)
pub fn lock_for_test() -> std::sync::MutexGuard<'static, ()> {
    TEST_MUTEX.lock().unwrap_or_else(|e| e.into_inner())
}