From dc3f3ec100f275e5a802e59fd160f75cd262845f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 15 Apr 2024 16:51:32 +0200 Subject: i18n: Use Error:/Warning:/Notice: instead of E:/W:/N: This allows these bits to be localized, improving user experience for users in different languages. --- apt-pkg/contrib/error.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index e3cdb7566..3bd253dba 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -34,6 +34,7 @@ #include #include +#include /*}}}*/ // Global Error Object /*{{{*/ @@ -283,19 +284,23 @@ APT_HIDDEN std::ostream &operator<<(std::ostream &out, GlobalError::Item i) { case GlobalError::FATAL: case GlobalError::ERROR: - out << 'E'; + // TRANSLATOR: This is a warning level displayed before the message + out << (out_ver < 30 ? "E:" : _("Error:")); break; case GlobalError::WARNING: - out << 'W'; + // TRANSLATOR: This is a warning level displayed before the message + out << (out_ver < 30 ? "W:" : _("Warning:")); break; case GlobalError::NOTICE: - out << 'N'; + // TRANSLATOR: This is a warning level displayed before the message + out << (out_ver < 30 ? "N:" : _("Notice:")); break; case GlobalError::DEBUG: - out << 'D'; + // TRANSLATOR: This is a warning level displayed before the message + out << _("Debug:"); break; } - out << ": "; + out << " "; if (use_color) { -- cgit v1.2.3-70-g09d2