bpmn-js/test/helper/TranslationCollector.js
Vladimirs Katusenoks 28cc4e8e10 feat(i18n/build): add grunt task for translation extraction
Use `grunt extract-translations` to run extraction.
Will run all test cases to extract the available translations.

Closes #497
2016-05-03 17:31:49 +02:00

18 lines
354 B
JavaScript

'use strict';
var translate = require('diagram-js/lib/i18n/translate/translate');
function collectTranslations(template, replacements) {
var log = {
type: 'translations',
msg: template
};
console.log(JSON.stringify(log));
return translate(template, replacements);
}
module.exports = {
translate: [ 'value', collectTranslations ]
};