-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-dependencies
- Loading branch information
Showing
12 changed files
with
87 additions
and
652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 SimpleLocalize | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
|
||
<p align="center"> | ||
<a href="https://simplelocalize.io"> | ||
<img src="static/simplelocalize-git-banner.png" width="100%"> | ||
</a> | ||
</p> | ||
<h3 align="center">Translation Management for software projects</h3> | ||
<p align="center">The easiest way to manage translation files for web and mobile apps.</p> | ||
<p align="center"> | ||
<a href="https://github.com/simplelocalize/simplelocalize-cli"> | ||
<img src="static/simplelocalize-git-hero.png"> | ||
</a> | ||
</p> | ||
|
||
![Tests](https://github.com/simplelocalize/simplelocalize-cli/workflows/Run%20Tests/badge.svg) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/af2f6a7680929a8dba41/maintainability)](https://codeclimate.com/github/simplelocalize/simplelocalize-cli/maintainability) | ||
[![codecov](https://codecov.io/gh/simplelocalize/simplelocalize-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/simplelocalize/simplelocalize-cli) | ||
|
||
## What it does? | ||
|
||
SimpleLocalize command-line tool allows you to: | ||
- upload and download translations, | ||
- [auto-translate](https://simplelocalize.io/auto-translate) translations, | ||
- publish and push [Translation Hosting](https://simplelocalize.io/translation-hosting) translations, | ||
- extract translation keys from your project files, | ||
- and more... | ||
|
||
It is a great tool for CI/CD pipelines and localization automation. | ||
SimpleLocalize CLI is a command-line tool that allows you to manage translations in your software project, | ||
and it's a great tool for CI/CD pipelines and localization automation. | ||
|
||
## Github Actions support | ||
|
||
SimpleLocalize CLI is also availabe as a Github Action here: https://github.com/simplelocalize/github-action-cli | ||
- **Upload and download translations.** The main purpose of the command-line tool is to upload and download translation files from [Translation Editor](https://simplelocalize.io/translation-editor/) to your project. | ||
- **[Auto-translate](https://simplelocalize.io/auto-translate) strings.** Start auto-translation jobs from the command-line and get translated strings in a few minutes. | ||
- **[Hosted translations management](https://simplelocalize.io/translation-hosting).** Push and pull translations from Translation Hosting to your project using the command-line. | ||
- **[GitHub Actions support](https://github.com/simplelocalize/github-action-cli).** Use SimpleLocalize CLI in your GitHub Actions workflows. | ||
- **Check project status.** Get project details from the command-line and check if your translations are up-to-date. | ||
|
||
## Installation | ||
|
||
|
@@ -92,47 +97,10 @@ Upload format is a format of the file(s) with translations. [See available uploa | |
- `--replace` allows you to **replace** existing translations with new ones. | ||
- `--dryRun` allows you to **check** what translation files will be uploaded without actually uploading them. | ||
- `--uploadOptions` allows you to pass [additional options](https://simplelocalize.io/docs/general/options/) to the upload command. | ||
Eg.: `--uploadOptions TRIM_LEADING_TRAILING_SPACES`. To pass multiple options, use comma as a separator. | ||
E.g.: `--uploadOptions TRIM_LEADING_TRAILING_SPACES`. To pass multiple options, use comma as a separator. | ||
Learn more about [upload translations command](https://simplelocalize.io/docs/cli/upload-translations/). | ||
## Download translations | ||
Command downloads translation files from [Translation Editor](https://simplelocalize.io/translation-editor/) to given `<DOWNLOAD_PATH_PATTERN>`, e.g.: `./src/translations/messages.json`. | ||
```shell | ||
simplelocalize download | ||
--apiKey <PROJECT_API_KEY> | ||
--downloadPath <DOWNLOAD_PATH_PATTERN> | ||
--downloadFormat <DOWNLOAD_FORMAT> | ||
``` | ||
You can use `{lang}` placeholder to specify language or locale and `{ns}` placeholder to specify namespace, | ||
e.g.: `./src/translations/{lang}/{ns}.json`. | ||
Download format is a format of the file(s) with translations. [See available download formats](https://simplelocalize.io/docs/general/file-formats/) | ||
**Additional parameters:** | ||
- `--downloadOptions` allows you to pass [additional options](https://simplelocalize.io/docs/general/options/) to the download command. Eg.: `--downloadOptions WRITE_NESTED`. | ||
- `--downloadSort` allows you to sort translations in the downloaded file. Eg.: `--downloadSort NEWEST_KEYS_FIRST`. Available options: `NEWEST_KEYS_FIRST`, `NEWEST_KEYS_LAST`, `NAMESPACES`, `IMPORT_ORDER`. | ||
Learn more about [download translations command](https://simplelocalize.io/docs/cli/download-translations/). | ||
## Auto-translate strings | ||
Auto-translate command starts [auto-translation](https://simplelocalize.io/auto-translation) jobs. | ||
```properties | ||
simplelocalize auto-translate --apiKey <PROJECT_API_KEY> | ||
``` | ||
**Additional parameters:** | ||
- `--languageKeys` allows you to specify languages to auto-translate. Eg.: `--languageKeys en,de,fr`. | ||
## Usage examples | ||
Below, you can find some examples of using SimpleLocalize CLI. | ||
### Example: One file with translations | ||
```bash | ||
|
@@ -194,6 +162,41 @@ simplelocalize upload | |
``` | ||
## Download translations | ||
Command downloads translation files from the [Translation Editor](https://simplelocalize.io/translation-editor/) to the given `<DOWNLOAD_PATH_PATTERN>`, | ||
e.g.: `./src/translations/messages.json`. | ||
```shell | ||
simplelocalize download | ||
--apiKey <PROJECT_API_KEY> | ||
--downloadPath <DOWNLOAD_PATH_PATTERN> | ||
--downloadFormat <DOWNLOAD_FORMAT> | ||
``` | ||
You can use `{lang}` placeholder to specify language or locale and `{ns}` placeholder to specify namespace, | ||
e.g.: `./src/translations/{lang}/{ns}.json`. | ||
Download format is a format of the file(s) with translations. [See available download formats](https://simplelocalize.io/docs/general/file-formats/) | ||
**Additional parameters:** | ||
- `--downloadOptions` allows you to pass [additional options](https://simplelocalize.io/docs/general/options/) to the download command. Eg.: `--downloadOptions WRITE_NESTED`. | ||
- `--downloadSort` allows you to sort translations in the downloaded file. Eg.: `--downloadSort NEWEST_KEYS_FIRST`. Available options: `NEWEST_KEYS_FIRST`, `NEWEST_KEYS_LAST`, `NAMESPACES`, `IMPORT_ORDER`. | ||
Learn more about [download translations command](https://simplelocalize.io/docs/cli/download-translations/). | ||
## Auto-translate strings | ||
Auto-translate command starts [auto-translation](https://simplelocalize.io/auto-translation) jobs for all languages in the project or for languages specified in `--languageKeys` parameter. | ||
Auto-translation configuration is taken from the last auto-translation job in the project for the given language. | ||
```properties | ||
simplelocalize auto-translate --apiKey <PROJECT_API_KEY> | ||
``` | ||
**Additional parameters:** | ||
- `--languageKeys` allows you to specify project language keys to auto-translate, e.g.: `--languageKeys en,de,fr`. | ||
## Translation Hosting: Publish translations | ||
It publishes translation to [Translation Hosting](https://simplelocalize.io/translation-hosting). It behaves exactly the same as publish buttons in the SimpleLocalize (Hosting tab). | ||
|
@@ -277,9 +280,8 @@ simplelocalize extract | |
See [available project types](https://simplelocalize.io/docs/cli/i18n-keys-extraction/). | ||
## Configuration file | ||
Use configuration file in order to simplify your bash command. | ||
Use configuration file to simplify your bash command. | ||
Arguments used in command always override properties set in the configuration file. | ||
By default, SimpleLocalize will load configuration from file named `simplelocalize.yml`. | ||
You can load configuration from different location by using a `-c` parameters. | ||
|
@@ -345,12 +347,16 @@ export http_proxy=http://someproxy.com:8080 | |
export http_proxy=http://user:[email protected]:8080 | ||
``` | ||
## Documentation | ||
## Support | ||
Please refer to the [official SimpleLocalize documentation](https://simplelocalize.io/docs/cli/get-started/). That should help you troubleshoot common issues. For additional help, you can reach out to us on one of these channels: | ||
Visit [simplelocalize.io/docs/cli/get-started/](https://simplelocalize.io/docs/cli/get-started/) to get more information | ||
about SimpleLocalize CLI. | ||
- [GitHub](https://github.com/simplelocalize/simplelocalize-cli/issues) (Bug and issue reports) | ||
- [Email](mailto:[email protected]) (General support) | ||
- [Changelog](https://simplelocalize.io/changelog/) (Product updates) | ||
- [YouTube](https://www.youtube.com/channel/UCBpYo2UnHwDGyK175SAKTig) (How-to tutorials) | ||
## License | ||
Check LICENSE.md file | ||
See [LICENSE](/LICENSE) for more details. | ||
Oops, something went wrong.