30 Dec 2008 08:49:56 UTC
- Distribution: Locale-Maketext-Lexicon
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (752 / 1 / 0)
- KwaliteeBus factor: 1
- License: mit
- Perl: v5.5.0
- Activity24 month
- Download (108.09KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
xgettext.pl - Extract translatable strings from source
xgettext.pl [OPTION] [INPUTFILE]...
This program extracts translatable strings from given input files, or from STDIN if none are given.
Please see Locale::Maketext::Extract for a list of supported input file formats.
Mandatory arguments to long options are mandatory for short options too. Similarly for optional arguments.
Files to extract messages from. If not specified, STDIN is assumed.
- -f, --files-from=FILE
Get list of input files from FILE.
- -D, --directory=DIRECTORY
Add DIRECTORY to list for input files search.
- -u, --use-gettext-style
Specifies that the source programs uses the Gettext style (e.g.
%1) instead of the Maketext style (e.g.
[_1]) in its localization calls.
- -d, --default-domain=NAME
Use NAME.po for output, instead of
- -o, --output=FILE
PO file name to be written or incrementally updated;
-means writing to STDOUT.
- -p, --output-dir=DIR
Output files will be placed in directory DIR.
- -g, --gnu-gettext
Enables GNU gettext interoperability by printing
#, perl-maketext-formatbefore each entry that has
- -W, --wrap
If wrap is enabled, then, for entries with multiple file locations, each location is listed on a separate line. The default is to put them all on a single line.
Other comments are not affected.
By default, all builtin parser plugins are enabled for all file types, with warnings turned off.
If any plugin is specified on the command line, then warnings are turned on by default - you can turn them off with
- -P|--plugin pluginname
Use the specified plugin for the default file types recognised by that plugin.
- -P|--plugin 'pluginname=*'
Use the specified plugin for all file types.
- -P|--plugin pluginname=ext,ext2
Use the specified plugin for any files ending in C<.ext> or C<.ext2>
- -P|--plugin My::Module::Name='*'
Use your custom plugin module for all file types
Multiple plugins can be specified on the command line.
For a slightly more accurate but much slower Perl parser, you can use the PPI plugin. This does not have a short name, but must be specified in full, eg:
xgettext.pl -P Locale::Maketext::Extract::Plugin::PPI
If a parser plugin encounters a syntax error while parsing, it will abort parsing and hand over to the next parser plugin. If warnings are turned on then the error will be echoed to STDERR.
Off by default, unless any plugin has been specified on the command line.
If you would like to see which files have been processed, which plugins were used, and which strings were extracted, then enable
verbose. If no acceptable plugin was found, or no strings were extracted, then the file is not listed:
Lists processed files.
- -v -v|--verbose --verbose :
Lists processed files and which plugins managed to extract strings.
- -v -v|--verbose --verbose :
Lists processed files, which plugins managed to extract strings, and the extracted strings, the line where they were found, and any variables.
Audrey Tang <email@example.com>
Copyright 2002-2008 by Audrey Tang <firstname.lastname@example.org>.
This software is released under the MIT license cited below.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Module Install Instructions
To install Locale::Maketext::Lexicon, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Locale::Maketext::Lexicon
For more information on module installation, please visit the detailed CPAN module installation guide.