refactor(client): i18n.locale -> i18n.ts

This commit is contained in:
syuilo
2022-01-28 11:39:49 +09:00
parent 6ebab5f577
commit 57ec04d9ec
74 changed files with 424 additions and 424 deletions

View File

@@ -10,15 +10,15 @@
>
<div v-if="$i?.avatarId == file.id" class="label">
<img src="/client-assets/label.svg"/>
<p>{{ i18n.locale.avatar }}</p>
<p>{{ i18n.ts.avatar }}</p>
</div>
<div v-if="$i?.bannerId == file.id" class="label">
<img src="/client-assets/label.svg"/>
<p>{{ i18n.locale.banner }}</p>
<p>{{ i18n.ts.banner }}</p>
</div>
<div v-if="file.isSensitive" class="label red">
<img src="/client-assets/label-red.svg"/>
<p>{{ i18n.locale.nsfw }}</p>
<p>{{ i18n.ts.nsfw }}</p>
</div>
<MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/>
@@ -61,30 +61,30 @@ const title = computed(() => `${props.file.name}\n${props.file.type} ${bytes(pro
function getMenu() {
return [{
text: i18n.locale.rename,
text: i18n.ts.rename,
icon: 'fas fa-i-cursor',
action: rename
}, {
text: props.file.isSensitive ? i18n.locale.unmarkAsSensitive : i18n.locale.markAsSensitive,
text: props.file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
icon: props.file.isSensitive ? 'fas fa-eye' : 'fas fa-eye-slash',
action: toggleSensitive
}, {
text: i18n.locale.describeFile,
text: i18n.ts.describeFile,
icon: 'fas fa-i-cursor',
action: describe
}, null, {
text: i18n.locale.copyUrl,
text: i18n.ts.copyUrl,
icon: 'fas fa-link',
action: copyUrl
}, {
type: 'a',
href: props.file.url,
target: '_blank',
text: i18n.locale.download,
text: i18n.ts.download,
icon: 'fas fa-download',
download: props.file.name
}, null, {
text: i18n.locale.delete,
text: i18n.ts.delete,
icon: 'fas fa-trash-alt',
danger: true,
action: deleteFile
@@ -120,8 +120,8 @@ function onDragend() {
function rename() {
os.inputText({
title: i18n.locale.renameFile,
placeholder: i18n.locale.inputNewFileName,
title: i18n.ts.renameFile,
placeholder: i18n.ts.inputNewFileName,
default: props.file.name,
}).then(({ canceled, result: name }) => {
if (canceled) return;
@@ -134,9 +134,9 @@ function rename() {
function describe() {
os.popup(import('@/components/media-caption.vue'), {
title: i18n.locale.describeFile,
title: i18n.ts.describeFile,
input: {
placeholder: i18n.locale.inputNewDescription,
placeholder: i18n.ts.inputNewDescription,
default: props.file.comment !== null ? props.file.comment : '',
},
image: props.file