Browse Source

look into the right textdomain for apt-utils again

Broken in e7e10e4747 by looking always
into "apt" while we ship some tools in "apt-utils"…
tags/debian/1.3_exp2
David Kalnischkies 5 years ago
parent
commit
570ec96dbf
14 changed files with 26 additions and 25 deletions
  1. +2
    -0
      apt-private/private-cmndline.cc
  2. +20
    -2
      apt-private/private-main.cc
  3. +4
    -1
      apt-private/private-main.h
  4. +0
    -2
      cmdline/apt-cache.cc
  5. +0
    -2
      cmdline/apt-cdrom.cc
  6. +0
    -2
      cmdline/apt-config.cc
  7. +0
    -2
      cmdline/apt-extracttemplates.cc
  8. +0
    -2
      cmdline/apt-get.cc
  9. +0
    -2
      cmdline/apt-helper.cc
  10. +0
    -2
      cmdline/apt-internal-solver.cc
  11. +0
    -2
      cmdline/apt-mark.cc
  12. +0
    -2
      cmdline/apt-sortpkgs.cc
  13. +0
    -2
      cmdline/apt.cc
  14. +0
    -2
      ftparchive/apt-ftparchive.cc

+ 2
- 0
apt-private/private-cmndline.cc View File

@@ -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();


+ 20
- 2
apt-private/private-main.cc View File

@@ -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() /*{{{*/
{


+ 4
- 1
apt-private/private-main.h View File

@@ -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[]);


+ 0
- 2
cmdline/apt-cache.cc View File

@@ -1142,8 +1142,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_CACHE, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);


+ 0
- 2
cmdline/apt-cdrom.cc View File

@@ -225,8 +225,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_CDROM, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);


+ 0
- 2
cmdline/apt-config.cc View File

@@ -97,8 +97,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_CONFIG, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);


+ 0
- 2
cmdline/apt-extracttemplates.cc View File

@@ -339,8 +339,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc, const char **argv) /*{{{*/
{
InitLocale();

CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_EXTRACTTEMPLATES, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);



+ 0
- 2
cmdline/apt-get.cc View File

@@ -432,8 +432,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_GET, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);


+ 0
- 2
cmdline/apt-helper.cc View File

@@ -199,8 +199,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_HELPER, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);



+ 0
- 2
cmdline/apt-internal-solver.cc View File

@@ -65,8 +65,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

// we really don't need anything
DropPrivileges();



+ 0
- 2
cmdline/apt-mark.cc View File

@@ -316,8 +316,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_MARK, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);



+ 0
- 2
cmdline/apt-sortpkgs.cc View File

@@ -152,8 +152,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
InitLocale();

CommandLine CmdL;
ParseCommandLine(CmdL, APT_CMD::APT_SORTPKG, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);



+ 0
- 2
cmdline/apt.cc View File

@@ -97,8 +97,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc, const char *argv[]) /*{{{*/
{
InitLocale();

CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);



+ 0
- 2
ftparchive/apt-ftparchive.cc View File

@@ -1044,8 +1044,6 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
/*}}}*/
int main(int argc, const char *argv[]) /*{{{*/
{
InitLocale();

// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_FTPARCHIVE, &_config, NULL, argc, argv, ShowHelp, &GetCommands);


Loading…
Cancel
Save