mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
feat(i18n): update email notification translations across multiple languages for improved clarity and consistency
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "Benachrichtigung zum Share-Download - {{.SiteURL}}"
|
||||
other = "Benachrichtigung zum Zugriff auf die Freigabe - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "Ihr geteilter {{.ShareType}} {{.FileName}} wurde heruntergeladen."
|
||||
[notify_email_intro]
|
||||
other = "Ihre Freigabe wurde von einem anderen Nutzer abgerufen"
|
||||
|
||||
[share_type_file]
|
||||
other = "Datei"
|
||||
|
||||
[share_type_text]
|
||||
other = "Text"
|
||||
[notify_email_label_region]
|
||||
other = "Region"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "Share download notification - {{.SiteURL}}"
|
||||
other = "Share access notification - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "Your shared {{.ShareType}} {{.FileName}} was downloaded."
|
||||
[notify_email_intro]
|
||||
other = "Your share has been accessed by another user"
|
||||
|
||||
[share_type_file]
|
||||
other = "file"
|
||||
|
||||
[share_type_text]
|
||||
other = "text"
|
||||
[notify_email_label_region]
|
||||
other = "Region"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "Notification de téléchargement du partage - {{.SiteURL}}"
|
||||
other = "Notification d'accès au partage - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "Votre {{.ShareType}} partagé {{.FileName}} a été téléchargé."
|
||||
[notify_email_intro]
|
||||
other = "Votre partage a été consulté par un autre utilisateur"
|
||||
|
||||
[share_type_file]
|
||||
other = "fichier"
|
||||
|
||||
[share_type_text]
|
||||
other = "texte"
|
||||
[notify_email_label_region]
|
||||
other = "Région"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "共有ダウンロード通知 - {{.SiteURL}}"
|
||||
other = "共有アクセス通知 - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "共有した{{.ShareType}} {{.FileName}} がダウンロードされました。"
|
||||
[notify_email_intro]
|
||||
other = "あなたの共有が別のユーザーにアクセスされました"
|
||||
|
||||
[share_type_file]
|
||||
other = "ファイル"
|
||||
|
||||
[share_type_text]
|
||||
other = "テキスト"
|
||||
[notify_email_label_region]
|
||||
other = "地域"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "공유 다운로드 알림 - {{.SiteURL}}"
|
||||
other = "공유 접근 알림 - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "공유한 {{.ShareType}} {{.FileName}} 이(가) 다운로드되었습니다."
|
||||
[notify_email_intro]
|
||||
other = "공유가 다른 사용자에 의해 접근되었습니다"
|
||||
|
||||
[share_type_file]
|
||||
other = "파일"
|
||||
|
||||
[share_type_text]
|
||||
other = "텍스트"
|
||||
[notify_email_label_region]
|
||||
other = "지역"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "分享下载通知 - {{.SiteURL}}"
|
||||
other = "分享访问通知 - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "IP为{{.IP}}的访客下载了你的{{.FileName}}的{{.ShareType}}。"
|
||||
[notify_email_intro]
|
||||
other = "您的分享已被其他用户访问"
|
||||
|
||||
[share_type_file]
|
||||
other = "文件"
|
||||
|
||||
[share_type_text]
|
||||
other = "文本"
|
||||
[notify_email_label_region]
|
||||
other = "区域"
|
||||
@@ -1,11 +1,8 @@
|
||||
[notify_email_subject]
|
||||
other = "分享下載通知 - {{.SiteURL}}"
|
||||
other = "分享存取通知 - {{.SiteURL}}"
|
||||
|
||||
[notify_email_body]
|
||||
other = "IP為{{.IP}}的訪客下載了你的{{.FileName}}的{{.ShareType}}。"
|
||||
[notify_email_intro]
|
||||
other = "您的分享已被其他用戶存取"
|
||||
|
||||
[share_type_file]
|
||||
other = "檔案"
|
||||
|
||||
[share_type_text]
|
||||
other = "文字"
|
||||
[notify_email_label_region]
|
||||
other = "區域"
|
||||
|
||||
49
pkg/mail/emails/pull-notify.tsx
Normal file
49
pkg/mail/emails/pull-notify.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { Body, Container, Head, Heading, Html, Tailwind, Text, Img, Row, Column, Hr, Link } from 'react-email'
|
||||
|
||||
export const NotionMagicLinkEmail = () => (
|
||||
<Html>
|
||||
<Head />
|
||||
<Tailwind>
|
||||
<Body className="bg-white">
|
||||
<Container className="mx-auto px-3">
|
||||
<Heading className="my-10 p-0 font-sans font-bold text-[#333333] text-xl">EMAIL-TITLE</Heading>
|
||||
<Text>EMAIL-INTRO</Text>
|
||||
<Row className='rounded-xl bg-gray-200 p-3'>
|
||||
<Column className='rounded-xl bg-gray-100' align="center">
|
||||
<Img src="https://github.com/microsoft/fluentui-emoji/blob/main/assets/Spiral%20notepad/3D/EMAIL-FILEICON_3d.png?raw=true" className='size-10' style={{ display: 'block', margin: 'auto' }} />
|
||||
</Column>
|
||||
<Column className='w-full pl-3'>
|
||||
<Text className='m-0'>
|
||||
EMAIL-FILENAME
|
||||
</Text>
|
||||
</Column>
|
||||
</Row>
|
||||
<Row className='my-10 text-center'>
|
||||
<Column className='w-1/2'>
|
||||
<Text className='m-0 text-xl font-bold'>
|
||||
EMAIL-IP
|
||||
</Text>
|
||||
<Text className='text-sm opacity-50 m-0'>
|
||||
IP
|
||||
</Text>
|
||||
</Column>
|
||||
<Column className='w-1/2'>
|
||||
<Text className='m-0 text-xl font-bold'>
|
||||
EMAIL-REGION
|
||||
</Text>
|
||||
<Text className='text-sm opacity-50 m-0'>
|
||||
EMAIL-LABEL-REGION
|
||||
</Text>
|
||||
</Column>
|
||||
</Row>
|
||||
<Hr className="my-4 border-gray-300 border-t-2" />
|
||||
<Text className='m-0 text-sm'>
|
||||
Powered by <Link href="https://github.com/keven1024/015" className='text-blue-500'>015</Link>
|
||||
</Text>
|
||||
</Container>
|
||||
</Body>
|
||||
</Tailwind>
|
||||
</Html>
|
||||
)
|
||||
|
||||
export default NotionMagicLinkEmail
|
||||
3
pkg/mail/go.mod
Normal file
3
pkg/mail/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module pkg/mail
|
||||
|
||||
go 1.25.5
|
||||
29
pkg/mail/mail.go
Normal file
29
pkg/mail/mail.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package mail
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:embed out/*.html
|
||||
var templates embed.FS
|
||||
|
||||
func GetMailTemplate(name string) (string, error) {
|
||||
data, err := templates.ReadFile(fmt.Sprintf("out/%s.html", name))
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("mail template %q not found", name)
|
||||
}
|
||||
return string(data), nil
|
||||
}
|
||||
|
||||
func RenderMailTemplate(name string, vars map[string]string) (string, error) {
|
||||
html, err := GetMailTemplate(name)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
for k, v := range vars {
|
||||
html = strings.ReplaceAll(html, k, v)
|
||||
}
|
||||
return html, nil
|
||||
}
|
||||
20
pkg/mail/package.json
Normal file
20
pkg/mail/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "react-email-starter",
|
||||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "email build",
|
||||
"dev": "email dev",
|
||||
"export": "email export"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-email": "6.0.7",
|
||||
"react-dom": "19.2.4",
|
||||
"react": "19.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@react-email/ui": "6.0.7",
|
||||
"@types/react": "19.2.14",
|
||||
"@types/react-dom": "19.2.3"
|
||||
}
|
||||
}
|
||||
14
pkg/mail/tsconfig.json
Normal file
14
pkg/mail/tsconfig.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": false,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "react-jsx",
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"strictNullChecks": true
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules", ".react-email"]
|
||||
}
|
||||
Reference in New Issue
Block a user