termux-packages/packages/newsboat/rust-libnewsboat-src-filter...

47 lines
2.2 KiB
Diff

diff -uNr newsboat-2.22/rust/libnewsboat/src/filterparser.rs newsboat-2.22.mod/rust/libnewsboat/src/filterparser.rs
--- newsboat-2.22/rust/libnewsboat/src/filterparser.rs 2020-12-21 21:56:47.000000000 +0200
+++ newsboat-2.22.mod/rust/libnewsboat/src/filterparser.rs 2021-01-07 16:15:19.150160249 +0200
@@ -1,6 +1,5 @@
//! Parses filter expressions.
-use gettextrs::gettext;
use nom::{
branch::alt,
bytes::complete::{escaped, is_not, tag, take, take_while, take_while1},
@@ -60,9 +59,9 @@
/// indicating the thing thah was expected.
fn translate_expected(expected: Expected) -> String {
match expected {
- Expected::AttributeName => gettext("attribute name"),
- Expected::Operators => gettext("one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#"),
- Expected::Value => gettext("one of: quoted string, range, number"),
+ Expected::AttributeName => "attribute name".to_string(),
+ Expected::Operators => "one of: =~, ==, =, !~, !=, <=, >=, <, >, between, #, !#".to_string(),
+ Expected::Value => "one of: quoted string, range, number".to_string(),
}
}
@@ -353,19 +352,19 @@
let err = match error {
Error::TrailingCharacters(pos, tail) => fmt!(
// The "%{}" thing is a number, a zero-based offset into a string.
- &gettext("Parse error: trailing characters after position %{}: %s"),
+ "Parse error: trailing characters after position %{}: %s",
PRIu64,
pos as u64,
tail
),
Error::AtPos(pos, expected) => fmt!(
// The "%{}" thing is a number, a zero-based offset into a string.
- &gettext("Parse error at position %{}: expected %s"),
+ "Parse error at position %{}: expected %s",
PRIu64,
pos as u64,
&translate_expected(expected)
),
- Error::Internal => fmt!(&gettext("Internal parse error")),
+ Error::Internal => fmt!("Internal parse error"),
};
Err(err)
}