Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) Safe-mode: OFF (not secure) /usr/share/doc/python-babel-0.9.6/doc/ drwxr-xr-x |
Viewing file: Select action/file-type: Distutils/Setuptools IntegrationBabel provides commands for integration into setup.py scripts, based on either the distutils package that is part of the Python standard library, or the third-party setuptools package. These commands are available by default when Babel has been properly installed, and setup.py is using setuptools. For projects that use plain old distutils, the commands need to be registered explicitly, for example: Contents 1 compile_catalogThe compile_catalog command is similar to the GNU msgfmt tool, in that it takes a message catalog from a PO file and compiles it to a binary MO file. If the command has been correctly installed or registered, a project's setup.py script should allow you to use the command: $ ./setup.py compile_catalog --help Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'compile_catalog' command: ... Running the command will produce a binary MO file: $ ./setup.py compile_catalog --directory foobar/locale --locale pt_BR running compile_catalog compiling catalog to foobar/locale/pt_BR/LC_MESSAGES/messages.mo 1.1 OptionsThe compile_catalog command accepts the following options:
If directory is specified, but output-file is not, the default filename of the output file will be: <directory>/<locale>/LC_MESSAGES/<domain>.mo If neither the input_file nor the locale option is set, this command looks for all catalog files in the base directory that match the given domain, and compiles each of them to MO files in the same directory. These options can either be specified on the command-line, or in the setup.cfg file. 2 extract_messagesThe extract_messages command is comparable to the GNU xgettext program: it can extract localizable messages from a variety of difference source files, and generate a PO (portable object) template file from the collected messages. If the command has been correctly installed or registered, a project's setup.py script should allow you to use the command: $ ./setup.py extract_messages --help Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'extract_messages' command: ... Running the command will produce a PO template file: $ ./setup.py extract_messages --output-file foobar/locale/messages.pot running extract_messages extracting messages from foobar/__init__.py extracting messages from foobar/core.py ... writing PO template file to foobar/locale/messages.pot 2.1 Method MappingThe mapping of file patterns to extraction methods (and options) can be specified using a configuration file that is pointed to using the --mapping-file option shown above. Alternatively, you can configure the mapping directly in setup.py using a keyword argument to the setup() function: 2.2 OptionsThe extract_messages command accepts the following options:
These options can either be specified on the command-line, or in the setup.cfg file. In the latter case, the options above become entries of the section [extract_messages], and the option names are changed to use underscore characters instead of dashes, for example: This would be equivalent to invoking the command from the command-line as follows: $ setup.py extract_messages -k _ -k gettext -k ngettext -F mapping.cfg -w 80 Any path names are interpreted relative to the location of the setup.py file. For boolean options, use "true" or "false" values. 3 init_catalogThe init_catalog command is basically equivalent to the GNU msginit program: it creates a new translation catalog based on a PO template file (POT). If the command has been correctly installed or registered, a project's setup.py script should allow you to use the command: $ ./setup.py init_catalog --help Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'init_catalog' command: ... Running the command will produce a PO file: $ ./setup.py init_catalog -l fr -i foobar/locales/messages.pot \ -o foobar/locales/fr/messages.po running init_catalog creating catalog 'foobar/locales/fr/messages.po' based on 'foobar/locales/messages.pot' 3.1 OptionsThe init_catalog command accepts the following options:
If output-dir is specified, but output-file is not, the default filename of the output file will be: <output_dir>/<locale>/LC_MESSAGES/<domain>.po These options can either be specified on the command-line, or in the setup.cfg file. 4 update_catalogThe update_catalog command is basically equivalent to the GNU msgmerge program: it updates an existing translations catalog based on a PO template file (POT). If the command has been correctly installed or registered, a project's setup.py script should allow you to use the command: $ ./setup.py update_catalog --help Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'update_catalog' command: ... Running the command will update a PO file: $ ./setup.py update_catalog -l fr -i foobar/locales/messages.pot \ -o foobar/locales/fr/messages.po running update_catalog updating catalog 'foobar/locales/fr/messages.po' based on 'foobar/locales/messages.pot' 4.1 OptionsThe update_catalog command accepts the following options:
If output-dir is specified, but output-file is not, the default filename of the output file will be: <output_dir>/<locale>/LC_MESSAGES/<domain>.po If neither the input_file nor the locale option is set, this command looks for all catalog files in the base directory that match the given domain, and updates each of them. These options can either be specified on the command-line, or in the setup.cfg file. |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0041 ]-- |