i18n: Use gettext function instead of wrapper
No need to deviate from the default here. Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/170>
This commit is contained in:
parent
695693cf74
commit
f8cc9f5f84
16 changed files with 83 additions and 274 deletions
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
use crate::deps::*;
|
||||
use crate::file_model::LpFileModel;
|
||||
use crate::i18n::*;
|
||||
use crate::util::gettext::*;
|
||||
use crate::util::{Direction, Position};
|
||||
use crate::widgets::{LpImage, LpImagePage, LpSlidingView};
|
||||
|
||||
|
|
@ -555,7 +555,7 @@ impl LpImageView {
|
|||
let background = self
|
||||
.current_path()
|
||||
.and_then(|p| std::fs::File::open(p).ok())
|
||||
.context(i18n("Failed to open new background image"))?;
|
||||
.context(gettext("Failed to open new background image"))?;
|
||||
let native = self.native().expect("View should have a GtkNative");
|
||||
let id = WindowIdentifier::from_native(&native).await;
|
||||
|
||||
|
|
@ -572,14 +572,14 @@ impl LpImageView {
|
|||
Ok(_) => self
|
||||
.activate_action(
|
||||
"win.show-toast",
|
||||
Some(&(i18n("Set as background."), 1).to_variant()),
|
||||
Some(&(gettext("Set as background."), 1).to_variant()),
|
||||
)
|
||||
.unwrap(),
|
||||
Err(err) => {
|
||||
if !matches!(err, Error::Response(ResponseError::Cancelled)) {
|
||||
self.activate_action(
|
||||
"win.show-toast",
|
||||
Some(&(i18n("Could not set background."), 1).to_variant()),
|
||||
Some(&(gettext("Could not set background."), 1).to_variant()),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue