diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-05-28 13:53:09 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-05-28 18:12:02 +0200 |
commit | 570ec96dbf4f720d8eff694f8c4429e0b0a033b4 (patch) | |
tree | 8e9ed5f6ba9e09c97a3a74ad855fa6c27d0d1057 /apt-private | |
parent | 8b79c94af7f7cf2e5e5342294bc6e5a908cacabf (diff) | |
download | apt-570ec96dbf4f720d8eff694f8c4429e0b0a033b4.tar.gz |
look into the right textdomain for apt-utils again
Broken in e7e10e47476606e3b2274cf66b1e8ea74b236757 by looking always
into "apt" while we ship some tools in "apt-utils"…
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-cmndline.cc | 2 | ||||
-rw-r--r-- | apt-private/private-main.cc | 22 | ||||
-rw-r--r-- | apt-private/private-main.h | 5 |
3 files changed, 26 insertions, 3 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 829085916..7e50b1401 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -10,6 +10,7 @@ #include <apt-pkg/strutl.h> #include <apt-private/private-cmndline.h> +#include <apt-private/private-main.h> #include <stdarg.h> #include <string.h> @@ -451,6 +452,7 @@ std::vector<CommandLine::Dispatch> ParseCommandLine(CommandLine &CmdL, APT_CMD c Configuration * const * const Cnf, pkgSystem ** const Sys, int const argc, const char *argv[], bool (*ShowHelp)(CommandLine &), std::vector<aptDispatchWithHelp> (*GetCommands)(void)) { + InitLocale(Binary); if (Cnf != NULL && pkgInitConfig(**Cnf) == false) { _error->DumpErrors(); diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc index 0a9f4713f..0075f813f 100644 --- a/apt-private/private-main.cc +++ b/apt-private/private-main.cc @@ -16,11 +16,29 @@ #include <apti18n.h> -void InitLocale() /*{{{*/ +void InitLocale(APT_CMD const binary) /*{{{*/ { std::locale::global(std::locale("")); - textdomain(PACKAGE); + switch(binary) + { + case APT_CMD::APT: + case APT_CMD::APT_CACHE: + case APT_CMD::APT_CDROM: + case APT_CMD::APT_CONFIG: + case APT_CMD::APT_HELPER: + case APT_CMD::APT_GET: + case APT_CMD::APT_MARK: + textdomain("apt"); + break; + case APT_CMD::APT_EXTRACTTEMPLATES: + case APT_CMD::APT_FTPARCHIVE: + case APT_CMD::APT_INTERNAL_SOLVER: + case APT_CMD::APT_SORTPKG: + textdomain("apt-utils"); + break; + } } +void InitLocale() {} /*}}}*/ void InitSignals() /*{{{*/ { diff --git a/apt-private/private-main.h b/apt-private/private-main.h index db6d3e0b7..0d60797ed 100644 --- a/apt-private/private-main.h +++ b/apt-private/private-main.h @@ -1,11 +1,14 @@ #ifndef APT_PRIVATE_MAIN_H #define APT_PRIVATE_MAIN_H +#include <apt-private/private-cmndline.h> + #include <apt-pkg/macros.h> class CommandLine; -APT_PUBLIC void InitLocale(); +void InitLocale(APT_CMD const binary); +APT_PUBLIC APT_DEPRECATED_MSG("Is a no-op now") void InitLocale(); APT_PUBLIC void InitSignals(); APT_PUBLIC void CheckIfSimulateMode(CommandLine &CmdL); APT_PUBLIC void CheckIfCalledByScript(int argc, const char *argv[]); |