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.
Add the package to your workspace:
yarn add @rxap/plugin-localazy
Execute the init generator:
yarn nx g @rxap/plugin-localazy:init
Execute the config generator to use the package with a project:
yarn nx g @rxap/plugin-localazy:config [project]
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. | |
extractTarget | string | The target that extracts or generate the translation source file. | |
writeKey | string | The localazy write key. | |
readKey | string | The localazy read key. | |
overwrite | boolean | Overwrite existing files. |
Initialize the package in the workspace
nx g @rxap/plugin-localazy:init
Option | Type | Default | Description |
---|---|---|---|
skipFormat | boolean | false |
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 |
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 |