@qualweb/core
Version:
QualWeb evaluator core engine
20 lines • 861 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AssertionTranslator = void 0;
const locale_1 = require("@qualweb/locale");
class AssertionTranslator {
module;
translator;
constructor(module, locale) {
this.module = module;
this.translator = new locale_1.Translator(locale);
}
translate(assertion) {
assertion.name = this.translator.get([this.module, assertion.code, 'name']) ?? assertion.name;
assertion.description = this.translator.get([this.module, assertion.code, 'description']) ?? assertion.description;
assertion.metadata.description =
this.translator.get([this.module, assertion.code, 'results', 'I1']) ?? assertion.metadata.description;
}
}
exports.AssertionTranslator = AssertionTranslator;
//# sourceMappingURL=AssertionTranslator.js.map