Fix translationRunner and add it to CI
This commit is contained in:
parent
b34946fc30
commit
5907b60117
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue