@enplug/scripts 1.11.4-dev56 → 1.11.4-dev57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -225,7 +225,7 @@ async function addCrowdinFile(credentials, crowdinPath, storageId, folderId) {
|
|
|
225
225
|
return from(axios.post(url, body, { headers: { Authorization: AuthStr } })).pipe(tap({
|
|
226
226
|
next: response => {
|
|
227
227
|
if (response.data) {
|
|
228
|
-
console.log(`${chalk.green.bold('Translations
|
|
228
|
+
console.log(`${chalk.green.bold('Translations uploaded to Crowdin')} ${chalk.yellow.bold(`[${crowdinPath}]`)}`);
|
|
229
229
|
} else {
|
|
230
230
|
console.error('Unexpected result');
|
|
231
231
|
console.log(response);
|
|
@@ -84,13 +84,12 @@ async function syncTranslations(s3Client, bucket) {
|
|
|
84
84
|
if(fileId) {
|
|
85
85
|
const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
|
|
86
86
|
if(fileId && storageId) {
|
|
87
|
-
|
|
87
|
+
updateCrowdinFile(credentials, crowdinPath, storageId.data.data.id, fileId);
|
|
88
88
|
}
|
|
89
89
|
} else {
|
|
90
|
-
// console.error(`Could not find ${chalk.yellow.bold(`${crowdinPathSections[3]}`)} file, create it in the Crowdin panel first.`);
|
|
91
90
|
const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
|
|
92
91
|
if(storageId) {
|
|
93
|
-
|
|
92
|
+
addCrowdinFile(credentials, crowdinPath, storageId.data.data.id, folderId);
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
} else if(crowdinPathSections[0] === 'dashboard' && appDirectoryId) {
|
|
@@ -99,7 +98,7 @@ async function syncTranslations(s3Client, bucket) {
|
|
|
99
98
|
if(fileId) {
|
|
100
99
|
const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
|
|
101
100
|
if(fileId && storageId) {
|
|
102
|
-
|
|
101
|
+
updateCrowdinFile(credentials, crowdinPath, storageId.data.data.id, fileId);
|
|
103
102
|
}
|
|
104
103
|
} else {
|
|
105
104
|
console.error(`Could not upload ${chalk.yellow.bold(`[${rowdinPathSections[1]}]`)}. Only en.json supported.`);
|