diff --git a/config.js b/config.js index e6b90a2..ff7ed81 100644 --- a/config.js +++ b/config.js @@ -1,8 +1,6 @@ /* eslint-env node */ /* eslint-disable @typescript-eslint/no-var-requires */ -const path = require('path'); - require('dotenv').config(); const { env } = process; @@ -17,7 +15,7 @@ module.exports = { projectId: 350687, filePath: 'accounts/site.json', sourceLang: 'en', - basePath: path.resolve(`${__dirname}/packages/app/i18n`), + basePath: `${__dirname}/packages/app/i18n`, minApproved: 80, // Minimal ready percent before translation can be published }, }; diff --git a/packages/scripts/i18n-crowdin.ts b/packages/scripts/i18n-crowdin.ts index 4e3af22..341f170 100644 --- a/packages/scripts/i18n-crowdin.ts +++ b/packages/scripts/i18n-crowdin.ts @@ -132,12 +132,19 @@ async function findFileId(filePath: string, branchId?: number): Promise fileData.data); + // Compare directoryId since when the file is placed in the root return files.find((file) => file.directoryId === directoryId && file.name === fileName)?.id; }