chore: simplify translation collection
Use same global variable <COLLECT_TRANSLATIONS> in node and within the specs.
This commit is contained in:
parent
a276b8f9ad
commit
fa0d4957f3
|
@ -92,10 +92,7 @@ module.exports = function(karma) {
|
|||
if (collectTranslations) {
|
||||
config.plugins = [].concat(config.plugins || [], 'karma-*', require('./translation-reporter'));
|
||||
config.reporters = [].concat(config.reporters || [], 'translation-reporter');
|
||||
|
||||
config.envPreprocessor = [
|
||||
'TRANSLATIONS'
|
||||
];
|
||||
config.envPreprocessor = [].concat(config.envPreprocessor || [], 'COLLECT_TRANSLATIONS');
|
||||
}
|
||||
|
||||
karma.set(config);
|
||||
|
|
|
@ -8,8 +8,6 @@ var {
|
|||
|
||||
|
||||
function TranslationReporter() {
|
||||
process.env.TRANSLATIONS = 'enabled';
|
||||
|
||||
var translationsFile = path.join(__dirname, '../../docs/translations.json');
|
||||
|
||||
var translations = [];
|
||||
|
|
|
@ -46,7 +46,7 @@ var OPTIONS, BPMN_JS;
|
|||
|
||||
import translationModule from './TranslationCollector';
|
||||
|
||||
export var collectTranslations = window.__env__ && window.__env__.TRANSLATIONS === 'enabled';
|
||||
export var collectTranslations = window.__env__ && window.__env__.COLLECT_TRANSLATIONS;
|
||||
|
||||
// inject logging translation module into default modules
|
||||
if (collectTranslations) {
|
||||
|
|
Loading…
Reference in New Issue