🐛 Fix the usage of new localization system
This commit is contained in:
@@ -230,7 +230,7 @@ public partial class PostService(
|
||||
Notification = new PushNotification
|
||||
{
|
||||
Topic = "post.replies",
|
||||
Title = localizer.Get("postReplyTitle", args: new { senderNick = sender!.Nick }),
|
||||
Title = localizer.Get("postReplyTitle", args: new { user = sender!.Nick }),
|
||||
Body = ChopPostForNotification(post).content,
|
||||
IsSavable = true,
|
||||
ActionUri = $"/posts/{post.Id}"
|
||||
@@ -704,10 +704,10 @@ public partial class PostService(
|
||||
Notification = new PushNotification
|
||||
{
|
||||
Topic = "posts.reactions.new",
|
||||
Title = localizer.Get("postReactTitle", args: new { senderNick = sender.Nick }),
|
||||
Title = localizer.Get("postReactTitle", args: new { user = sender.Nick }),
|
||||
Body = string.IsNullOrWhiteSpace(post.Title)
|
||||
? localizer.Get("postReactBody", args: new { senderNick = sender.Nick, reaction.Symbol })
|
||||
: localizer.Get("postReactContentBody", args: new { senderNick = sender.Nick, reaction.Symbol, post.Title }),
|
||||
? localizer.Get("postReactBody", args: new { user = sender.Nick, reaction = reaction.Symbol })
|
||||
: localizer.Get("postReactContentBody", args: new { user = sender.Nick, reaction = reaction.Symbol, title = post.Title }),
|
||||
IsSavable = true,
|
||||
ActionUri = $"/posts/{post.Id}"
|
||||
}
|
||||
@@ -1157,10 +1157,10 @@ public partial class PostService(
|
||||
Notification = new PushNotification
|
||||
{
|
||||
Topic = "posts.awards.new",
|
||||
Title = localizer.Get("postAwardedTitle", args: new { senderNick = sender.Nick }),
|
||||
Title = localizer.Get("postAwardedTitle", args: new { user = sender.Nick }),
|
||||
Body = string.IsNullOrWhiteSpace(post.Title)
|
||||
? localizer.Get("postAwardedBody", args: new { senderNick = sender.Nick, amount })
|
||||
: localizer.Get("postAwardedContentBody", args: new { senderNick = sender.Nick, amount, post.Title }),
|
||||
? localizer.Get("postAwardedBody", args: new { user = sender.Nick, amount })
|
||||
: localizer.Get("postAwardedContentBody", args: new { user = sender.Nick, amount, title = post.Title }),
|
||||
IsSavable = true,
|
||||
ActionUri = $"/posts/{post.Id}"
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PublisherSubscriptionService(
|
||||
var notification = new PushNotification
|
||||
{
|
||||
Topic = "posts.new",
|
||||
Title = localizer.Get("postSubscriptionTitle", args: new { publisherNick = post.Publisher!.Nick, title }),
|
||||
Title = localizer.Get("postSubscriptionTitle", args: new { publisher = post.Publisher!.Nick, title }),
|
||||
Body = message,
|
||||
Meta = GrpcTypeHelper.ConvertObjectToByteString(data),
|
||||
IsSavable = true,
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
"subscriptionAppliedTitle": "Subscription {plan} just activated for your account",
|
||||
"subscriptionAppliedBody": "Thank for supporting the Solar Network! Your {days} days {plan} subscription just begun, feel free to explore the newly unlocked features!",
|
||||
"orderPaidTitle": "Order {orderId} recipient",
|
||||
"orderPaidBody": "{amount} {currency} was removed from your wallet to pay for {item}"
|
||||
"orderPaidBody": "{amount} {currency} was removed from your wallet to pay for {remark}"
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
"subscriptionAppliedTitle": "订阅 {plan} 刚刚为您的账户激活",
|
||||
"subscriptionAppliedBody": "感谢您支持 Solar Network!您的 {days} 天 {plan} 订阅刚刚开始,请尽情探索新解锁的功能!",
|
||||
"orderPaidTitle": "订单 {orderId} 收件人",
|
||||
"orderPaidBody": "{amount} {currency} 已从您的钱包中扣除以支付 {item}"
|
||||
"orderPaidBody": "{amount} {currency} 已从您的钱包中扣除以支付 {remark}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user