Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27929

argparse localization support

Date 2012-08-26 17:06 +0200
Subject argparse localization support
From Kwpolska <kwpolska@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3839.1345993606.4697.python-list@python.org> (permalink)

Show all headers | View raw


I am using argparse in my project.  I want to localize it, but it
seems to be impossible to change some things.  See this, for example:

usage: trash [-h] [-V] [-e] [-l] [-r] [-v] [-w] [PLIK [PLIK ...]]

Trashman — menedżer śmietnika XDG w Pythonie.

positional arguments:
  PLIK                  pliki do wyrzucenia

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit

(a snippet of help for Trashman, a Python trash manager, with
LANG='pl_PL.UTF-8'; https://github.com/Kwpolska/trashman )

Anyways, you can see that -h and -V (added semi-automatically by
argparse), “usage:” and “positional/optional arguments:” are still in
English.  It doesn’t look very professional.  Also, I want to use
fancy UTF-8 characters.  Is there a way to fix that?
-- 
Kwpolska <http://kwpolska.tk>
stop html mail      | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

argparse localization support Kwpolska <kwpolska@gmail.com> - 2012-08-26 17:06 +0200

csiph-web