https://github.com/devjiwonchoi/po2mo
po to mo, it's simple.
https://github.com/devjiwonchoi/po2mo
cli gettext gnu i18n internationalization l10n localization mo po translate
Last synced: 4 months ago
JSON representation
po to mo, it's simple.
- Host: GitHub
- URL: https://github.com/devjiwonchoi/po2mo
- Owner: devjiwonchoi
- License: mit
- Created: 2023-07-07T05:14:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T02:40:44.000Z (10 months ago)
- Last Synced: 2024-10-11T12:05:40.272Z (7 months ago)
- Topics: cli, gettext, gnu, i18n, internationalization, l10n, localization, mo, po, translate
- Language: TypeScript
- Homepage: https://npmjs.com/po2mo
- Size: 98.7 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# po2mo
[:kr: Korean Docs](./docs/korean/README.md)
> Using v1? Try stable v2. See [Migration Guide](./docs/migration-guide.md) for details.
## Installation
Supports installation via standalone scripts and Node.js package managers.
See [Installation](./docs/installation.md) for details.
## Default Behavior
By default, `po2mo` **will convert any created, modified, or staged .po files found in the local Git repository**.
You can change the current working directory with the [`--cwd`](#current-working-directory---cwd) option.
```sh
Usage: po2mo [options]Options:
specify input path
-v, --version output the version number
-h, --help output usage information
-o, --output specify output path
-r, --recursive convert po files recursively
--config specify config file path
--cwd specify current working directory
```## Providing Input (``)
See [Providing Input](./docs/providing-input.md) for details.
## Providing Output (`--output`)
See [Providing Output](./docs/providing-output.md) for details.
## Current Working Directory (`--cwd`)
Sometimes you need to specify the current working directory. Send it!
## Configuration (`--config`)
We recommend you to be config-free, but most of the time there are edge cases where you need a work-around.
`po2mo` supports configuration for multiple tasks by providing the path to config file named `po2mo.json` with the option `--config`.
Each objects inside the `tasks` array are equal to a single conversion task, which takes the three values: `input`, `output`, `recursive`.
### `po2mo.json`
```json
{
"tasks": [
{
"input": "./locale/a.po"
},
{
"input": "./locale",
"output": "./output"
},
{
"input": "./locale",
"output": "./output",
"recursive": true
}
]
}
```