summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-04-15 16:51:32 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2024-04-19 20:49:05 +0200
commitdc3f3ec100f275e5a802e59fd160f75cd262845f (patch)
treed692ea61ee8c300abb59fe1e00b868aa1ff4dbac
parent4d54b35e7a0c073b293d26d075714bef17080d48 (diff)
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.
-rw-r--r--apt-pkg/contrib/error.cc15
1 files changed, 10 insertions, 5 deletions
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 <string>
#include <unistd.h>
+#include <apti18n.h>
/*}}}*/
// 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)
{