Skip to content

Commit

Permalink
Update plural system to fit multiple languages
Browse files Browse the repository at this point in the history
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}.
  • Loading branch information
matteo0003 authored Nov 6, 2024
1 parent dff1a51 commit 2d6aca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generator/transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
<span style={{ textAlign: 'center' }}>
Expand Down

0 comments on commit 2d6aca9

Please sign in to comment.