修改默认配置

This commit is contained in:
anian
2026-07-02 19:18:24 +08:00
parent d94008f0fb
commit fc866e23f9
26 changed files with 54 additions and 48 deletions
+10 -14
View File
@@ -117,8 +117,8 @@ func EmailConfigFromInstanceSetting(setting *storepb.InstanceNotificationSetting
func NewTestEmailMessage(recipientEmail, replyTo string) *email.Message {
return &email.Message{
To: []string{recipientEmail},
Subject: "[Memos] Test email",
Body: "This is a test email from your Memos notification settings.",
Subject: "[阿年的备忘录] 测试邮件",
Body: "这是一封测试邮件,说明通知邮件设置已正确配置。",
ReplyTo: replyTo,
}
}
@@ -161,19 +161,17 @@ func (d *EmailDispatcher) buildMemoCommentEmailMessage(message *storepb.InboxMes
}
body := []string{
fmt.Sprintf("Hi %s,", displayNameForEmail(receiver)),
fmt.Sprintf("%s,你好:", displayNameForEmail(receiver)),
"",
fmt.Sprintf("%s commented on your memo.", senderName),
fmt.Sprintf("%s 评论了你的备忘录。", senderName),
"",
"Open in Memos:",
"前往查看:",
url,
"",
"You are receiving this because you own this memo.",
}
return &email.Message{
To: []string{receiver.Email},
Subject: fmt.Sprintf("[Memos] %s commented on your memo", senderName),
Subject: fmt.Sprintf("[阿年的备忘录] %s评论了你的备忘录", senderName),
Body: strings.Join(body, "\n"),
}, nil
}
@@ -193,19 +191,17 @@ func (d *EmailDispatcher) buildMemoMentionEmailMessage(message *storepb.InboxMes
}
body := []string{
fmt.Sprintf("Hi %s,", displayNameForEmail(receiver)),
fmt.Sprintf("%s,你好:", displayNameForEmail(receiver)),
"",
fmt.Sprintf("%s mentioned you in a memo.", senderName),
fmt.Sprintf("%s 在备忘录中提到了你。", senderName),
"",
"Open in Memos:",
"前往查看:",
url,
"",
"You are receiving this because you were mentioned in this memo.",
}
return &email.Message{
To: []string{receiver.Email},
Subject: fmt.Sprintf("[Memos] %s mentioned you in a memo", senderName),
Subject: fmt.Sprintf("[阿年的备忘录] %s在备忘录中提到了你", senderName),
Body: strings.Join(body, "\n"),
}, nil
}
+1 -1
View File
@@ -431,7 +431,7 @@ func getDeleteUserAttachmentStorageSetting(ctx context.Context, stores *store.St
func getDefaultUserGeneralSetting() *v1pb.UserSetting_GeneralSetting {
return &v1pb.UserSetting_GeneralSetting{
Locale: "en",
Locale: "zh-Hans",
MemoVisibility: "PRIVATE",
Theme: "",
}
+5 -5
View File
@@ -329,7 +329,7 @@ func (*RSSService) generateItemTitle(content string) string {
// If title is empty, use a default
if title == "" {
title = "Memo"
title = "阿年的备忘录"
}
return title
@@ -416,9 +416,9 @@ func getRSSHeading(ctx context.Context, stores *store.Store) (RSSHeading, error)
}
if settings == nil || settings.CustomProfile == nil {
return RSSHeading{
Title: "Memos",
Description: "An open source, lightweight note-taking service. Easily capture and share your great thoughts.",
Language: "en-us",
Title: "阿年的备忘录",
Description: "一日不见 如隔三秋",
Language: "zh-Hans",
}, nil
}
customProfile := settings.CustomProfile
@@ -426,6 +426,6 @@ func getRSSHeading(ctx context.Context, stores *store.Store) (RSSHeading, error)
return RSSHeading{
Title: customProfile.Title,
Description: customProfile.Description,
Language: "en-us",
Language: "zh-Hans",
}, nil
}