1
Some checks failed
Deploy API / deploy (push) Failing after 26s

This commit is contained in:
2026-05-25 23:43:55 +08:00
parent b2879720de
commit 12b4ee536e
6 changed files with 114 additions and 33 deletions

View File

@@ -51,6 +51,18 @@ func scanPostTextI18n(zh, en, ja, ko, vi, id, ms string) postTextI18n {
return postTextI18n{TextZh: zh, TextEn: en, TextJa: ja, TextKo: ko, TextVi: vi, TextId: id, TextMs: ms}
}
func (t postTextI18n) toLocalizations() map[string]postLocalePayload {
return map[string]postLocalePayload{
"zh": {Text: t.TextZh},
"en": {Text: t.TextEn},
"ja": {Text: t.TextJa},
"ko": {Text: t.TextKo},
"vi": {Text: t.TextVi},
"id": {Text: t.TextId},
"ms": {Text: t.TextMs},
}
}
func postTextHasLink(text string) bool {
return postLinkRe.MatchString(text)
}