summaryrefslogtreecommitdiffstats
path: root/Tools/i18n/pygettext.py
Commit message (Collapse)AuthorAgeFilesLines
* Added an unused Unicode string for testing.Barry Warsaw2000-05-021-0/+2
|
* A bunch of changes, primarily to command line argument parsingBarry Warsaw2000-03-081-64/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (inspired by Detlef Lannert). Specifically, -k/--keyword no longer takes an optional argument to clear the default keywords. Instead, use -K/--no-default-keywords to clear them. -n/--add-location also no longer takes an optional argument to set the comment style. Instead, use -S/--style to set the comment style to GNU or Solaris. -o/--output can take `-' as the filename, meaning write to standard output. The inputfile name can also be `-' meaning read from standard in. A few other changes include Kludge to mark the file docstring as translatable. Since the marking is to place _() around the docstring, and because we actually have to define the _() function before we use it, this means that we have to manually assign to __doc__ the output of _(). This doesn't seem too bad because you'll only use this idiom when translating a script's docstring (you really don't need to translate most module docstrings). Convert everything to string methods and do not import the string module. Bump the version number to 1.1
* Two buglet fixes. Peter Funk caught the bug in make_escapes:Barry Warsaw2000-02-271-7/+9
| | | | | | | This will fold all ISO 8859 chars from the upper half of the charset into the lower half, which is ...ummm.... unintened. The second is a typo in the reference to options.escape in main().
* Changes submitted by Peter Funk (some fixes/additions by B.Warsaw) toBarry Warsaw2000-02-261-40/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added \" to escapes so embedded escaped double quotes are handledBarry Warsaw1999-12-061-0/+1
| | | | correctly. Patch suggested by Mads Kiilerich <mk@solit.dk>.
* Several improvements, some of where were contributed by BernhardBarry Warsaw1999-11-031-44/+86
| | | | | | | | | | | | | | | | 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.
* Python equivalent of xgettext(1). This was originally releasedBarry Warsaw1999-11-031-0/+1
| | | | separately but now is included in the standard Python distribution.
* Initial implementationBarry Warsaw1999-08-131-0/+268
|
* Initial revisionBarry Warsaw1999-08-111-0/+1