Linux command
msginit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create PO file from POT
msginit -i [messages.pot] -o [de.po] -l [de_DE]
Create with specific locale
msginit --input=[template.pot] --locale=[fr_FR.UTF-8]
Create without translator info
msginit -i [messages.pot] -o [es.po] -l [es] --no-translator
Specify output directory
msginit -i [messages.pot] -l [ja] -o [locale/ja/messages.po]
说明
msginit creates a new PO (Portable Object) file from a POT (PO Template) file. It initializes the PO file with proper headers for the specified locale. This is typically the first step when starting a new translation.
参数
- -i, --input _file_
- Input POT file.
- -o, --output-file _file_
- Output PO file.
- -l, --locale _locale_
- Target locale.
- --no-translator
- Don't prompt for translator info.
- --no-wrap
- Don't wrap long lines.
- -w _NUMBER_
- Set output page width (default: 79).
- --properties-output
- Write a Java ResourceBundle in .properties format.
FAQ
What is the msginit command used for?
msginit creates a new PO (Portable Object) file from a POT (PO Template) file. It initializes the PO file with proper headers for the specified locale. This is typically the first step when starting a new translation.
How do I run a basic msginit example?
Run `msginit -i [messages.pot] -o [de.po] -l [de_DE]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i, --input _file_ do in msginit?
Input POT file.