Simplify the code and improve messages

- Use conditions rather than ternary operator, which is hard to read
  with multiple conditions.
- Do not concatenat translated message, use format string instead.

Signed-off-by: Michal Čihař <michal@cihar.com>