argparse localization support

Kwpolska kwpolska at gmail.com
Sun Aug 26 11:06:44 EDT 2012


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



More information about the Python-list mailing list