Commit Graph

6 Commits

Author SHA1 Message Date
Barry Warsaw c8f0892d12 Changes submitted by Peter Funk (some fixes/additions by B.Warsaw) to
make pygettext more compatible with GNU xgettext, specifically:

Added -E/--escape for allowing pass-thru of iso8859-1 characters above
7 bits.

Added -o/--output option for renaming the output file from
messages.pot (there's overlap with -d/--default-domain, but GNU
xgettext has them both).

Added -p/--output-dir for specifying the output directory for
messages.pot.

Added -V/--version for printing the version number.

Added -w/--width for specifying the output page width (this is because
now pygettext, like GNU xgettext will put several locations on the
same line to cut down on vertical space).

Added -x/--exclude-file for specifying a list of strings that are not
to be extracted from the input files.

Bumped version number to 1.0

Try to import fintl and use fintl.gettext as _ if available.  Fall
back is to use identity definition of _().

Moved the escape creation to a function make_escapes() so that its
behavior can be controlled by the -E option.

__openseen(): Support the -x option.

write(): Support -w option and vertical space preserving feature.

main(): Support new options.
2000-02-26 20:56:47 +00:00
Barry Warsaw 8f35681843 Added \" to escapes so embedded escaped double quotes are handled
correctly.  Patch suggested by Mads Kiilerich <mk@solit.dk>.
1999-12-06 02:46:49 +00:00
Barry Warsaw 5dbf526e8e Several improvements, some of where were contributed by Bernhard
Herzog <herzog@online.de>.  Specifically,

--verbose/-v flag added

pot_header added to make msgmerge and Emacs po-mode work better

normalize(), escape(), safe_eval(): Improved normalization of strings
for more .po file compatibility (e.g. C style).  Handles emmbedded
newlines better.

Also added an identity function called _() and use it in the file
where messages are printed.  This allows us to selftest pygettext.py
with itself as input.
1999-11-03 18:47:52 +00:00
Barry Warsaw a507c32991 Python equivalent of xgettext(1). This was originally released
separately but now is included in the standard Python distribution.
1999-11-03 16:46:05 +00:00
Barry Warsaw e27db5a393 Initial implementation 1999-08-13 20:59:48 +00:00
Barry Warsaw af5725104b Initial revision 1999-08-11 21:40:38 +00:00