diff --git a/package.json b/package.json index abc321f7c..70b397c0e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dev": "${npm_execpath} run start", "build": "npx webpack", "jsdoc": "npx jsdoc -c jsdoc.conf.js", - "manage:translations": "npx ts-node ./translationRunner.ts", + "manage:translations": "npx ts-node ./scripts/translationRunner.ts", "test": "npx cross-env NODE_ENV=test npx jest", "test:coverage": "${npm_execpath} run test --coverage", "test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint", diff --git a/translationRunner.ts b/scripts/translationRunner.ts similarity index 99% rename from translationRunner.ts rename to scripts/translationRunner.ts index c4994648b..3c9b5893d 100644 --- a/translationRunner.ts +++ b/scripts/translationRunner.ts @@ -13,7 +13,7 @@ interface LanguageResult { const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/; -const rootDirectory = path.resolve(__dirname); +const rootDirectory = path.resolve(__dirname, '..'); const translationsDirectory = path.resolve(rootDirectory, 'app', 'soapbox', 'locales'); const messagesDirectory = path.resolve(rootDirectory, 'build', 'messages'); const availableLanguages = fs.readdirSync(translationsDirectory).reduce((languages, filename) => {