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:
31 files changed
+469
-201
No files matched your search
@@ -25,7 +25,7 @@ function formatEntry(row) {
|
||||
const duration = row.duration_ms ? ` pendant ${formatDuration(row.duration_ms)}` : '';
|
||||
return (
|
||||
`\`${row.created_at}\` **${meta?.label ?? row.action}** — ${target}${duration}\n` +
|
||||
`↳ par <@${row.moderator_id}> · ${row.reason || 'sans raison'}`
|
||||
`↳ par <@${row.moderator_id}> · ${row.reason || 'sans motif'}`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,13 +41,15 @@ export async function execute(interaction) {
|
||||
const embed =
|
||||
actions.length === 0
|
||||
? infoEmbed(
|
||||
'Historique de modération',
|
||||
user ? `Aucune action enregistrée contre ${user}.` : 'Aucune action enregistrée sur ce serveur.',
|
||||
'📜 Historique de modération',
|
||||
user
|
||||
? `Rien à signaler concernant ${user} : aucune action de modération enregistrée.`
|
||||
: 'Aucune action de modération enregistrée sur ce serveur, tout est calme.',
|
||||
)
|
||||
: baseEmbed(COLORS.moderation)
|
||||
.setTitle(user ? `Historique de ${user.tag}` : 'Dernières actions de modération')
|
||||
.setTitle(user ? `📜 Historique de ${user.tag}` : '📜 Dernières actions de modération')
|
||||
.setDescription(actions.map(formatEntry).join('\n\n'))
|
||||
.setFooter({ text: `${actions.length} dernière(s) action(s)` });
|
||||
.setFooter({ text: `${actions.length} action(s) affichée(s)` });
|
||||
|
||||
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral });
|
||||
}
|
||||
Reference in new issue
Block a user