diff options
| author | 2025-10-23 01:15:26 +0700 | |
|---|---|---|
| committer | 2025-10-23 01:15:26 +0700 | |
| commit | 0d261d2f7d080b610f50102576073e334a89e8cb (patch) | |
| tree | 3f86877a48cdb02486d6b5cb771a420c82c7eacf /locale/localization.go | |
| parent | 695889f42896c1e3f1290a588ac1c5483d0124f0 (diff) | |
| download | web-0d261d2f7d080b610f50102576073e334a89e8cb.tar.gz web-0d261d2f7d080b610f50102576073e334a89e8cb.zip | |
feat: email linking
Diffstat (limited to 'locale/localization.go')
| -rw-r--r-- | locale/localization.go | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/locale/localization.go b/locale/localization.go index 7dbb554..9022b50 100644 --- a/locale/localization.go +++ b/locale/localization.go @@ -8,11 +8,13 @@ import ( ) type LocaleConfig struct { - TagsLabel string `yaml:"TagsLabel" json:"TagsLabel"` - BlogSearch BlogSearchConfig `yaml:"BlogSearch" json:"BlogSearch"` - GlobalMap GlobalMapConfig `yaml:"GlobalMap" json:"GlobalMap"` - HomePage HomePageConfig `yaml:"HomePage" json:"HomePage"` - Metadata MetadataConfig `yaml:"Metadata" json:"Metadata"` + TagsLabel string `yaml:"TagsLabel" json:"TagsLabel"` + BlogSearch BlogSearchConfig `yaml:"BlogSearch" json:"BlogSearch"` + GlobalMap GlobalMapConfig `yaml:"GlobalMap" json:"GlobalMap"` + HomePage HomePageConfig `yaml:"HomePage" json:"HomePage"` + Metadata MetadataConfig `yaml:"Metadata" json:"Metadata"` + Mail MailConfig `yaml:"Mail" json:"Mail"` + UserProfile UserProfileConfig `yaml:"UserProfile" json:"UserProfile"` } type BlogSearchConfig struct { @@ -49,6 +51,43 @@ type MetadataConfig struct { Published string `yaml:"Published" json:"Published"` } +type MailConfig struct { + VerifyEmail VerifyEmailConfig `yaml:"VerifyEmail" json:"VerifyEmail"` + NewPost NewPostConfig `yaml:"NewPost" json:"NewPost"` +} + +type VerifyEmailConfig struct { + Subject string `yaml:"Subject" json:"Subject"` + Welcome string `yaml:"Welcome" json:"Welcome"` + Intro string `yaml:"Intro" json:"Intro"` + GotoLink string `yaml:"GotoLink" json:"GotoLink"` + InputCode string `yaml:"InputCode" json:"InputCode"` + IfRandom string `yaml:"IfRandom" json:"IfRandom"` +} + +type NewPostConfig struct { + Subject string `yaml:"Subject" json:"Subject"` +} + +type UserProfileConfig struct { + Header string `yaml:"Header" json:"Header"` + EmailHeader string `yaml:"EmailHeader" json:"EmailHeader"` + VerificationCodeHeader string `yaml:"VerificationCodeHeader" json:"VerificationCodeHeader"` + TypeEmail string `yaml:"TypeEmail" json:"TypeEmail"` + SendCodeButton string `yaml:"SendCodeButton" json:"SendCodeButton"` + VerifyButton string `yaml:"VerifyButton" json:"VerifyButton"` + VerificationCodeSent string `yaml:"VerificationCodeSent" json:"VerificationCodeSent"` + DelayTilVerification string `yaml:"DelayTilVerification" json:"DelayTilVerification"` + FailedEmailRender string `yaml:"FailedEmailRender" json:"FailedEmailRender"` + VerificationCodeSendingError string `yaml:"VerificationCodeSendingError" json:"VerificationCodeSendingError"` + EmailAlreadyValidated string `yaml:"EmailAlreadyValidated" json:"EmailAlreadyValidated"` + EmailTaken string `yaml:"EmailTaken" json:"EmailTaken"` + EmailEmpty string `yaml:"EmailEmpty" json:"EmailEmpty"` + VerificationSuccess string `yaml:"VerificationSuccess" json:"VerificationSuccess"` + VerificationFailed string `yaml:"VerificationFailed" json:"VerificationFailed"` + VerificationEmpty string `yaml:"VerificationEmpty" json:"VerificationEmpty"` +} + func LoadConfig(path string, config *LocaleConfig) error { fileBytes, err := os.ReadFile(path) if err != nil { |