🐛 Fix the usage of new localization system

This commit is contained in:
2026-02-05 16:03:09 +08:00
parent 769b0e0e9c
commit 3c0f5b0e41
9 changed files with 24 additions and 24 deletions

View File

@@ -466,12 +466,12 @@ public class AccountService(
contact.Content,
localizer.Get("codeEmailTitle", account.Language),
"FactorCode",
account.Language,
new VerificationEmailModel
{
Name = account.Name,
Code = code
}
},
account.Language
);
await _SetFactorCode(factor, code, TimeSpan.FromMinutes(30));

View File

@@ -99,12 +99,12 @@ public class MagicSpellService(
contact.Content,
localizer.Get("regConfirmTitle", accountLanguage),
"Welcome",
accountLanguage,
new LandingEmailModel
{
Name = contact.Account.Name,
Link = link
}
},
accountLanguage
);
break;
case MagicSpellType.AccountRemoval:
@@ -113,12 +113,12 @@ public class MagicSpellService(
contact.Content,
localizer.Get("accountDeletionTitle", accountLanguage),
"AccountDeletion",
accountLanguage,
new AccountDeletionEmailModel
{
Name = contact.Account.Name,
Link = link
}
},
accountLanguage
);
break;
case MagicSpellType.AuthPasswordReset:
@@ -127,12 +127,12 @@ public class MagicSpellService(
contact.Content,
localizer.Get("passwordResetTitle", accountLanguage),
"PasswordReset",
accountLanguage,
new PasswordResetEmailModel
{
Name = contact.Account.Name,
Link = link
}
},
accountLanguage
);
break;
case MagicSpellType.ContactVerification:
@@ -143,12 +143,12 @@ public class MagicSpellService(
contactMethod!,
localizer.Get("contractMethodVerificationTitle", accountLanguage),
"ContactVerification",
accountLanguage,
new ContactVerificationEmailModel
{
Name = contact.Account.Name,
Link = link
}
},
accountLanguage
);
break;
case MagicSpellType.AccountDeactivation:

View File

@@ -117,7 +117,7 @@ public class RelationshipService(
Notification = new PushNotification
{
Topic = "relationships.friends.request",
Title = localizer.Get("friendRequestTitle", locale: sender.Language, args: new { sender.Nick }),
Title = localizer.Get("friendRequestTitle", locale: sender.Language, args: new { sender = sender.Nick }),
Body = localizer.Get("friendRequestBody", locale: sender.Language),
ActionUri = "/account/relationships",
IsSavable = true