use gettext.install() in CommandLineInterface (addresses #34)
* remove "from gettext import gettext as _" * add call to gettext.install() in CommandLineInterface
This commit is contained in:
		
							parent
							
								
									45b2865e8e
								
							
						
					
					
						commit
						0ac89c5f7b
					
				
					 2 changed files with 2 additions and 3 deletions
				
			
		|  | @ -28,11 +28,12 @@ __all__ = ["client", "sysuser", "domain", "record"] | |||
| from logging import getLogger | ||||
| from sys import exit | ||||
| from argparse import ArgumentParser | ||||
| from gettext import gettext as _ | ||||
| import gettext | ||||
| 
 | ||||
| 
 | ||||
| class CommandLineInterface(object): | ||||
|     def __init__(self, config, args): | ||||
|         gettext.install('gnuviechadmin') | ||||
|         self.log = getLogger(__name__) | ||||
|         self.config = config | ||||
|         parser = ArgumentParser(prog=args[0]) | ||||
|  |  | |||
|  | @ -20,7 +20,6 @@ | |||
| # Version: $Id$ | ||||
| import CliCommand | ||||
| import sys | ||||
| from gettext import gettext as _ | ||||
| 
 | ||||
| 
 | ||||
| class ClientCli(CliCommand.CliCommand): | ||||
|  | @ -95,7 +94,6 @@ class ClientCli(CliCommand.CliCommand): | |||
|                 if self.args.verbose: | ||||
|                     print unicode(myclient).encode('utf8') | ||||
|             except CreationFailedError, cfe: | ||||
|                 self._usage() | ||||
|                 print cfe | ||||
|                 sys.exit(2) | ||||
|         elif self.args.subcommand == "list": | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue