refactor(ui): give every message one friendly, ungendered voice

Members read all replies as one voice, so the wording now lives in one place:
the shared titles, the list marker and the "what to do next" hint come from
src/ui/embeds.js, and every module follows them.

An error explains the cause, recalls the rule and offers the way out instead of
blaming; a success says what happens next. Nothing agrees on the gender of a
person ("utilisateur", "cher/chère", "ravie"), which also keeps the sentences
shorter. Two tests lock the shared titles and reject gendered descriptions.
This commit is contained in:
BlackAngelTV committed 2026-09-15 16:12:19 +02:00
1 parent 76e2269555
commit ef8f09da10
31 files changed
+469 -201

No files matched your search

+3 -3
View File
@@ -9,11 +9,11 @@ describe('parseChoices', () => {
});
it('rejects a single choice', () => {
assert.throws(() => parseChoices('Oui'), /entre 2 et 10 choix/);
assert.throws(() => parseChoices('Oui'), /entre 2 et 10 propositions/);
});
it('rejects duplicated choices regardless of case', () => {
assert.throws(() => parseChoices('Oui;oui'), /différents/);
assert.throws(() => parseChoices('Oui;oui'), /Deux propositions identiques/);
});
it('rejects more choices than allowed', () => {
@@ -42,7 +42,7 @@ describe('buildPollEmbed', () => {
{ choice_index: 0, count: 3 },
{ choice_index: 1, count: 1 },
]);
assert.equal(embed.data.title, 'Sondage #3 — Quel thème ?');
assert.equal(embed.data.title, '📊 Sondage #3 — Quel thème ?');
assert.match(embed.data.description, /Clair/);
assert.match(embed.data.description, /3 \(75 %\)/);
assert.equal(embed.data.fields[0].value, '4');