Fix translationRunner and add it to CI

This commit is contained in:
Alex Gleason 2020-04-14 13:16:08 -05:00
parent b34946fc30
commit 5907b60117
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 6 additions and 3 deletions

View file

@ -19,6 +19,10 @@ lint-sass:
stage: lint
script: yarn test:lint:sass
i18n:
stage: lint
script: yarn manage:translations
build-development:
stage: build
script: yarn build:development

View file

@ -5,8 +5,8 @@ const { default: manageTranslations, readMessageFiles } = require('react-intl-t
const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/;
const rootDirectory = path.resolve(__dirname, '..', '..');
const translationsDirectory = path.resolve(rootDirectory, 'app', 'javascript', 'gabsocial', 'locales');
const rootDirectory = path.resolve(__dirname, '..');
const translationsDirectory = path.resolve(rootDirectory, 'app', 'gabsocial', 'locales');
const messagesDirectory = path.resolve(rootDirectory, 'build', 'messages');
const availableLanguages = fs.readdirSync(translationsDirectory).reduce((languages, filename) => {
const basename = path.basename(filename, '.json');
@ -216,4 +216,3 @@ if (problems.length > 0) {
process.exit(1);
}
};