From 2d6aca961ae1c5294a5e0d3d6a1c1d7ed2a3f14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o?= <90149725+matteo0003@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:11:39 +0100 Subject: [PATCH] Update plural system to fit multiple languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change permits to replace all the iterations of "{s}" present in the footer message so it can fit with other languages like French. Example: 5 message{s} exporté{s}. --- src/generator/transcript.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator/transcript.tsx b/src/generator/transcript.tsx index 5fc42cb..7a03c2d 100644 --- a/src/generator/transcript.tsx +++ b/src/generator/transcript.tsx @@ -55,7 +55,7 @@ export default async function DiscordMessages({ messages, channel, callbacks, .. {options.footerText ? options.footerText .replaceAll('{number}', messages.length.toString()) - .replace('{s}', messages.length > 1 ? 's' : '') + .replaceAll('{s}', messages.length > 1 ? 's' : '') : `Exported ${messages.length} message${messages.length > 1 ? 's' : ''}.`}{' '} {options.poweredBy ? (