Add translation test suite progress indicator

master
Tiana Lemesle 2 years ago
parent 178e6f662c
commit 35f1490277
  1. 5
      test.js

@ -72,6 +72,9 @@
consola.info('Testing translations');
const total = sourceLanguages.length * targetLanguages.length;
let n = 0;
for(let sourceLanguageIndex = 0; sourceLanguageIndex < sourceLanguages.length; sourceLanguageIndex++){
const sourceLanguage = sourceLanguages[sourceLanguageIndex];
@ -96,7 +99,7 @@
if(sourceLanguage === shortTargetLanguage) continue;
consola.info(`Testing translation from ${sourceLanguage} to ${targetLanguage}`);
consola.info(`Testing translation from ${sourceLanguage} to ${targetLanguage} (${++n}/${total} ~ ${((n / total) * 100).toFixed(2)}%)`);
let translation;

Loading…
Cancel
Save