From 9c2a1dcfd333174f3b3fdc76d84cc2b978c2fcdf Mon Sep 17 00:00:00 2001 From: KUN1007 Date: Fri, 13 Oct 2023 22:03:26 +0800 Subject: [PATCH] feat: user page i18n --- src/language/en.ts | 58 +++++++++++++++++++ src/language/zh.ts | 57 ++++++++++++++++++ .../components/header/ArticleHeader.vue | 2 +- src/views/kungalgamer/KUNGalgamer.vue | 2 + src/views/kungalgamer/components/Avatar.vue | 29 +++++++--- src/views/kungalgamer/components/NavBar.vue | 2 +- src/views/kungalgamer/components/routeName.ts | 16 ++--- src/views/kungalgamer/content/Info.vue | 56 +++++++++++++----- src/views/kungalgamer/content/Password.vue | 41 ++++++++----- src/views/kungalgamer/content/Settings.vue | 12 ++-- 10 files changed, 225 insertions(+), 50 deletions(-) diff --git a/src/language/en.ts b/src/language/en.ts index cf841c9b..6cc94f4d 100644 --- a/src/language/en.ts +++ b/src/language/en.ts @@ -208,6 +208,64 @@ export default { privacy: 'Privacy Policy', }, }, + user: { + user: 'User', + admin: 'Administrator', + SU: 'Super Admin', + normal: 'Normal', + banned: 'Banned', + nav: { + profile: 'Profile', + settings: 'Settings', + email: 'Email', + published: 'Published', + liked: 'Liked', + upvote: 'Upvote', + reply: 'Reply', + comment: 'Comment', + }, + profile: { + name: 'Name', + moemoepoint: 'MoeMoePoint', + register: 'Registration Number', + roles: 'Roles', + status: 'Status', + upvote: 'Number of Upvotes', + like: 'Number of Likes', + dislike: 'Number of Dislikes', + today: 'Published Today', + topic: 'Number of Topics', + reply: 'Number of Replies', + comment: 'Number of Comments', + time: 'Registration Date', + bio: 'Bio', + null: `Please fill this loli in because she hasn't left anything`, + }, + settings: { + avatar: 'Change Avatar', + drag: 'Drag and drop an image into the box OR', + click: 'Click to upload', + supportImage: 'Supports images up to 1007KB', + supportFormat: 'Supports jpg and png formats', + confirm: 'Confirm', + bio: 'Change Bio', + hint: 'Please enter your new signature, up to 107 characters', + count: 'Character count', + }, + email: { + email: 'Change Email', + current: 'Your current email is', + newEmail: 'Please enter your new email', + code: 'Please enter the verification code', + send: 'Send Code', + confirmEmail: 'Confirm Change', + pwd: 'Change Password', + oldPwd: 'Please enter your old password', + newPwd: 'Please enter your new password', + rePwd: 'Please enter your new password again', + confirmPwd: 'Confirm Password Change', + }, + }, // 非页面组件这里统一用大驼峰 ComponentAlert: { confirm: 'OK', diff --git a/src/language/zh.ts b/src/language/zh.ts index 64fe5252..370fb5d5 100644 --- a/src/language/zh.ts +++ b/src/language/zh.ts @@ -207,6 +207,63 @@ export default { privacy: '隐私政策', }, }, + user: { + user: '用户', + admin: '管理员', + SU: '超级管理员', + normal: '正常', + banned: '封禁', + nav: { + profile: '个人信息', + settings: '信息设置', + email: '邮箱密码', + published: '发的话题', + liked: '赞的话题', + upvote: '推的话题', + reply: '发的回复', + comment: '发的评论', + }, + profile: { + name: '用户名', + moemoepoint: '萌萌点', + register: '注册序号', + roles: '角色', + status: '状态', + upvote: '被推数', + like: '被赞数', + dislike: '被踩数', + today: '今日发表', + topic: '话题数', + reply: '回复数', + comment: '评论数', + time: '注册时间', + bio: '签名', + null: `请填满这只萝莉吧,因为她什么都没留下`, + }, + settings: { + avatar: '更改头像', + drag: '拖拽图片到方框内或点击方框上传', + supportImage: '支持 1007KB 以内的图片', + supportFormat: '支持 jpg 和 png 格式', + confirm: '确定更改', + bio: '更改签名', + hint: '输入您的新签名,最大 107 个字符', + count: '字数', + }, + email: { + email: '更改邮箱', + current: '您当前的邮箱是', + newEmail: '请输入您的新邮箱', + code: '请输入您的验证码', + send: '发送验证码', + confirmEmail: '确定更改邮箱', + pwd: '更改密码', + oldPwd: '请输入您的旧密码', + newPwd: '请输入您的新密码', + rePwd: '请再次输入新密码', + confirmPwd: '确定更改密码', + }, + }, // 非页面组件这里统一用大驼峰 ComponentAlert: { confirm: '确定', diff --git a/src/views/Home/content/article/components/header/ArticleHeader.vue b/src/views/Home/content/article/components/header/ArticleHeader.vue index 0bcc28bb..93f6da76 100644 --- a/src/views/Home/content/article/components/header/ArticleHeader.vue +++ b/src/views/Home/content/article/components/header/ArticleHeader.vue @@ -16,7 +16,7 @@ const category = ['Galgame'] - + {{ $tm('mainPage.header.all') }} diff --git a/src/views/kungalgamer/KUNGalgamer.vue b/src/views/kungalgamer/KUNGalgamer.vue index 6bb9de92..ec36f8ed 100644 --- a/src/views/kungalgamer/KUNGalgamer.vue +++ b/src/views/kungalgamer/KUNGalgamer.vue @@ -53,6 +53,7 @@ onMounted(async () => { diff --git a/src/views/kungalgamer/content/Password.vue b/src/views/kungalgamer/content/Password.vue index e39682df..1feeb500 100644 --- a/src/views/kungalgamer/content/Password.vue +++ b/src/views/kungalgamer/content/Password.vue @@ -144,43 +144,56 @@ const handleClickForgotPassword = () => {
-
更改密码:
+
{{ $tm('user.email.pwd') }}:
+
- 请输入您的旧密码: + {{ $tm('user.email.oldPwd') }}:
+
- 请输入您的新密码: + {{ $tm('user.email.newPwd') }}:
+
- 请再次输入新密码: + {{ $tm('user.email.rePwd') }}:
- +
@@ -219,7 +232,8 @@ const handleClickForgotPassword = () => { .input { margin: 10px 0; display: flex; - justify-content: space-around; + justify-content: space-between; + padding: 0 30px; input { height: 25px; padding-left: 5px; @@ -274,6 +288,7 @@ const handleClickForgotPassword = () => { font-size: medium; } .input { + padding: 0; span { margin-right: 5px; } diff --git a/src/views/kungalgamer/content/Settings.vue b/src/views/kungalgamer/content/Settings.vue index 0dfd6151..e4cffd1a 100644 --- a/src/views/kungalgamer/content/Settings.vue +++ b/src/views/kungalgamer/content/Settings.vue @@ -42,18 +42,22 @@ const handleChangeBio = async () => {
-
更改签名
+
{{ $tm('user.settings.bio') }}
- 字数:{{ bioValue.length }} - + + {{ $tm('user.settings.count') }}: {{ bioValue.length }} + +