https://github.com/intlify/poeditor-service-provider
POEditor service provider for vue-i18n-locale-message
https://github.com/intlify/poeditor-service-provider
l10n localization vue-i18n vue-i18n-locale-message
Last synced: about 8 hours ago
JSON representation
POEditor service provider for vue-i18n-locale-message
- Host: GitHub
- URL: https://github.com/intlify/poeditor-service-provider
- Owner: intlify
- License: mit
- Created: 2019-12-18T05:16:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T03:14:35.000Z (over 2 years ago)
- Last Synced: 2025-04-19T21:48:38.928Z (18 days ago)
- Topics: l10n, localization, vue-i18n, vue-i18n-locale-message
- Language: TypeScript
- Homepage:
- Size: 1.65 MB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# poeditor-service-provider
[](https://www.npmjs.com/package/poeditor-service-provider)
[](https://circleci.com/gh/kazupon/poeditor-service-provider)POEditor service provider for [vue-i18n-locale-message](https://github.com/kazupon/vue-i18n-locale-message)
## :cd: Installation
```bash
$ npm install -g poeditor-service-provider # or npm install --save-dev poeditor-service-provider
```due to use this provider, you need to install vue-i18n-locale-message beforehand.
```bash
$ npm install -g vue-i18n-locale-message
```## :rocket: Usages
### Configurations
Before you use this provider, you need to configure the following:
```json5
{
"provider": {
"id": "12345", // your POEditor project id
"token": "xxx..." // your POEditor API token, if it's ommitted, use the value of `POEDITOR_API_TOKEN` ENV
}
}
```About details, See the [`POEditorProviderConfiguration`](https://github.com/kazupon/poeditor-service-provider/blob/master/types/index.d.ts).
### Push the locale messages to POEditor
```bash
$ vue-i18n-locale-message push --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--target-paths=./src/locales/*.json \
--filename-match=^([\\w]*)\\.json
```### Pull the locale messages from POEditor
```bash
$ vue-i18n-locale-message pull --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--output=./src/locales
```### Indicate translation status from POEditor
```bash
$ vue-i18n-locale-message status --provider=poeditor-service-provider \
--conf=poeditor-service-provider-conf.json
```### Diff locale messages between local and POEditor
```bash
vue-i18n-locale-message diff --provider=poeditor-service-provider \
--conf=poeditor-service-provider-conf.json \
--target-paths=./src/locales/*.json \
--filename-match=^([\\w]*)\\.json
```### Import the locale messages to POEditor
```bash
$ vue-i18n-locale-message import --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--target=./src/locales/ja.json \
--format=json
```### Export the locale messages from POEditor
```bash
$ vue-i18n-locale-message export --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--output=./src/locales
```## :warning: Do you have a hierarchical locale message?
POEditor will process locale messages with hierarchical structure as `context`.
Therefore, we need to normalize with flat structure , and push it to POEditor.
```bash
$ vue-i18n-locale-message push --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--target-paths=./src/locales/*.json \
--nomalize=flat \
--filename-match=^([\\w]*)\\.json
```And also, when pulling data from POEditor, it need to normalize from flat structure to hierarchical structure.
```bash
$ vue-i18n-locale-message pull --provider=poeditor-service-provider \
--conf ./poeditor-service-provider-conf.json \
--nomalize=hierarchy \
--output=./src/locales
```## :copyright: License
[MIT](http://opensource.org/licenses/MIT)