An open API service indexing awesome lists of open source software.

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.

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
}
]
}
```