New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

locize-cli

Package Overview
Dependencies
Maintainers
2
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

locize-cli - npm Package Compare versions

Comparing version 8.3.1 to 8.4.0

4

CHANGELOG.md

@@ -8,2 +8,6 @@ # locize-cli change log

## [8.4.0](https://github.com/locize/locize-cli/compare/v8.3.1...v8.4.0) - 2024-12-23
- feat: add --auto-translate option for sync command [101](https://github.com/locize/locize-cli/pull/101)
## [8.3.1](https://github.com/locize/locize-cli/compare/v8.3.0...v8.3.1) - 2024-12-23

@@ -10,0 +14,0 @@

8

package.json
{
"name": "locize-cli",
"version": "8.3.1",
"version": "8.4.0",
"description": "locize cli to import locales",

@@ -18,7 +18,7 @@ "main": "index.js",

"diff": "7.0.0",
"dotenv": "16.4.5",
"dotenv": "16.4.7",
"flat": "5.0.2",
"fluent_conv": "3.3.0",
"gettext-converter": "1.3.0",
"https-proxy-agent": "7.0.5",
"https-proxy-agent": "7.0.6",
"ini": "4.1.3",

@@ -40,3 +40,3 @@ "js-yaml": "4.1.0",

"gh-release": "7.0.2",
"@yao-pkg/pkg": "6.1.1"
"@yao-pkg/pkg": "6.2.0"
},

@@ -43,0 +43,0 @@ "scripts": {

@@ -149,2 +149,3 @@ [![npm](https://img.shields.io/npm/v/locize-cli.svg)](https://npmjs.org/package/locize-cli)

- if you change the values of existing keys in the reference language, it will not change them in locize (to change the existing values you have to change it directly in locize or use the *--update-values true* argument)
- if you update existing keys (with *--update-values true*) the automatic translation is not triggered, unless the *--auto-translate true* argument us used
- **if you want to take into account all languages instead of the reference language only while comparing the namespace content between local and remote, you can use the command argument *--reference-language-only false***

@@ -151,0 +152,0 @@ - **if you want to take into account the modification time while comparing the namespace content between local and remote, you can use the command argument *--compare-modification-time true***

@@ -269,3 +269,15 @@ const fs = require('fs');

function send(d, so, clb, isRetrying) {
request(opt.apiPath + '/update/' + opt.projectId + '/' + opt.version + '/' + lng + '/' + ns.namespace + (so ? '?omitstatsgeneration=true' : ''), {
const queryParams = new URLSearchParams();
if (opt.autoTranslate) {
/** @See https://docs.locize.com/integration/api#optional-autotranslate */
queryParams.append('autotranslate', 'true');
}
if (so) {
// no API docs for this
queryParams.append('omitstatsgeneration', 'true');
}
const queryString = queryParams.size > 0 ? '?' + queryParams.toString() : '';
request(opt.apiPath + '/update/' + opt.projectId + '/' + opt.version + '/' + lng + '/' + ns.namespace + queryString, {
method: 'post',

@@ -485,3 +497,3 @@ body: d,

if (ns.diff.toUpdate.length > 0) {
console.log(colors.yellow(`updating ${ns.diff.toUpdate.length} keys in ${ns.language}/${ns.namespace}...`));
console.log(colors.yellow(`updating ${ns.diff.toUpdate.length} keys in ${ns.language}/${ns.namespace}${opt.autoTranslate ? ' with automatic translation' : ''}...`));
if (opt.dry) console.log(colors.yellow(`would update ${ns.diff.toUpdate.join(', ')} in ${ns.language}/${ns.namespace}...`));

@@ -488,0 +500,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc