Merge #112: French translation (French for the 43 strings added since, two unused labels removed)

This commit is contained in:
Frederic Jung 2026-10-26 15:16:09 +01:00
commit d2b7aa0ed7
No known key found for this signature in database
8 changed files with 2599 additions and 5 deletions

View file

@ -59,6 +59,7 @@ test('the game starts in English unless the player or the browser asks for anoth
assert.equal(load().ev('LANG'), 'en');
assert.equal(load({ navigatorLanguage: 'it-IT' }).ev('SOT_LANG'), 'it', 'an Italian browser asks for Italian');
assert.equal(load({ navigatorLanguage: 'pt-BR' }).ev('SOT_LANG'), 'pt', 'a Brazilian browser asks for Portuguese');
assert.equal(load({ navigatorLanguage: 'fr-FR' }).ev('SOT_LANG'), 'fr', 'a French browser asks for French');
const it = load({ lang: 'it' });
assert.equal(it.ev('LANG'), 'it');
assert.equal(it.ev('document.documentElement.lang'), 'it');
@ -107,7 +108,7 @@ test('a scenario started in English shows its Italian name after switching', ()
assert.ok(ev("document.getElementById('hAsn').textContent").includes(name));
});
for (const lang of ['en', 'it', 'pt']) {
for (const lang of ['en', 'it', 'pt', 'fr']) {
test(`${lang}: every screen, failure and event renders without errors or unfilled placeholders`, () => {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
seed(ev, 3);
@ -115,6 +116,10 @@ for (const lang of ['en', 'it', 'pt']) {
assert.match(ev("document.getElementById('modalCard').textContent"), /Come si gioca/);
assert.equal(ev("document.querySelector('#hud [data-act=bank] .lbl').textContent"), 'Cassa · Banca');
}
if (lang === 'fr') {
assert.match(ev("document.getElementById('modalCard').textContent"), /Comment jouer/);
assert.equal(ev("document.querySelector('#hud [data-act=bank] .lbl').textContent"), 'Caisse · Banque');
}
const { thrown, leaks } = tour(ev);
assert.ok(ev('(S.stats.f||{}).anchor'), 'Baltic and Red Sea anchors count for the badge in every language');
assert.deepEqual(thrown, []);

View file

@ -389,7 +389,7 @@ test('DKNOG in Copenhagen is on the conference calendar', () => {
});
test('the Signal group is linked from the title screen, the menu and How to play, in every language', () => {
for (const lang of ['en', 'it', 'pt']) {
for (const lang of ['en', 'it', 'pt', 'fr']) {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
const links = (setup) => ev(`(()=>{${setup};return [...document.querySelectorAll('#modal a[href^="https://signal.group/#"]')].map(a=>a.target+'|'+a.rel+'|'+a.textContent.trim()).join('\\n');})()`);
const title = links('showTitle()');