@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user