#! /usr/bin/python
# -*- coding: iso-8859-1 -*-
# Originally written by Barry Warsaw <barry@zope.com>
#
# Minimally patched to make it even more xgettext compatible
# by Peter Funk <pf@artcom-gmbh.de>
#
# 2002-11-22 Jürgen Hermann <jh@web.de>
# Added checks that _() only contains string literals, and
# command line args are resolved to module lists, i.e. you
# can now pass a filename, a module or package name, or a
# directory (including globbing chars, important for Win32).
# Made docstring fit in 80 chars wide displays using pydoc.
#
# 2010-06-12 Jan-Hendrik Göllner <jan-hendrik.goellner@gmx.de>
# Made it plural sensitive, added ngettext as default keyword.
# Any keyworded function that is being supplied > 2 arguments
# is treated like ngettext.
# Also added support for constructs like "_('foo' + 10*'bar')"
# by evaluating the whole expression.
# Code like _(foo(arg1, arg2) + "bar") does not work by design
# as that expression must be evaluated at runtime and this script
# only extracts static strings known before runtime.
# However it is possible to do things like
# "ngettext('World', 'Worlds', numWorlds)"
# as only the first two arguments are evaluated.
# Advanced version number from 1.5 to 1.6
#
|