--- a/rust/libnewsboat/src/fslock.rs +++ b/rust/libnewsboat/src/fslock.rs @@ -1,5 +1,4 @@ use crate::logger::{self, Level}; -use gettextrs::gettext; use std::fs::{self, File, OpenOptions}; use std::io::{Error, Read, Write}; use std::os::unix::fs::OpenOptionsExt; @@ -54,10 +53,10 @@ Ok(file) => file, Err(reason) => { return Err(fmt!( - &gettext("Failed to open lock file '%s': %s"), + "Failed to open lock file '%s': %s", new_lock_path .to_str() - .unwrap_or(&gettext("")), + .unwrap_or(""), reason.to_string() )) } @@ -74,10 +73,10 @@ if let Err(reason) = file.set_len(0).and_then(|_| file.write_all(pid.as_bytes())) { log!(Level::Debug, "FsLock: Failed to write PID"); return Err(fmt!( - &gettext("Failed to write PID to lock file '%s': %s"), + "Failed to write PID to lock file '%s': %s", new_lock_path .to_str() - .unwrap_or(&gettext("")), + .unwrap_or(""), reason.to_string() )); } @@ -106,10 +105,10 @@ pid ); Err(fmt!( - &gettext("Failed to lock '%s', already locked by process with PID %s"), + "Failed to lock '%s', already locked by process with PID %s", new_lock_path .to_str() - .unwrap_or(&gettext("")), + .unwrap_or(""), &(*pid).to_string() )) }