@enplug/scripts 1.11.4-dev64 → 1.11.4-dev66

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.
@@ -85,14 +85,14 @@ async function syncTranslations(s3Client, bucket) {
85
85
  const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
86
86
  if(fileId && storageId) {
87
87
  await updateCrowdinFile(credentials, crowdinPath, storageId.data.data.id, fileId);
88
- await updateFrakeTranslations(credentials, fileId, s3EnPath);
88
+ await updateFrakeTranslations(credentials, fileId, s3EnPath, s3Client, bucket);
89
89
  }
90
90
  } else {
91
91
  const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
92
92
  if(storageId) {
93
93
  const result = await addCrowdinFile(credentials, crowdinPath, storageId.data.data.id, folderId);
94
94
  console.log('add result', result.data);
95
- // await updateFrakeTranslations(credentials, fileId, s3EnPath);
95
+ // await updateFrakeTranslations(credentials, fileId, s3EnPath, s3Client, bucket);
96
96
  }
97
97
  }
98
98
  } else if((crowdinPathSections[0] === 'dashboard' || crowdinPathSections[0] === 'player-web' || crowdinPathSections[0] === 'components') && appDirectoryId) {
@@ -102,7 +102,7 @@ async function syncTranslations(s3Client, bucket) {
102
102
  const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
103
103
  if(fileId && storageId) {
104
104
  await updateCrowdinFile(credentials, crowdinPath, storageId.data.data.id, fileId);
105
- await updateFrakeTranslations(credentials, fileId, s3EnPath);
105
+ await updateFrakeTranslations(credentials, fileId, s3EnPath, s3Client, bucket);
106
106
  }
107
107
  } else {
108
108
  console.error(`Could not upload ${chalk.yellow.bold(`${rowdinPathSections[1]}`)}. Only en.json supported.`);
@@ -116,7 +116,7 @@ async function syncTranslations(s3Client, bucket) {
116
116
  const storageId = await uploadFileToCrowdinStorage(credentials, config.localPath);
117
117
  if(fileId && storageId) {
118
118
  await updateCrowdinFile(credentials, crowdinPath, storageId.data.data.id, fileId);
119
- await updateFrakeTranslations(credentials, fileId, s3EnPath);
119
+ await updateFrakeTranslations(credentials, fileId, s3EnPath, s3Client, bucket);
120
120
  }
121
121
  }
122
122
  }
@@ -125,7 +125,7 @@ async function syncTranslations(s3Client, bucket) {
125
125
  }
126
126
  }
127
127
 
128
- async function updateFrakeTranslations(credentials, fileId, s3EnPath) {
128
+ async function updateFrakeTranslations(credentials, fileId, s3EnPath, s3Client, bucket) {
129
129
  const { data: fakeTranslationUrl } = await fetchFileFromCrowdin(credentials, FAKE_IN_CONTEXT_LANGUAGE, fileId);
130
130
  console.log('eo data', fakeTranslationUrl);
131
131
  const s3TranslationsPath = path.parse(s3EnPath).dir;
@@ -133,9 +133,9 @@ async function updateFrakeTranslations(credentials, fileId, s3EnPath) {
133
133
  const s3FakeTranslationPath = path.join(s3TranslationsPath, FAKE_IN_CONTEXT_LANGUAGE_FILE);
134
134
  console.log('s3FakeTranslationPath', s3FakeTranslationPath);
135
135
  const fakeTranslation = await readFakeTranslationsFile(fakeTranslationUrl.data.url);
136
- console.log('s3FakeTranslationPath', fakeTranslation.data);
136
+ console.log('fakeTranslation', fakeTranslation.data);
137
137
 
138
- // await uploadTranslationToS3(s3Client, bucket, s3FakeTranslationPath, JSON.stringify(fakeTranslation));
138
+ await uploadTranslationToS3(s3Client, bucket, s3FakeTranslationPath, JSON.stringify(fakeTranslation));
139
139
  }
140
140
 
141
141
  async function promptForceContinue() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enplug/scripts",
3
- "version": "1.11.4-dev64",
3
+ "version": "1.11.4-dev66",
4
4
  "description": "Enplug scripts",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",