@qualweb/locale v0.2.2
@qualweb/locale
Translation module for QualWeb reports.
How to install
$ npm i @qualweb/locale --saveLanguage support
If you want a translation on your own language, follow these steps:
How to run
The best way to have a translated report is by using the @qualweb/core module, and passing the locale code you want in the options. If you really want to use this package separately bear in mind that the variables in the sentences wont be translated and some meaning can be lost.
'use strict';
import locales, { translateReport } from '@qualweb/locale';
async () => {
// EvaluationReport only. EARL report is not currently supported. If you need a EARL report, convert the evaluation report after the translation. Check https://github.com/qualweb/earl-reporter
const report = 'Evaluation report obtained from @qualweb/cli or @qualweb/core';
const translatedReport = new ReportTranslator('en').translate(report);
// OR
const translatedReport = new ReportTranslator(locales.en).translate(report);
// OR
const ownLocale = {
// If you have a compatible locale object
};
const translatedReport = new ReportTranslator(ownLocale).translate(report);
console.log(translatedReport);
};License
ISC
11 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago