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

+7 -5
View File
@@ -21,7 +21,7 @@ export const data = new SlashCommandBuilder()
const discordStatsEmbed = (interaction) => {
const guild = interaction.guild;
return baseEmbed()
.setTitle(`Statistiques — ${guild.name}`)
.setTitle(`📊 Statistiques — ${guild.name}`)
.setThumbnail(guild.iconURL({ size: 128 }))
.addFields(
{ name: 'Membres', value: String(guild.memberCount), inline: true },
@@ -48,9 +48,9 @@ async function giteaStatsEmbed() {
const release = asList(releases)[0];
const embed = baseEmbed(COLORS.gitea)
.setTitle('Activité Gitea')
.setTitle('📈 Activité Gitea')
.setURL(repositoryUrl())
.setDescription(latestCommits || 'Aucun commit récent.')
.setDescription(latestCommits || 'Aucun commit récent pour le moment.')
.addFields(
{ name: 'Issues ouvertes', value: String(asList(issues).length), inline: true },
{ name: 'PR ouvertes', value: String(asList(pulls).length), inline: true },
@@ -67,7 +67,7 @@ function fwsStatsEmbed(interaction) {
const total = actions.reduce((sum, row) => sum + row.count, 0);
return baseEmbed(COLORS.gitea)
.setTitle('Indicateurs FWS')
.setTitle('📈 Indicateurs FWS')
.addFields(
{ name: 'Tickets ouverts', value: String(countOpenTickets(interaction.guildId)), inline: true },
{ name: 'Sondages créés', value: String(countPolls(interaction.guildId)), inline: true },
@@ -107,7 +107,9 @@ export async function execute(interaction) {
log.error('Could not read Gitea stats', error);
await interaction.editReply({
embeds: [
errorEmbed('Les statistiques Gitea sont indisponibles. Vérifie `GITEA_URL` et `GITEA_TOKEN`.'),
errorEmbed(
'Les statistiques Gitea ne répondent pas. Réessaie dans un instant — si ça continue, l’équipe peut vérifier `GITEA_URL` et `GITEA_TOKEN`. Le reste du bot fonctionne normalement.',
),
],
});
}