20.2.0 • Published 5 months ago
@rxap/plugin-localazy
Licence
GPL-3.0-or-later
Version
20.2.0
Deps
4
Size
118 kB
Vulns
0
Weekly
0
This package provides executors and generators for integrating Localazy, a translation management platform, into Nx workspaces. It allows for downloading and uploading translations, managing configuration, and initializing Localazy within a project. The plugin simplifies the process of localizing applications by automating common tasks related to translation management.
Installation
Add the package to your workspace:
yarn add @rxap/plugin-localazyExecute the init generator:
yarn nx g @rxap/plugin-localazy:initExecute the config generator to use the package with a project:
yarn nx g @rxap/plugin-localazy:config [project]Generators
config
Add the executor 'localazy-download' and 'localazy-upload' and update the nx.json file
nx g @rxap/plugin-localazy:config| Option | Type | Default | Description |
|---|---|---|---|
| project | string | The name of the project to add the Localazy builder to. | |
| extractTarget | string | The Nx target responsible for extracting or generating the translation source files. | |
| writeKey | string | The Localazy project write key. This key will be added to the .env file. | |
| readKey | string | The Localazy project read key. This key will be added to the .env file. | |
| overwrite | boolean | false | Whether to overwrite existing Localazy configuration files. |
init
Initialize the package in the workspace
nx g @rxap/plugin-localazy:init| Option | Type | Default | Description |
|---|---|---|---|
| skipFormat | boolean | false | Whether to skip formatting files with Prettier after initialization. |
Executors
download
Downloads i18n files from localazy
| Option | Type | Default | Description |
|---|---|---|---|
| readKey | string | Provide the writeKey on the command line. | |
| writeKey | string | Provide the readkey on the command line. | |
| keysJson | string | Override the keys file name. | |
| configJson | string | Override the configuration file name. | |
| workingDirectory | string | Set the working directory that all paths are relative to. | |
| dryRun | boolean | false | Do not perform the actual operation, only simulate the process. No files are uploaded nor written. |
| quite | boolean | false | Quiet mode. Print only important information. |
| force | boolean | false | Force the upload operation if the validation step fails. |
| autoTag | boolean | false | Automatically determine a tag and perform the operation for it. |
| tag | string | Perform the operation for the given release tag. | |
| branch | string | Perform the operation for the given branch | |
| param | string | Add extra parameter for processing; format is key:value | |
| failOnMissingGroups | boolean | Fail when non-existent group is provided on the command line |
upload
Uploadss i18n files from localazy
| Option | Type | Default | Description |
|---|---|---|---|
| readKey | string | Provide the writeKey on the command line. | |
| writeKey | string | Provide the readkey on the command line. | |
| keysJson | string | Override the keys file name. | |
| configJson | string | Override the configuration file name. | |
| workingDirectory | string | Set the working directory that all paths are relative to. | |
| dryRun | boolean | false | Do not perform the actual operation, only simulate the process. No files are uploaded nor written. |
| version | string | ||
| quite | boolean | false | Quiet mode. Print only important information. |
| force | boolean | false | Force the upload operation if the validation step fails. |
| tag | string | Perform the operation for the given release tag. | |
| autoTag | boolean | false | Automatically determine a tag and perform the operation for it. |
| extractTarget | string | The target that extracts or generate the translation source file. | |
| disableContentLength | boolean | Disable Content-Length header when uploading data; use only when the upload operation fails with 'bad request' | |
| async | boolean | Do not wait for the server to process the uploaded data and report errors. | |
| project | string | Only perform upload if the project slug or ID match the specified one | |
| branch | string | Perform the operation for the given branch | |
| param | string | Add extra parameter for processing; format is key:value | |
| failOnMissingGroups | boolean | Fail when non-existent group is provided on the command line |