Browse Source

feature: add missing translation and chinese translation

tags/v2.1.8
winkidney 2 years ago
parent
commit
7d85f6fe04
5 changed files with 96 additions and 7 deletions
  1. +5
    -1
      pinry-spa/src/assets/locales/en.json
  2. +83
    -0
      pinry-spa/src/assets/locales/zh.json
  3. +3
    -3
      pinry-spa/src/components/BoardEdit.vue
  4. +3
    -3
      pinry-spa/src/components/pin_edit/PinCreateModal.vue
  5. +2
    -0
      pinry-spa/src/main.js

+ 5
- 1
pinry-spa/src/assets/locales/en.json View File

@@ -1,4 +1,8 @@
{
"NewPinTitle": "New Pin",
"EditPinTitle": "Edit Pin",
"BoardCreateTitle": "Create Board",
"BoardEditTitle": "Edit Board",
"loginTitle": "Login",
"loginButton": "Login",
"closeButton": "Close",
@@ -76,4 +80,4 @@
"tagsLabel": "Tags",
"descriptionLabel": "Descripton",
"selectBoardLabel": "Select Board"
}
}

+ 83
- 0
pinry-spa/src/assets/locales/zh.json View File

@@ -0,0 +1,83 @@
{
"NewPinTitle": "创建 Pin",
"EditPinTitle": "编辑 Pin",
"BoardCreateTitle": "创建画板",
"BoardEditTitle": "编辑画板",
"loginTitle": "登录",
"loginButton": "登录",
"closeButton": "关闭",
"end": "没有更多啦",
"bookmarkletLink": "Pinry书签助手",
"createLink": "新建",
"pinLink": "Pin",
"boardLink": "画板",
"myLink": "我的",
"boardsLink": "画板",
"pinsLink": "Pin",
"profileLink": "个人资料",
"browserExtensionsLink": "浏览器插件",
"chromeLink": "Chrome",
"firefoxLink": "Firefox",
"signUpLink": "注册",
"logInLink": "登录",
"logOutLink": "登出",
"signUpTitle": "注册",
"registerButton": "注册",
"pageNotFound": "哇!你想找的灵感不在这里诶",
"error404": "404 Not Found",
"pinsInBoard": "画板内 Pin: ",
"isPrivateCheckbox": "设为私有",
"createBoardButton": "创建画板",
"saveChangesButton": "保存更改",
"pinnedByTitle": "创建者 ",
"sourceButton": "来源链接",
"originalImageButton": "原图链接",
"permalinkButton": "分享链接",
"pinnedByInfo": "创建者",
"sourceLink": "来源",
"userProfileCardContent": "也许是另一个 Piny 用户",
"pinsUserProfileCardLink": "Pin",
"boardsUserProfileCardLink": "画板",
"profileUserProfileCardLink": "个人资料",
"tokenUserProfileCardTitle": "Token",
"tokenUserProfileCardContent": "你的 Token 是:",
"pleaseReadTokenUserProfileCardContent": "请参阅 ",
"forMoreDetailsParagraph": " 获取更多关于如何使用的详情",
"drfApiDocumentationLink": "DRF API 文档",
"searchButton": "搜索",
"noResultsFound": "没有找到任何结果",
"SearchPanelBoardOption": "画板",
"SearchPanelTagOption": "标签",
"Add2BoardModalCardTitle": "添加到画板",
"Add2BoardModalCardButton": "添加到画板",
"FileUploadDescription": "拖拽图片或者点击上传",
"filterSelectCreateNewBoardButton": "创建新画板",
"pinCreateModalEmptySlot": "没有内容",
"pinCreateModalCreatePinButton": "创建 Pin",
"pinCreateModalSaveChangesButton": "保存更改",
"passwordSignUpPlaceholder": "密码",
"passwordLoginPlaceholder": "密码",
"boardNamePlaceholder": "画板名称",
"usernamePlaceholder": "用户名",
"emailPlaceholder": "邮件地址",
"repeatPasswordInputPlaceholder": "再次键入密码",
"chooseFilterPlaceholder": "选择过滤器",
"selectFilterPlaceholder": "选择一个过滤器并过滤",
"searchBoardPlaceholder": "键入关键字搜索画板",
"filterSelectSelectBoardPlaceholder": "关键字查找或新建画板",
"pinCreateModalImageURLPlaceholder": "图片 URL 地址",
"pinCreateModalImageSourcePlaceholder": "你在哪个页面找到这个 Pin",
"pinCreateModalImageTagsPlaceholder": "英文逗号分隔标签",
"pinCreateModalImageDescriptionPlaceholder": "这个 Pin 给你什么灵感?",
"emailLabel": "邮箱",
"usernameLabel": "用户名",
"passwordLabel": "密码",
"repeatPasswordLabel": "重复一次密码",
"nameLabel": "名字",
"privacyOptionLabel": "隐私选项",
"imageUrlLabel": "图片 URL 地址",
"imageSourceLabel": "图片来源",
"tagsLabel": "标签",
"descriptionLabel": "描述",
"selectBoardLabel": "选择画板"
}

+ 3
- 3
pinry-spa/src/components/BoardEdit.vue View File

@@ -3,7 +3,7 @@
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">{{ UIMeta.title }}</p>
<p class="modal-card-title">{{ $t(UIMeta.title) }}</p>
</header>
<section class="modal-card-body">
<div v-if="!isEdit">
@@ -79,7 +79,7 @@ export default {
const editModel = ModelForm.fromFields(fields);
return {
UIMeta: {
title: 'Board Create',
title: 'BoardCreateTitle',
},
createModel,
editModel,
@@ -99,7 +99,7 @@ export default {
},
created() {
if (this.isEdit) {
this.UIMeta.title = 'Board Edit';
this.UIMeta.title = 'BoardEditTitle';
this.editModel.assignToForm(this.board);
} else {
this.createModel.form.private.value = false;


+ 3
- 3
pinry-spa/src/components/pin_edit/PinCreateModal.vue View File

@@ -3,7 +3,7 @@
<div>
<div class="modal-card" style="width: auto">
<header class="modal-card-head">
<p class="modal-card-title">{{ editorMeta.title }}</p>
<p class="modal-card-title">{{ $t(editorMeta.title) }}</p>
</header>
<section class="modal-card-body">
<div class="columns">
@@ -158,7 +158,7 @@ export default {
boardOptions: [],
tagOptions: [],
editorMeta: {
title: 'New Pin',
title: 'NewPinTitle',
filteredTagOptions: [],
},
};
@@ -167,7 +167,7 @@ export default {
this.fetchBoardList();
this.fetchTagList();
if (this.isEdit) {
this.editorMeta.title = 'Edit Pin';
this.editorMeta.title = 'EditPinTitle';
this.pinModel.form.url.value = this.existedPin.url;
this.pinModel.form.referer.value = this.existedPin.referer;
this.pinModel.form.description.value = this.existedPin.description;


+ 2
- 0
pinry-spa/src/main.js View File

@@ -7,9 +7,11 @@ import router from './router';
import setUpAxiosCsrfConfig from './components/utils/csrf';
import './registerServiceWorker';
import en from './assets/locales/en.json';
import zh from './assets/locales/zh.json';

const messages = {
en,
zh,
};

Vue.config.productionTip = false;


Loading…
Cancel
Save