@enplug/scripts 1.11.5 → 1.11.7-dev1
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.
|
@@ -35,6 +35,7 @@ async function validateTranslations() {
|
|
|
35
35
|
async function syncTranslations(s3Client, bucket) {
|
|
36
36
|
let credentials, config;
|
|
37
37
|
const isProduction = determineEnv(bucket) === 'production';
|
|
38
|
+
const isStaging = determineEnv(bucket) === 'staging'
|
|
38
39
|
|
|
39
40
|
if (!s3Client) { s3Client = createS3Client(getPackageJson()); }
|
|
40
41
|
|
|
@@ -50,7 +51,7 @@ async function syncTranslations(s3Client, bucket) {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
if (credentials && config) {
|
|
53
|
-
const { confirmUpload } = await promptUpload(config.crowdinPath, isProduction);
|
|
54
|
+
const { confirmUpload } = await promptUpload(config.crowdinPath, isProduction || isStaging);
|
|
54
55
|
|
|
55
56
|
if (confirmUpload) {
|
|
56
57
|
const s3EnPath = path.join('/i18n/', config.crowdinPath);
|
|
@@ -60,7 +61,7 @@ async function syncTranslations(s3Client, bucket) {
|
|
|
60
61
|
|
|
61
62
|
await uploadTranslationToS3(s3Client, bucket, s3EnPath, enTranslation);
|
|
62
63
|
|
|
63
|
-
if (isProduction) {
|
|
64
|
+
if (isProduction || isStaging) {
|
|
64
65
|
const crowdinPath = config.crowdinPath.startsWith('/') ? config.crowdinPath.substr(1) : config.crowdinPath;
|
|
65
66
|
const crowdinPathSections = crowdinPath.split('/');
|
|
66
67
|
const appName = crowdinPathSections[1];
|