@opensea/i18n-dl
Advanced tools
Comparing version 0.0.25 to 0.0.26
@@ -110,2 +110,13 @@ #!/usr/bin/env node | ||
// src/utils.ts | ||
var TARGET_LOCALE_TO_PATH_MAPPING = { | ||
"fr-FR": "fr", | ||
"es-ES": "es", | ||
"ko-KR": "kr", | ||
"ja-JP": "ja" | ||
}; | ||
var getTargetLocalePath = (targetLocaleId) => { | ||
return TARGET_LOCALE_TO_PATH_MAPPING[targetLocaleId] || targetLocaleId; | ||
}; | ||
// src/client.ts | ||
@@ -139,3 +150,4 @@ var DownloadClient = class extends SmartlingClient { | ||
const split = translatedFile.split(path2.sep); | ||
const locale = split[split.length - (3 + path2.normalize(directory).split(path2.sep).length)]; | ||
const targetLocaleId = split[split.length - (3 + path2.normalize(directory).split(path2.sep).length)]; | ||
const locale = getTargetLocalePath(targetLocaleId); | ||
const localeFolder = path2.join(directory, locale); | ||
@@ -142,0 +154,0 @@ if (!await fileExists(localeFolder)) { |
{ | ||
"name": "@opensea/i18n-dl", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "Package for i18n key download", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
7406
210