Skip to content

Commit 5af37af

Browse files
author
Steeve PAYRAUDEAU
committed
Translation added to layout
1 parent cff3e5b commit 5af37af

File tree

3 files changed

+59
-14
lines changed

3 files changed

+59
-14
lines changed

src/assets/locales.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ const message = {
111111
token: '令 牌',
112112
tokenUsername: '令牌用户名',
113113
platform: '平 台',
114+
topArticles: '置顶文章',
115+
default: '默认',
116+
external: '外链',
117+
pathContainHttps: '路径必须包含 http 或 https',
118+
articleUrlPath: '文章 URL 路径',
119+
concise: '精简',
120+
tagUrlPath: '标签 URL 路径',
121+
archivePathPrefix: '归档路径前缀',
122+
showFullText: '显示全文',
123+
showAbstractOnly: '仅显示摘要',
124+
numberArticlesRSS: 'RSS/Feed 文章数量',
114125
},
115126
zh_TW: {
116127
preview: '預 覽',
@@ -225,6 +236,17 @@ const message = {
225236
token: '令 牌',
226237
tokenUsername: '令牌用户名',
227238
platform: '平 臺',
239+
topArticles: '置顶文章',
240+
default: '默认',
241+
external: '外链',
242+
pathContainHttps: '路径必须包含 http 或 https',
243+
articleUrlPath: '文章 URL 路径',
244+
concise: '精简',
245+
tagUrlPath: '标签 URL 路径',
246+
archivePathPrefix: '归档路径前缀',
247+
showFullText: '显示全文',
248+
showAbstractOnly: '仅显示摘要',
249+
numberArticlesRSS: 'RSS/Feed 文章数量',
228250
},
229251
en: {
230252
preview: 'Preview',
@@ -338,6 +360,17 @@ const message = {
338360
token: 'Token',
339361
tokenUsername: 'Token Username',
340362
platform: 'Platform',
363+
topArticles: 'Top articles',
364+
default: 'default',
365+
external: 'External',
366+
pathContainHttps: 'The path must contain either http or https',
367+
articleUrlPath: 'Article URL path',
368+
concise: 'concise',
369+
tagUrlPath: 'Tag URL path',
370+
archivePathPrefix: 'Archive path prefix',
371+
showFullText: 'Show full text',
372+
showAbstractOnly: 'Show abstract only',
373+
numberArticlesRSS: 'Number articles RSS/Feed',
341374
},
342375
fr_FR: {
343376
preview: 'Aperçu',
@@ -451,6 +484,17 @@ const message = {
451484
token: 'Token',
452485
tokenUsername: 'Token Username',
453486
platform: 'Plate-forme',
487+
topArticles: 'Articles en tête',
488+
default: 'Par défaut',
489+
external: 'Externe',
490+
pathContainHttps: 'L\'URL doit contenir soit \'http\' ou \'https\'',
491+
articleUrlPath: 'URL des articles',
492+
concise: 'simplifié',
493+
tagUrlPath: 'URL des tags',
494+
archivePathPrefix: 'Préfix du chemin des Archives',
495+
showFullText: 'Tout afficher',
496+
showAbstractOnly: 'Afficher seulement le résumé',
497+
numberArticlesRSS: 'Nombre d\'articles RSS/Feed',
454498
},
455499
}
456500

src/views/article/ArticleUpdate.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@
162162

163163
<a-collapse-panel :header="$t('featureImage')" key="4">
164164
<a-radio-group style="margin-bottom: 16px;" defaultValue="a" buttonStyle="solid" v-model="featureType" size="small">
165-
<a-radio-button value="DEFAULT">默认</a-radio-button>
166-
<a-radio-button value="EXTERNAL">外链</a-radio-button>
165+
<a-radio-button value="DEFAULT">{{$t('default')}}</a-radio-button>
166+
<a-radio-button value="EXTERNAL">{{$t('external')}}</a-radio-button>
167167
</a-radio-group>
168168
<div v-if="featureType === 'DEFAULT'">
169169
<a-upload
@@ -185,7 +185,7 @@
185185
</div>
186186
<div v-if="featureType === 'EXTERNAL'">
187187
<a-input v-model="form.featureImagePath"></a-input>
188-
<div class="tip-text">路径必须包含 http 或 https</div>
188+
<div class="tip-text">{{$t('pathContainHttps')}}</div>
189189
<div class="feature-image-container" v-if="form.featureImagePath">
190190
<img class="feature-image" :src="form.featureImagePath" height="150">
191191
</div>
@@ -194,7 +194,7 @@
194194
<a-collapse-panel :header="$t('hideInList')" key="5">
195195
<a-switch v-model="form.hideInList"></a-switch>
196196
</a-collapse-panel>
197-
<a-collapse-panel header="置顶文章" key="6">
197+
<a-collapse-panel :header="$t('topArticles')" key="6">
198198
<a-switch v-model="form.isTop"></a-switch>
199199
</a-collapse-panel>
200200
</a-collapse>

src/views/theme/includes/BasicSetting.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,32 @@
5757
</a-radio-group>
5858
</a-form-item>
5959

60-
<a-form-item label="文章 URL 路径" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
60+
61+
<a-form-item :label="$t('articleUrlPath')" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
6162
<a-radio-group name="postPath" v-model="form.postPath">
6263
<a-tooltip placement="bottom" title="example.com/post/xxx">
63-
<a-radio value="post">默认</a-radio>
64+
<a-radio value="post">{{$t('default')}}</a-radio>
6465
</a-tooltip>
6566
<a-tooltip placement="bottom" title="example.com/xxx">
66-
<a-radio value="">精简</a-radio>
67+
<a-radio value="">{{$t('concise')}}</a-radio>
6768
</a-tooltip>
6869
</a-radio-group>
6970
</a-form-item>
7071

71-
<a-form-item label="标签 URL 路径" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
72+
<a-form-item :label="$t('tagUrlPath')" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
7273
<a-radio-group name="tagPath" v-model="form.tagPath">
7374
<a-tooltip placement="bottom" title="example.com/tag/xxx">
74-
<a-radio value="tag">默认</a-radio>
75+
<a-radio value="tag">{{$t('default')}}</a-radio>
7576
</a-tooltip>
7677
<a-tooltip placement="bottom" title="example.com/xxx">
77-
<a-radio value="">精简</a-radio>
78+
<a-radio value="">{{$t('concise')}}</a-radio>
7879
</a-tooltip>
7980
</a-radio-group>
8081
</a-form-item>
8182

8283
<ValidationProvider name="archivesPath" rules="required" v-slot="slotProps">
8384
<a-form-item
84-
label="归档路径前缀"
85+
:label="$t('archivePathPrefix')"
8586
:labelCol="formLayout.label"
8687
:wrapperCol="formLayout.wrapper"
8788
:colon="false"
@@ -98,11 +99,11 @@
9899
</a-form-item>
99100
<a-form-item label="RSS/Feed" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
100101
<a-radio-group name="tagUrlFormat" v-model="form.feedFullText">
101-
<a-radio :value="true">显示全文</a-radio>
102-
<a-radio :value="false">仅显示摘要</a-radio>
102+
<a-radio :value="true">{{$t('showFullText')}}</a-radio>
103+
<a-radio :value="false">{{$t('showAbstractOnly')}}</a-radio>
103104
</a-radio-group>
104105
</a-form-item>
105-
<a-form-item label="RSS/Feed 文章数量" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
106+
<a-form-item :label="$t('numberArticlesRSS')" :labelCol="formLayout.label" :wrapperCol="formLayout.wrapper" :colon="false">
106107
<a-input-number :min="0" :max="10000" v-model="form.feedCount" />
107108
</a-form-item>
108109
<footer-box>

0 commit comments

Comments
 (0)