Feat:edu frontend (#17251)
Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
This commit is contained in:
parent
4b5ec242e7
commit
d1801b1f2e
37 changed files with 1115 additions and 51 deletions
47
web/i18n/en-US/education.ts
Normal file
47
web/i18n/en-US/education.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
const translation = {
|
||||
toVerified: 'Get Education Verified',
|
||||
toVerifiedTip: {
|
||||
front: 'You are now eligible for Education Verified status. Please enter your education information below to complete the process and receive an',
|
||||
coupon: 'exclusive 50% coupon',
|
||||
end: 'for the Dify Professional Plan.',
|
||||
},
|
||||
currentSigned: 'CURRENTLY SIGNED IN AS',
|
||||
form: {
|
||||
schoolName: {
|
||||
title: 'Your School Name',
|
||||
placeholder: 'Enter the official, unabbreviated name of your school',
|
||||
},
|
||||
schoolRole: {
|
||||
title: 'Your School Role',
|
||||
option: {
|
||||
student: 'Student',
|
||||
teacher: 'Teacher',
|
||||
administrator: 'School Administrator',
|
||||
},
|
||||
},
|
||||
terms: {
|
||||
title: 'Terms & Agreements',
|
||||
desc: {
|
||||
front: 'Your information and use of Education Verified status are subject to our',
|
||||
and: 'and',
|
||||
end: '. By submitting:',
|
||||
termsOfService: 'Terms of Service',
|
||||
privacyPolicy: 'Privacy Policy',
|
||||
},
|
||||
option: {
|
||||
age: 'I confirm I am at least 18 years old',
|
||||
inSchool: 'I confirm I am enrolled or employed at the institution provided. Dify may request proof of enrollment/employment. If I misrepresent my eligibility, I agree to pay any fees initially waived based on my education status.',
|
||||
},
|
||||
},
|
||||
},
|
||||
submit: 'Submit',
|
||||
submitError: 'Form submission failed. Please try again later.',
|
||||
learn: 'Learn how to get education verified',
|
||||
successTitle: 'You Have Got Dify Education Verified',
|
||||
successContent: 'We have issued a 50% discount coupon for the Dify Professional plan to your account. The coupon is valid for one year, please use it within the validity period.',
|
||||
rejectTitle: 'Your Dify Educational Verification Has Been Rejected',
|
||||
rejectContent: 'Unfortunately, you are not eligible for Education Verified status and therefore cannot receive the exclusive 50% coupon for the Dify Professional Plan if you use this email address.',
|
||||
emailLabel: 'Your current email',
|
||||
}
|
||||
|
||||
export default translation
|
||||
|
|
@ -4,6 +4,18 @@ import { initReactI18next } from 'react-i18next'
|
|||
|
||||
import { LanguagesSupported } from '@/i18n/language'
|
||||
|
||||
const requireSilent = (lang: string) => {
|
||||
let res
|
||||
try {
|
||||
res = require(`./${lang}/education`).default
|
||||
}
|
||||
catch {
|
||||
res = require('./en-US/education').default
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
const loadLangResources = (lang: string) => ({
|
||||
translation: {
|
||||
common: require(`./${lang}/common`).default,
|
||||
|
|
@ -31,6 +43,7 @@ const loadLangResources = (lang: string) => ({
|
|||
plugin: require(`./${lang}/plugin`).default,
|
||||
pluginTags: require(`./${lang}/plugin-tags`).default,
|
||||
time: require(`./${lang}/time`).default,
|
||||
education: requireSilent(lang),
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
47
web/i18n/ja-JP/education.ts
Normal file
47
web/i18n/ja-JP/education.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
const translation = {
|
||||
toVerified: '教育認証を取得',
|
||||
toVerifiedTip: {
|
||||
front: '現在、教育認証ステータスを取得する資格があります。以下に教育情報を入力し、認証プロセスを完了すると、Difyプロフェッショナルプランの',
|
||||
coupon: '50%割引クーポン',
|
||||
end: 'を受け取ることができます。',
|
||||
},
|
||||
currentSigned: '現在ログイン中のアカウントは',
|
||||
form: {
|
||||
schoolName: {
|
||||
title: '学校名',
|
||||
placeholder: '学校の正式名称(省略不可)を入力してください。',
|
||||
},
|
||||
schoolRole: {
|
||||
title: '学校での役割',
|
||||
option: {
|
||||
student: '学生',
|
||||
teacher: '教師',
|
||||
administrator: '学校管理者',
|
||||
},
|
||||
},
|
||||
terms: {
|
||||
title: '利用規約と同意事項',
|
||||
desc: {
|
||||
front: 'お客様の情報および 教育認証ステータス の利用は、当社の ',
|
||||
and: 'および',
|
||||
end: 'に従うものとします。送信することで以下を確認します:',
|
||||
termsOfService: '利用規約',
|
||||
privacyPolicy: 'プライバシーポリシー',
|
||||
},
|
||||
option: {
|
||||
age: '18歳以上であることを確認します。',
|
||||
inSchool: '提供した教育機関に在籍または勤務している ことを確認します。Difyは在籍/雇用証明の提出を求める場合があります。不正な情報を申告した場合、教育認証に基づき免除された費用を支払うことに同意します。',
|
||||
},
|
||||
},
|
||||
},
|
||||
submit: '送信',
|
||||
submitError: 'フォームの送信に失敗しました。しばらくしてから再度ご提出ください。',
|
||||
learn: '教育認証の取得方法はこちら',
|
||||
successTitle: 'Dify教育認証を取得しました!',
|
||||
successContent: 'お客様のアカウントに Difyプロフェッショナルプランの50%割引クーポン を発行しました。有効期間は 1年間 ですので、期限内にご利用ください。',
|
||||
rejectTitle: 'Dify教育認証が拒否されました',
|
||||
rejectContent: '申し訳ございませんが、このメールアドレスでは 教育認証 の資格を取得できず、Difyプロフェッショナルプランの50%割引クーポン を受け取ることはできません。',
|
||||
emailLabel: '現在のメールアドレス',
|
||||
}
|
||||
|
||||
export default translation
|
||||
48
web/i18n/zh-Hans/education.ts
Normal file
48
web/i18n/zh-Hans/education.ts
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
const translation = {
|
||||
toVerified: '获取教育版认证',
|
||||
toVerifiedTip: {
|
||||
front: '您现在符合教育版认证的资格。请在下方输入您的教育信息,以完成认证流程,并领取 Dify Professional 版的',
|
||||
coupon: '50% 独家优惠券',
|
||||
end: '。',
|
||||
},
|
||||
currentSigned: '您当前登录的账户是',
|
||||
form: {
|
||||
schoolName: {
|
||||
title: '您的学校名称',
|
||||
placeholder: '请输入您的学校的官方全称(不得缩写)',
|
||||
},
|
||||
schoolRole: {
|
||||
title: '您在学校的身份',
|
||||
option: {
|
||||
student: '学生',
|
||||
teacher: '教师',
|
||||
administrator: '学校管理员',
|
||||
},
|
||||
},
|
||||
terms: {
|
||||
title: '条款与协议',
|
||||
desc: {
|
||||
front: '您的信息和教育版认证资格的使用需遵守我们的',
|
||||
and: '和',
|
||||
end: '。提交即表示:',
|
||||
termsOfService: '服务条款',
|
||||
privacyPolicy: '隐私政策',
|
||||
},
|
||||
option: {
|
||||
age: '我确认我已年满 18 周岁。',
|
||||
inSchool: '我确认我目前已在提供的学校入学或受雇。Dify 可能会要求提供入学/雇佣证明。如我虚报资格,我同意支付因教育版认证而被减免的费用。',
|
||||
},
|
||||
},
|
||||
},
|
||||
submit: '提交',
|
||||
submitError: '提交表单失败,请稍后重新提交问卷。',
|
||||
learn: '了解如何获取教育版认证',
|
||||
successTitle: '您已成功获得 Dify 教育版认证!',
|
||||
successContent: '我们已向您的账户发放 Dify Professional 版 50% 折扣优惠券。该优惠券有效期为一年,请在有效期内使用。',
|
||||
rejectTitle: '您的 Dify 教育版认证已被拒绝',
|
||||
rejectContent: '非常遗憾,您无法使用此电子邮件以获得教育版认证资格,也无法领取 Dify Professional 版的 50% 独家优惠券。',
|
||||
emailLabel: '您当前的邮箱',
|
||||
|
||||
}
|
||||
|
||||
export default translation
|
||||
Loading…
Add table
Add a link
Reference in a new issue