TF-4029 Fix singular vs plural for attachments

This commit is contained in:
dab246
2025-09-19 09:58:02 +07:00
committed by Dat H. Pham
parent e75bdad5df
commit 993cdb235a
10 changed files with 95 additions and 11 deletions
@@ -100,7 +100,9 @@ extension ComposerPrintDraftExtension on ComposerController {
ccPrefix: appLocalizations.cc_email_address_prefix,
bccPrefix: appLocalizations.bcc_email_address_prefix,
replyToPrefix: appLocalizations.replyToEmailAddressPrefix,
titleAttachment: appLocalizations.attachments.toLowerCase(),
titleAttachment: uploadController.allAttachmentsUploaded.length > 1
? appLocalizations.attachments.toLowerCase()
: appLocalizations.attachment.toLowerCase(),
toAddress: listToEmailAddress.toSet().listEmailAddressToString(
isFullEmailAddress: true,
),
@@ -57,7 +57,9 @@ class AttachmentHeaderComposerWidget extends StatelessWidget {
),
const SizedBox(width: AttachmentHeaderComposerWidgetStyle.space / 2),
Text(
'${listFileUploaded.length} ${AppLocalizations.of(context).attachments}',
listFileUploaded.length > 1
? '${listFileUploaded.length} ${AppLocalizations.of(context).attachments}'
: '${listFileUploaded.length} ${AppLocalizations.of(context).attachment}',
style: AttachmentHeaderComposerWidgetStyle.labelTextSize
),
const SizedBox(width: AttachmentHeaderComposerWidgetStyle.space),