fix: localize diet notification and type plan options

This commit is contained in:
2026-11-10 13:52:06 +03:00
parent da0ac9d396
commit 28ae75474a
13 changed files with 281 additions and 71 deletions

View File

@@ -1281,12 +1281,15 @@ class _PersonalDietIsDefinedToAuthorWidget extends StatelessWidget {
final PersonalDietIsDefinedToAuthorNotification notification;
@override
Widget build(BuildContext context) {
final userName = notification.userName.isNotEmpty ? notification.userName : 'Пользователь';
final dietName = notification.dietName.isNotEmpty ? ', выбранная диета: «${notification.dietName}»' : '';
final s = S.of(context);
final userName = notification.userName.isNotEmpty ? notification.userName : s.default_user_name;
final notificationsText = notification.dietName.isEmpty
? s.personal_diet_defined_to_author(userName)
: s.personal_diet_defined_to_author_named(userName, notification.dietName);
return _BaseNotificationWidget(
isRead: notification.isRead,
notificationsText: 'Вы предложили персональную диету пользователю $userName$dietName',
notificationsText: notificationsText,
createdAt: notification.createdAt,
onTap: notification.peerSlug.isEmpty
? null