CLI v.1.4.0 released - merging tags, language aliases, filtering keys, and more

Merge release tags

The Release Tags feature is already helpful when you need to lock the current state to prevent affecting your production while still retaining the possibility to test localization during development and/or staging environment.

With merging, you can modify existing tags in many different ways:

  • merge missing translations from one tag to another
  • update translations in the tag using another tag as a source
  • overwrite keys including the source language
  • merge only selected languages and keys
  • add/remove selected languages and keys
  • publish/unpublish languages
  • apply changes only if the source language content matches
  • apply changes only for arrays with the same length
  • update language, project, and metadata information

And that’s awesome as you can, e.q., update only selected languages/keys in your production environment once there are tested on staging.

READ MORE >>

Language aliases and expansions

You can now easily change languages or expand them to more output files. E.q., with a simple configuration show below, locale zh-Hant-TW will be stored as zh-TW, zh-MO, zh-CN (just an example).

"langAliases": {
  "zh-Hant-TW": "zh-TW"
},
"langExpansions": {
  "zh-Hant-TW": ["zh-MO", "zh-CN"]
}

This is particularly useful, e.q., for Chinese locales on Android or for supporting both new and legacy locales. It also works for the format conversions feature allowing you to take platform-specific locale differences into consideration easily.

READ MORE >>

Including and excluding keys

You can now include and exclude keys based on exact match, prefix, suffix, or a regular expression when uploading files or converting them. It allows you to remove sensitive data from your string files or use format conversions to output files, e.q., for Android and iOS while removing parts that are platform-specific.

{
  "excludeKeys": [
    "REGEX:private_.*",
    "SUFFIX:_private"
  ]
}

READ MORE >>

No need for write key and config file

We have reworked how configuration works, so it’s no longer necessary to have the configuration file and writeKey for commands that don’t really need it. The configuration file is now required only for upload and download commands. The writeKey is required for file manipulations, release tags actions, and upload.

Showing of upload stats

When uploading files in the synchronous mode, after the upload, additional details are provided - at the moment, it’s the number of added, updated, and deprecated phrases.

Downloading of iOS data

We have added the option to download iOS data in highly compressed binary format. This is an important part of our upcoming iOS SDK. Stay tuned!

Newer version of node-fetch

We have bumped the version of the node-fetch dependency for the NPM version of our CLI as previous version has known vulnerability.

Improved Docker images

Our Docker image is now based on ubuntu:20.04 and we have improved our build script to remove apt caches and other unnecessary files to reduce the size and remove the possible vulnerability.

Improved error reporting

  • When the upload fails because there are no files for uploading (e.q., invalid pattern), the CLI returns a non-zero exit code.
  • Improved error reporting for NPM version - avoid Kotlin/JS incompatibility in exceptions

Fixed bug with -s parameter

The simulate parameter wasn’t correctly applied for generating metadata files. The files were generated and stored even with -s parameter provided.

NPM version is minified now

NPM version of the CLI is now minified, has only half of the size, and is faster.

2 Likes