Linux command
pygettext3.4 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Extract translatable strings
pygettext3.4 [file.py]
Output to specific file
pygettext3.4 -o [messages.pot] [file.py]
Extract from directory
pygettext3.4 -d [domain] [*.py]
说明
pygettext3.4 is the Python 3.4 version of pygettext, which extracts translatable strings from Python source files and generates POT (Portable Object Template) files for internationalization. It scans for strings wrapped in _(), gettext(), and similar marker functions. This version-specific binary targets Python 3.4 code. For current development, use the latest pygettext or the more feature-rich xgettext and Babel alternatives.
参数
- -o _FILE_
- Output file.
- -d _DOMAIN_
- Text domain.
- -k _KEYWORD_
- Additional keyword.
FAQ
What is the pygettext3.4 command used for?
pygettext3.4 is the Python 3.4 version of pygettext, which extracts translatable strings from Python source files and generates POT (Portable Object Template) files for internationalization. It scans for strings wrapped in _(), gettext(), and similar marker functions. This version-specific binary targets Python 3.4 code. For current development, use the latest pygettext or the more feature-rich xgettext and Babel alternatives.
How do I run a basic pygettext3.4 example?
Run `pygettext3.4 [file.py]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _FILE_ do in pygettext3.4?
Output file.