diff --git a/ftl/core/search.ftl b/ftl/core/search.ftl index 1869741bc..fcae80877 100644 --- a/ftl/core/search.ftl +++ b/ftl/core/search.ftl @@ -17,7 +17,7 @@ search-invalid-argument = `{ $term }` was given an invalid argument '`{ $argumen search-invalid-flag = `flag:` must be followed by a valid flag number: `1` (red), `2` (orange), `3` (green), `4` (blue) or `0` (no flag). search-invalid-followed-by-positive-days = `{ $term }` must be followed by a positive number of days. search-invalid-rated-days = `rated:` must be followed by a positive number of days. -search-invalid-rated-ease = `rated:{ $val }:` must be followed by `1` (again), `2` (hard), `3` (good) or `4` (easy). +search-invalid-rated-ease = `{ $val }:` must be followed by `1` (again), `2` (hard), `3` (good) or `4` (easy). search-invalid-prop-operator = `prop:{ $val }` must be followed by one of the comparison operators: `=`, `!=`, `<`, `>`, `<=` or `>=`. search-invalid-prop-float = `prop:{ $val }` must be followed by a decimal number. search-invalid-prop-integer = `prop:{ $val }` must be followed by a whole number. diff --git a/rslib/src/search/parser.rs b/rslib/src/search/parser.rs index e547f319b..99e25bcd1 100644 --- a/rslib/src/search/parser.rs +++ b/rslib/src/search/parser.rs @@ -423,7 +423,7 @@ fn parse_prop(s: &str) -> ParseResult { } else { return Err(parse_failure( s, - FailKind::InvalidPropInteger(format!("{}{}", prop, operator)), + FailKind::InvalidRatedEase(format!("prop:{}{}{}", prop, operator, days.to_string())), )); } } else { @@ -498,13 +498,13 @@ fn parse_rated(s: &str) -> ParseResult { } else { return Err(parse_failure( s, - FailKind::InvalidRatedEase(days.to_string()), + FailKind::InvalidRatedEase(format!("rated:{}", days.to_string())), )); } } else { return Err(parse_failure( s, - FailKind::InvalidRatedEase(days.to_string()), + FailKind::InvalidRatedEase(format!("rated:{}", days.to_string())), )); } } else {