forked from eatvio/eatvio_app
fix: localize diet notification and type plan options
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user