Files
wekan/tests/boardSettingsTitleLanguage.test.cjs
T
Lauri Ojansivu 6f67fd298e Board Settings in Mandarin and Cantonese is a board, not a chessboard; Yoruba and Yiddish say it in their own words.
Mandarin and Cantonese named Board Settings with 棋盘/棋盤, a chessboard,
beside their own 看板 for a board. Yoruba had the English word Board in it,
and Yiddish spelled Board, Boards and Settings out in Hebrew letters. Low
confidence for Yoruba and Yiddish.

Thanks to xet7 !
2026-11-20 08:34:27 +02:00

27 lines
1.3 KiB
JavaScript

'use strict';
// "Board Settings" (boardMenuPopup-title) in the language its locale names:
// Mandarin and Cantonese had 棋盘/棋盤 - "chessboard" settings - beside their
// own 看板 for a board; Yoruba had the English "Board" in it, and Yiddish
// spelled the English words out in Hebrew letters (2026-11-20).
// Run: node --test tests/boardSettingsTitleLanguage.test.cjs
const test = require('node:test');
const assert = require('node:assert');
const load = tag => require(`../imports/i18n/data/${tag}.i18n.json`);
test('Board Settings is a board, not a chessboard, in Mandarin and Cantonese', () => {
for (const tag of ['cmn', 'yue_CN']) {
const d = load(tag);
assert.ok(d['boardMenuPopup-title'].startsWith(d.board), `${tag}: starts with its own word for a board`);
assert.doesNotMatch(d['boardMenuPopup-title'], /棋/, `${tag}: no chessboard`);
}
});
test('negative: no English left in Yoruba\'s, and no transliterated English in Yiddish\'s', () => {
assert.doesNotMatch(load('yo')['boardMenuPopup-title'], /Board/);
assert.ok(load('yo')['boardMenuPopup-title'].includes(load('yo').board));
const yi = load('yi');
for (const key of ['boardMenuPopup-title', 'settings', 'boards']) {
assert.doesNotMatch(yi[key], /באָרד|סעטטינגס/, `yi ${key}`);
}
});