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

@opensea/i18n-dl

Package Overview
Dependencies
Maintainers
10
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opensea/i18n-dl - npm Package Compare versions

Comparing version 0.0.27 to 1.0.0

18

dist/cli.js

@@ -123,3 +123,3 @@ #!/usr/bin/env node

var DownloadClient = class extends SmartlingClient {
async download(directory, files, normalize = true) {
async download(directory, files) {
if (!await fileExists(directory)) {

@@ -150,3 +150,3 @@ await createDirectory(directory);

const split = translatedFile.split(path2.sep);
const targetLocaleId = split[split.length - (normalize ? 3 + path2.normalize(directory).split(path2.sep).length : 4 + directory.split(path2.sep).length)];
const targetLocaleId = split[split.length - (3 + path2.normalize(directory).split(path2.sep).length)];
const locale = getTargetLocalePath(targetLocaleId);

@@ -176,4 +176,3 @@ const localeFolder = path2.join(directory, locale);

projectId,
directory,
normalize = true
directory
}) => {

@@ -189,3 +188,3 @@ const client = new DownloadClient({

const files = await glob2(`${directory}/${sourceLocaleId}/**/*.json`);
await client.download(directory, files, normalize);
await client.download(directory, files);
};

@@ -215,8 +214,4 @@

process.env.DIRECTORY
).option(
"-n, --normalize <normalize>",
"If path to the locale file should be normalized before being sent to Smartling",
"false"
);
const { userSecret, userIdentifier, ref, projectId, directory, normalize } = program.parse().opts();
const { userSecret, userIdentifier, ref, projectId, directory } = program.parse().opts();
const spinner = ora("Processing files for translations...").start();

@@ -228,4 +223,3 @@ await download({

projectId,
directory,
normalize: normalize !== "false"
directory
});

@@ -232,0 +226,0 @@ spinner.succeed("Files for translation downloaded!");

{
"name": "@opensea/i18n-dl",
"version": "0.0.27",
"version": "1.0.0",
"description": "Package for i18n key download",

@@ -23,3 +23,3 @@ "license": "MIT",

"glob": "10.3.4",
"ky": "0.33.3",
"ky": "1.0.0",
"ora": "7.0.1"

@@ -29,3 +29,3 @@ },

"@opensea/smartling-client": "*",
"msw": "1.2.5"
"msw": "1.3.0"
},

@@ -32,0 +32,0 @@ "publishConfig": {

# download
## Install
`@opensea/i18n-dl` downloads & extracts translated files from Smartling's Translation Management System.
## Getting started
### Install
```sh

@@ -9,2 +13,12 @@ npm install --save-dev @opensea/i18n-dl

### Usage
Published packages comes with a `i18n-dl` binary.
```sh
npm run i18n-dl --directory ./locales
```
You can find the full example using Github Actions [here](https://github.com/ProjectOpenSea/web-app-template/blob/main/.github/workflows/i18n-download.yml).
## Running tests

@@ -11,0 +25,0 @@

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