mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The 16 strings the security features added were English placeholders in
every locale; each is now in the language and script its locale tag
names, with the terms the file already uses for password, account,
attachment, backup and two-factor authentication. __min__ is kept
character for character. Where the right word is spelled like the
English ("Administrator"), the column header says "Admin" or "Who"
instead, because a value equal to English is not a translation.
fy and fy-NL: the existing two-factor strings were Dutch in a Frisian
file, and are Frisian now; tests/frisianTwoFactorLanguage.test.cjs.
tig: Tigre spells storage መክዘን, not Tigrinya's መኽዘን.
Low confidence, for a speaker to correct on Transifex: ace, ak, an, ary,
as, ast-ES, ay, ba, bho, bi, bm, bo, br, bua, chr, ckb, co, csb, cv, dz,
ee, ff, fj, fy, gn, gv, haw, hsb, ht, ig, iu, kl, kok, ks, kw, la, lg,
lld, mg, mi, nah, nd, nso, ny, om, pap, ps, qu, rm, rn, rup, rw, sah, sc,
scn, sd, se, si, sm, sn, so, ss, st, szl, tig, tlh, tn, to, tpi, ts,
uz-AR, ve, ve-CC, ve-PP, vo, wa, wa-RR, wal, wo, xh, yi, zgh.
Thanks to xet7 !
36 lines
1.7 KiB
JavaScript
36 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
// fy and fy-NL are West Frisian, but their two-factor authentication strings
|
|
// were Dutch ("Tweestapsverificatie ... inschakelen", "Voer uw ... in"). The
|
|
// locale tag is authoritative (CLAUDE.md, Translations), so they are Frisian
|
|
// now - written with low confidence, for a speaker to improve on Transifex.
|
|
// Shares one vocabulary with the REQUIRE_2FA strings beside them.
|
|
//
|
|
// Run: node tests/frisianTwoFactorLanguage.test.cjs
|
|
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const data = loc => JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'imports/i18n/data', `${loc}.i18n.json`), 'utf8'));
|
|
const en = data('en');
|
|
// Dutch words that Frisian spells differently.
|
|
const DUTCH = /\b(verificatie\w*|ingeschakeld|inschakelen|uitschakelen|uw|voer|bevestigen|ongeldige|opnieuw|eenmaal|elke aanmelding|handmatig|verifiëren)\b/i;
|
|
|
|
let passed = 0;
|
|
for (const loc of ['fy', 'fy-NL']) {
|
|
const d = data(loc);
|
|
const keys = Object.keys(d).filter(k => /^(twoFactorAuth|twoFactorCode|two-factor-required)/.test(k));
|
|
assert.ok(keys.length >= 13, `${loc}: ${keys.length} two-factor keys`);
|
|
for (const key of keys) {
|
|
assert.doesNotMatch(d[key], DUTCH, `${loc} ${key} is Dutch: ${d[key]}`);
|
|
}
|
|
assert.match(d['twoFactorAuthPopup-title'], /^Tweestapsferifikaasje$/);
|
|
assert.match(d['two-factor-required-title'], /Tweestapsferifikaasje/, 'one word for it in both places');
|
|
// Negative: the manual-entry text keeps its trailing space before the code.
|
|
assert.ok(d['twoFactorAuth-manual-entry'].endsWith(': ') && en['twoFactorAuth-manual-entry'].endsWith(': '));
|
|
passed += 1;
|
|
console.log(` ok - ${loc}: two-factor strings are Frisian`);
|
|
}
|
|
console.log(`frisianTwoFactorLanguage: ${passed} tests passed`);
|