migrate from github

This commit is contained in:
2026-07-15 22:42:31 +08:00
commit 3ad559f05e
262 changed files with 21637 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package constant
// Notification type constants.
const (
NotificationType_Comment = "comment"
NotificationType_Reply = "reply"
NotificationType_Mention = "mention"
NotificationType_System = "system"
)
// notificationTitles holds default (zh-CN) titles keyed by notification type.
// Replace with a proper i18n lookup once multi-language support is added.
var notificationTitles = map[string]string{
NotificationType_Comment: "收到新评论",
NotificationType_Reply: "回复了你的评论",
NotificationType_Mention: "在评论中提及了你",
NotificationType_System: "系统通知",
}
// GetNotificationTitle returns the default title for the given notification type.
// Falls back to the type string itself if the type is unrecognised.
func GetNotificationTitle(notifType string) string {
if title, ok := notificationTitles[notifType]; ok {
return title
}
return notifType
}