fix: Make translations use plural forms

This commit is contained in:
Sorunome 2021-08-14 12:35:45 +02:00
commit 6d1c0e9338
40 changed files with 935 additions and 1226 deletions

View file

@ -591,7 +591,7 @@ class BackgroundPush {
client.rooms.forEach((Room room) => unreadEvents += room.notificationCount);
// Calculate title
final title = l10n.unreadMessages(room.notificationCount.toString());
final title = l10n.unreadMessages(room.notificationCount);
// Calculate the body
final body = event?.getLocalizedBody(
@ -671,7 +671,7 @@ class BackgroundPush {
android: androidPlatformChannelSpecifics,
iOS: iOSPlatformChannelSpecifics,
);
final title = l10n.unreadChats(unread.toString());
final title = l10n.unreadChats(unread);
await _flutterLocalNotificationsPlugin.show(
await mapRoomIdToInt(roomId),
title,

View file

@ -92,8 +92,7 @@ extension RoomStatusExtension on Room {
lastReceipts.last.calcDisplayname());
} else if (lastReceipts.length > 2) {
seenByText = L10n.of(context).seenByUserAndCountOthers(
lastReceipts.first.calcDisplayname(),
(lastReceipts.length - 1).toString());
lastReceipts.first.calcDisplayname(), lastReceipts.length - 1);
}
}
return seenByText;