README.md in i18n-tasks-1.0.12 vs README.md in i18n-tasks-1.0.13

- old
+ new

@@ -22,11 +22,11 @@ i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (default in Rails). Add i18n-tasks to the Gemfile: ```ruby -gem 'i18n-tasks', '~> 1.0.12' +gem 'i18n-tasks', '~> 1.0.13' ``` Copy the default [configuration file](#configuration): ```console @@ -115,10 +115,21 @@ # accepts from and locales options: $ i18n-tasks translate-missing --from=en es fr ``` +### OpenAI Translate missing keys + +Translate missing values with OpenAI ([more below on the API key](#openai-translation-config)). + +```console +$ i18n-tasks translate-missing --backend=openai + +# accepts from and locales options: +$ i18n-tasks translate-missing --from=en es fr +``` + ### Find usages See where the keys are used with `i18n-tasks find`: ```bash @@ -333,10 +344,11 @@ | syntax | description | |:------------:|:----------------------------------------------------------| | `*` | matches everything | | `:` | matches a single key | +| `*:` | matches part of a single key | | `{a, b.c}` | match any in set, can use `:` and `*`, match is captured | Example of usage: ```sh @@ -421,10 +433,21 @@ # config/i18n-tasks.yml translation: yandex_api_key: <Yandex API key> ``` +<a name="openai-translation-config"></a> +### OpenAI Translate + +`i18n-tasks translate-missing` requires a OpenAI API key, get it at [OpenAI](https://openai.com/). + +```yaml +# config/i18n-tasks.yml +translation: + openai_api_key: <OpenAI API key> +``` + ## Interactive console `i18n-tasks irb` starts an IRB session in i18n-tasks context. Type `guide` for more information. ## Import / export to a CSV spreadsheet @@ -438,10 +461,10 @@ # Development - Install dependencies using `bundle install` - Run tests using `bundle exec rspec` -- Install [Overcommit](overcommit) by running `overcommit --install` +- Install [Overcommit](https://github.com/sds/overcommit) by running `overcommit --install` ## Skip Overcommit-hooks - `SKIP=RuboCop git commit` - `OVERCOMMIT_DISABLE=1 git commit`