mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
Use the suite's own Node executable for translation subprocesses, account for the placeholder repair helper and current translation totals, and activate the Table filter after the view-change reload in its browser regression test. Thanks to xet7 !
22 lines
1.0 KiB
JavaScript
22 lines
1.0 KiB
JavaScript
'use strict';
|
|
const assert = require('assert');
|
|
const childProcess = require('child_process');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const ROOT = path.resolve(__dirname, '..');
|
|
const node = process.execPath;
|
|
const fill = path.join(ROOT, 'releases/translations/fill-translations.mjs');
|
|
const cases = [['bg', /[\u0400-\u04ff]/u], ['fa-IR', /[\u0600-\u06ff]/u],
|
|
['fa', /[\u0600-\u06ff]/u], ['mk', /[\u0400-\u04ff]/u]];
|
|
for (const [language, script] of cases) {
|
|
const remaining = JSON.parse(childProcess.execFileSync(node,
|
|
[fill, '--list', language], { cwd: ROOT, encoding: 'utf8' }));
|
|
assert.deepStrictEqual(remaining, {});
|
|
const translated = JSON.parse(fs.readFileSync(path.join(ROOT,
|
|
'imports/i18n/data', `${language}.i18n.json`), 'utf8'));
|
|
assert.match(translated['no-boards-selected'], script);
|
|
assert.doesNotMatch(translated['enable-permanent-delete-description'],
|
|
/Allow Global Admins|Enabling this setting/);
|
|
}
|
|
console.log('upcomingFourNineValueTranslationFill: 12 tests passed');
|