Changeset 4346

Show
Ignore:
Timestamp:
03/08/09 21:12:58 (4 years ago)
Author:
gpolo
Message:

Added -L as noop so this can be used directly as a fallback by potmanager when xgettext doesn't exist. main accepts receiving a different argv now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/utils/i18n/pygettext.py

    r4280 r4346  
    152152        should not have their docstrings extracted.  This is only useful in 
    153153        conjunction with the -D option above. 
     154 
     155    -L language 
     156    --language=language 
     157        No op, always assume Python as the language. 
    154158 
    155159If `inputfile' is -, standard input is read. 
     
    502506 
    503507 
    504   
    505 def main(): 
     508def main(argv=sys.argv[1:]): 
    506509    global default_keywords 
    507510    try: 
    508511        opts, args = getopt.getopt( 
    509             sys.argv[1:], 
    510             'ad:DEhk:Kno:p:S:Vvw:x:X:', 
     512            argv, 
     513            'ad:DEhk:Kno:p:S:Vvw:x:X:L:', 
    511514            ['extract-all', 'default-domain=', 'escape', 'help', 
    512515             'keyword=', 'no-default-keywords', 
    513516             'add-location', 'no-location', 'output=', 'output-dir=', 
    514517             'style=', 'verbose', 'version', 'width=', 'exclude-file=', 
    515              'docstrings', 'no-docstrings', 
     518             'docstrings', 'no-docstrings', 'language=' 
    516519             ]) 
    517520    except getopt.error, msg: 
     
    660663            fp.close() 
    661664 
    662   
    663665if __name__ == '__main__': 
    664666    main()