i18n: $t to i18n.t

This commit is contained in:
ThatOneCalculator 2022-11-16 01:29:18 -08:00
parent 2413f2af09
commit cae813d9d2
24 changed files with 64 additions and 61 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc.14.5", "version": "12.119.0-calc.14.6",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -60,7 +60,7 @@
<div v-if="translating || translation" class="translation"> <div v-if="translating || translation" class="translation">
<MkLoading v-if="translating" mini/> <MkLoading v-if="translating" mini/>
<div v-else class="translated"> <div v-else class="translated">
<b>{{ $t('translatedFrom', { x: translation.sourceLang }) }}: </b> <b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
<Mfm :text="translation.text" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/> <Mfm :text="translation.text" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/>
</div> </div>
</div> </div>

View file

@ -6,12 +6,12 @@
<span> <span>
<template v-if="choice.isVoted"><i class="ph-check-bold ph-lg"></i></template> <template v-if="choice.isVoted"><i class="ph-check-bold ph-lg"></i></template>
<Mfm :text="choice.text" :plain="true" :custom-emojis="note.emojis"/> <Mfm :text="choice.text" :plain="true" :custom-emojis="note.emojis"/>
<span v-if="showResult" class="votes">({{ $t('_poll.votesCount', { n: choice.votes }) }})</span> <span v-if="showResult" class="votes">({{ i18n.t('_poll.votesCount', { n: choice.votes }) }})</span>
</span> </span>
</li> </li>
</ul> </ul>
<p v-if="!readOnly"> <p v-if="!readOnly">
<span>{{ $t('_poll.totalVotes', { n: total }) }}</span> <span>{{ i18n.t('_poll.totalVotes', { n: total }) }}</span>
<span> · </span> <span> · </span>
<a v-if="!closed && !isVoted" @click="showResult = !showResult">{{ showResult ? i18n.ts._poll.vote : i18n.ts._poll.showResult }}</a> <a v-if="!closed && !isVoted" @click="showResult = !showResult">{{ showResult ? i18n.ts._poll.vote : i18n.ts._poll.showResult }}</a>
<span v-if="isVoted">{{ i18n.ts._poll.voted }}</span> <span v-if="isVoted">{{ i18n.ts._poll.voted }}</span>

View file

@ -5,7 +5,7 @@
</p> </p>
<ul> <ul>
<li v-for="(choice, i) in choices" :key="i"> <li v-for="(choice, i) in choices" :key="i">
<MkInput class="input" small :model-value="choice" :placeholder="$t('_poll.choiceN', { n: i + 1 })" @update:modelValue="onInput(i, $event)"> <MkInput class="input" small :model-value="choice" :placeholder="i18n.t('_poll.choiceN', { n: i + 1 })" @update:modelValue="onInput(i, $event)">
</MkInput> </MkInput>
<button class="_button" @click="remove(i)"> <button class="_button" @click="remove(i)">
<i class="ph-x-bold ph-lg"></i> <i class="ph-x-bold ph-lg"></i>

View file

@ -41,9 +41,9 @@
</div> </div>
</div> </div>
<div class="social _section"> <div class="social _section">
<a v-if="meta && meta.enableTwitterIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/twitter`"><i class="fab fa-twitter" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'Twitter' }) }}</a> <a v-if="meta && meta.enableTwitterIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/twitter`"><i class="fab fa-twitter" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'Twitter' }) }}</a>
<a v-if="meta && meta.enableGithubIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/github`"><i class="fab fa-github" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'GitHub' }) }}</a> <a v-if="meta && meta.enableGithubIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/github`"><i class="fab fa-github" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'GitHub' }) }}</a>
<a v-if="meta && meta.enableDiscordIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/discord`"><i class="fab fa-discord" style="margin-right: 4px;"></i>{{ $t('signinWith', { x: 'Discord' }) }}</a> <a v-if="meta && meta.enableDiscordIntegration" class="_borderButton _gap" :href="`${apiUrl}/signin/discord`"><i class="fab fa-discord" style="margin-right: 4px;"></i>{{ i18n.t('signinWith', { x: 'Discord' }) }}</a>
</div> </div>
</form> </form>
</template> </template>
@ -51,6 +51,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { defineAsyncComponent } from 'vue'; import { defineAsyncComponent } from 'vue';
import { toUnicode } from 'punycode/'; import { toUnicode } from 'punycode/';
import { showSuspendedDialog } from '../scripts/show-suspended-dialog';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/form/input.vue'; import MkInput from '@/components/form/input.vue';
import MkInfo from '@/components/MkInfo.vue'; import MkInfo from '@/components/MkInfo.vue';
@ -58,7 +59,6 @@ import { apiUrl, host as configHost } from '@/config';
import { byteify, hexify } from '@/scripts/2fa'; import { byteify, hexify } from '@/scripts/2fa';
import * as os from '@/os'; import * as os from '@/os';
import { login } from '@/account'; import { login } from '@/account';
import { showSuspendedDialog } from '../scripts/show-suspended-dialog';
import { instance } from '@/instance'; import { instance } from '@/instance';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
@ -85,7 +85,7 @@ const props = defineProps({
withAvatar: { withAvatar: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: true,
}, },
autoSet: { autoSet: {
type: Boolean, type: Boolean,
@ -95,13 +95,13 @@ const props = defineProps({
message: { message: {
type: String, type: String,
required: false, required: false,
default: '' default: '',
} },
}); });
function onUsernameChange() { function onUsernameChange() {
os.api('users/show', { os.api('users/show', {
username: username username: username,
}).then(userResponse => { }).then(userResponse => {
user = userResponse; user = userResponse;
}, () => { }, () => {
@ -123,10 +123,10 @@ function queryKey() {
allowCredentials: challengeData.securityKeys.map(key => ({ allowCredentials: challengeData.securityKeys.map(key => ({
id: byteify(key.id, 'hex'), id: byteify(key.id, 'hex'),
type: 'public-key', type: 'public-key',
transports: ['usb', 'nfc', 'ble', 'internal'] transports: ['usb', 'nfc', 'ble', 'internal'],
})), })),
timeout: 60 * 1000 timeout: 60 * 1000,
} },
}).catch(() => { }).catch(() => {
queryingKey = false; queryingKey = false;
return Promise.reject(null); return Promise.reject(null);
@ -141,7 +141,7 @@ function queryKey() {
clientDataJSON: hexify(credential.response.clientDataJSON), clientDataJSON: hexify(credential.response.clientDataJSON),
credentialId: credential.id, credentialId: credential.id,
challengeId: challengeData.challengeId, challengeId: challengeData.challengeId,
'hcaptcha-response': hCaptchaResponse, 'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse, 'g-recaptcha-response': reCaptchaResponse,
}); });
}).then(res => { }).then(res => {
@ -151,7 +151,7 @@ function queryKey() {
if (err === null) return; if (err === null) return;
os.alert({ os.alert({
type: 'error', type: 'error',
text: i18n.ts.signinFailed text: i18n.ts.signinFailed,
}); });
signing = false; signing = false;
}); });
@ -165,8 +165,8 @@ function onSubmit() {
os.api('signin', { os.api('signin', {
username, username,
password, password,
'hcaptcha-response': hCaptchaResponse, 'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse, 'g-recaptcha-response': reCaptchaResponse,
}).then(res => { }).then(res => {
totpLogin = true; totpLogin = true;
signing = false; signing = false;
@ -181,9 +181,9 @@ function onSubmit() {
os.api('signin', { os.api('signin', {
username, username,
password, password,
'hcaptcha-response': hCaptchaResponse, 'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse, 'g-recaptcha-response': reCaptchaResponse,
token: user && user.twoFactorEnabled ? token : undefined token: user && user.twoFactorEnabled ? token : undefined,
}).then(res => { }).then(res => {
emit('login', res); emit('login', res);
onLogin(res); onLogin(res);
@ -197,7 +197,7 @@ function loginFailed(err) {
os.alert({ os.alert({
type: 'error', type: 'error',
title: i18n.ts.loginFailed, title: i18n.ts.loginFailed,
text: i18n.ts.noSuchUser text: i18n.ts.noSuchUser,
}); });
break; break;
} }
@ -226,7 +226,7 @@ function loginFailed(err) {
os.alert({ os.alert({
type: 'error', type: 'error',
title: i18n.ts.loginFailed, title: i18n.ts.loginFailed,
text: JSON.stringify(err) text: JSON.stringify(err),
}); });
} }
} }

View file

@ -7,7 +7,7 @@
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA> <MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
</div> </div>
<div v-if="note.files.length > 0"> <div v-if="note.files.length > 0">
<summary>({{ $t('withNFiles', { n: note.files.length }) }})</summary> <summary>({{ i18n.t('withNFiles', { n: note.files.length }) }})</summary>
<XMediaList :media-list="note.files"/> <XMediaList :media-list="note.files"/>
</div> </div>
<div v-if="note.poll"> <div v-if="note.poll">

View file

@ -23,7 +23,7 @@
<div style="margin-bottom: 16px;"><b>{{ i18n.ts.permission }}</b></div> <div style="margin-bottom: 16px;"><b>{{ i18n.ts.permission }}</b></div>
<MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</MkButton> <MkButton inline @click="disableAll">{{ i18n.ts.disableAll }}</MkButton>
<MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton> <MkButton inline @click="enableAll">{{ i18n.ts.enableAll }}</MkButton>
<MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model="permissions[kind]">{{ $t(`_permissions.${kind}`) }}</MkSwitch> <MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model="permissions[kind]">{{ i18n.t(`_permissions.${kind}`) }}</MkSwitch>
</div> </div>
</XModalWindow> </XModalWindow>
</template> </template>

View file

@ -8,7 +8,7 @@
<i v-if="relay.status === 'accepted'" class="ph-check-bold ph-lg icon accepted"></i> <i v-if="relay.status === 'accepted'" class="ph-check-bold ph-lg icon accepted"></i>
<i v-else-if="relay.status === 'rejected'" class="ph-prohibit-bold ph-lg icon rejected"></i> <i v-else-if="relay.status === 'rejected'" class="ph-prohibit-bold ph-lg icon rejected"></i>
<i v-else class="ph-clock-bold ph-lg icon requesting"></i> <i v-else class="ph-clock-bold ph-lg icon requesting"></i>
<span>{{ $t(`_relayStatus.${relay.status}`) }}</span> <span>{{ i18n.t(`_relayStatus.${relay.status}`) }}</span>
</div> </div>
<MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ph-trash-bold ph-lg"></i> {{ i18n.ts.remove }}</MkButton> <MkButton class="button" inline danger @click="remove(relay.inbox)"><i class="ph-trash-bold ph-lg"></i> {{ i18n.ts.remove }}</MkButton>
</div> </div>

View file

@ -1,6 +1,6 @@
<template> <template>
<section class="_section"> <section class="_section">
<div class="_title">{{ $t('_auth.shareAccess', { name: app.name }) }}</div> <div class="_title">{{ i18n.t('_auth.shareAccess', { name: app.name }) }}</div>
<div class="_content"> <div class="_content">
<h2>{{ app.name }}</h2> <h2>{{ app.name }}</h2>
<p class="id">{{ app.id }}</p> <p class="id">{{ app.id }}</p>
@ -9,7 +9,7 @@
<div class="_content"> <div class="_content">
<h2>{{ i18n.ts._auth.permissionAsk }}</h2> <h2>{{ i18n.ts._auth.permissionAsk }}</h2>
<ul> <ul>
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li> <li v-for="p in app.permission" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
</ul> </ul>
</div> </div>
<div class="_footer"> <div class="_footer">

View file

@ -15,7 +15,7 @@
<h1>{{ i18n.ts._auth.denied }}</h1> <h1>{{ i18n.ts._auth.denied }}</h1>
</div> </div>
<div v-if="state == 'accepted'" class="accepted"> <div v-if="state == 'accepted'" class="accepted">
<h1>{{ session.app.isAuthorized ? $t('already-authorized') : i18n.ts.allowed }}</h1> <h1>{{ session.app.isAuthorized ? i18n.t('already-authorized') : i18n.ts.allowed }}</h1>
<p v-if="session.app.callbackUrl">{{ i18n.ts._auth.callback }}<MkEllipsis/></p> <p v-if="session.app.callbackUrl">{{ i18n.ts._auth.callback }}<MkEllipsis/></p>
<p v-if="!session.app.callbackUrl">{{ i18n.ts._auth.pleaseGoBack }}</p> <p v-if="!session.app.callbackUrl">{{ i18n.ts._auth.pleaseGoBack }}</p>
</div> </div>
@ -47,6 +47,7 @@ export default defineComponent({
state: null, state: null,
session: null, session: null,
fetching: true, fetching: true,
i18n,
}; };
}, },
mounted() { mounted() {

View file

@ -18,12 +18,12 @@
</div> </div>
</div> </div>
<div v-else class="_section"> <div v-else class="_section">
<div v-if="name" class="_title">{{ $t('_auth.shareAccess', { name: name }) }}</div> <div v-if="name" class="_title">{{ i18n.t('_auth.shareAccess', { name: name }) }}</div>
<div v-else class="_title">{{ i18n.ts._auth.shareAccessAsk }}</div> <div v-else class="_title">{{ i18n.ts._auth.shareAccessAsk }}</div>
<div class="_content"> <div class="_content">
<p>{{ i18n.ts._auth.permissionAsk }}</p> <p>{{ i18n.ts._auth.permissionAsk }}</p>
<ul> <ul>
<li v-for="p in _permissions" :key="p">{{ $t(`_permissions.${p}`) }}</li> <li v-for="p in _permissions" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
</ul> </ul>
</div> </div>
<div class="_footer"> <div class="_footer">

View file

@ -21,7 +21,7 @@
<MkInput v-model="value.message"><template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.message }}</template></MkInput> <MkInput v-model="value.message"><template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.message }}</template></MkInput>
<MkSelect v-model="value.var"> <MkSelect v-model="value.var">
<template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.variable }}</template> <template #label>{{ i18n.ts._pages.blocks._button._action._pushEvent.variable }}</template>
<option :value="null">{{ $t('_pages.blocks._button._action._pushEvent.no-variable') }}</option> <option :value="null">{{ i18n.t('_pages.blocks._button._action._pushEvent.no-variable') }}</option>
<option v-for="v in hpml.getVarsByType()" :value="v.name">{{ v.name }}</option> <option v-for="v in hpml.getVarsByType()" :value="v.name">{{ v.name }}</option>
<optgroup :label="i18n.ts._pages.script.pageVariables"> <optgroup :label="i18n.ts._pages.script.pageVariables">
<option v-for="v in hpml.getPageVarsByType()" :value="v">{{ v }}</option> <option v-for="v in hpml.getPageVarsByType()" :value="v">{{ v }}</option>

View file

@ -16,8 +16,8 @@
</button> </button>
</div> </div>
</header> </header>
<p v-show="showBody" v-if="error != null" class="error">{{ $t('_pages.script.typeError', { slot: error.arg + 1, expect: $t(`script.types.${error.expect}`), actual: $t(`script.types.${error.actual}`) }) }}</p> <p v-show="showBody" v-if="error != null" class="error">{{ i18n.t('_pages.script.typeError', { slot: error.arg + 1, expect: i18n.t(`script.types.${error.expect}`), actual: i18n.t(`script.types.${error.actual}`) }) }}</p>
<p v-show="showBody" v-if="warn != null" class="warn">{{ $t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p> <p v-show="showBody" v-if="warn != null" class="warn">{{ i18n.t('_pages.script.thereIsEmptySlot', { slot: warn.slot + 1 }) }}</p>
<div v-show="showBody" class="body"> <div v-show="showBody" class="body">
<slot></slot> <slot></slot>
</div> </div>
@ -26,34 +26,36 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { i18n } from '@/i18n';
export default defineComponent({ export default defineComponent({
props: { props: {
expanded: { expanded: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
removable: { removable: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
draggable: { draggable: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
error: { error: {
required: false, required: false,
default: null default: null,
}, },
warn: { warn: {
required: false, required: false,
default: null default: null,
} },
}, },
emits: ['toggle', 'remove'], emits: ['toggle', 'remove'],
data() { data() {
return { return {
showBody: this.expanded, showBody: this.expanded,
i18n,
}; };
}, },
methods: { methods: {
@ -63,8 +65,8 @@ export default defineComponent({
}, },
remove() { remove() {
this.$emit('remove'); this.$emit('remove');
} },
} },
}); });
</script> </script>

View file

@ -43,15 +43,15 @@
<section v-else-if="modelValue.type === 'fn'" class="" style="padding:0 16px 16px 16px;"> <section v-else-if="modelValue.type === 'fn'" class="" style="padding:0 16px 16px 16px;">
<MkTextarea v-model="slots"> <MkTextarea v-model="slots">
<template #label>{{ i18n.ts._pages.script.blocks._fn.slots }}</template> <template #label>{{ i18n.ts._pages.script.blocks._fn.slots }}</template>
<template #caption>{{ $t('_pages.script.blocks._fn.slots-info') }}</template> <template #caption>{{ i18n.t('_pages.script.blocks._fn.slots-info') }}</template>
</MkTextarea> </MkTextarea>
<XV v-if="modelValue.value.expression" v-model="modelValue.value.expression" :title="$t(`_pages.script.blocks._fn.arg1`)" :get-expected-type="() => null" :hpml="hpml" :fn-slots="modelValue.value.slots" :name="name"/> <XV v-if="modelValue.value.expression" v-model="modelValue.value.expression" :title="i18n.t(`_pages.script.blocks._fn.arg1`)" :get-expected-type="() => null" :hpml="hpml" :fn-slots="modelValue.value.slots" :name="name"/>
</section> </section>
<section v-else-if="modelValue.type.startsWith('fn:')" class="" style="padding:16px;"> <section v-else-if="modelValue.type.startsWith('fn:')" class="" style="padding:16px;">
<XV v-for="(x, i) in modelValue.args" :key="i" v-model="modelValue.args[i]" :title="hpml.getVarByName(modelValue.type.split(':')[1]).value.slots[i].name" :get-expected-type="() => null" :hpml="hpml" :name="name"/> <XV v-for="(x, i) in modelValue.args" :key="i" v-model="modelValue.args[i]" :title="hpml.getVarByName(modelValue.type.split(':')[1]).value.slots[i].name" :get-expected-type="() => null" :hpml="hpml" :name="name"/>
</section> </section>
<section v-else class="" style="padding:16px;"> <section v-else class="" style="padding:16px;">
<XV v-for="(x, i) in modelValue.args" :key="i" v-model="modelValue.args[i]" :title="$t(`_pages.script.blocks._${modelValue.type}.arg${i + 1}`)" :get-expected-type="() => _getExpectedType(i)" :hpml="hpml" :name="name" :fn-slots="fnSlots"/> <XV v-for="(x, i) in modelValue.args" :key="i" v-model="modelValue.args[i]" :title="i18n.t(`_pages.script.blocks._${modelValue.type}.arg${i + 1}`)" :get-expected-type="() => _getExpectedType(i)" :hpml="hpml" :name="name" :fn-slots="fnSlots"/>
</section> </section>
</XContainer> </XContainer>
</template> </template>
@ -124,7 +124,7 @@ export default defineComponent({
typeText(): any { typeText(): any {
if (this.modelValue.type === null) return null; if (this.modelValue.type === null) return null;
if (this.modelValue.type.startsWith('fn:')) return this.modelValue.type.split(':')[1]; if (this.modelValue.type.startsWith('fn:')) return this.modelValue.type.split(':')[1];
return this.$t(`_pages.script.blocks.${this.modelValue.type}`); return i18n.t(`_pages.script.blocks.${this.modelValue.type}`);
}, },
}, },

View file

@ -27,7 +27,7 @@
<details> <details>
<summary>{{ i18n.ts.details }}</summary> <summary>{{ i18n.ts.details }}</summary>
<ul> <ul>
<li v-for="p in token.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li> <li v-for="p in token.permission" :key="p">{{ i18n.t(`_permissions.${p}`) }}</li>
</ul> </ul>
</details> </details>
</div> </div>

View file

@ -7,7 +7,7 @@
<FormSection> <FormSection>
<template #label>{{ i18n.ts.sounds }}</template> <template #label>{{ i18n.ts.sounds }}</template>
<FormLink v-for="type in Object.keys(sounds)" :key="type" style="margin-bottom: 8px;" @click="edit(type)"> <FormLink v-for="type in Object.keys(sounds)" :key="type" style="margin-bottom: 8px;" @click="edit(type)">
{{ $t('_sfx.' + type) }} {{ i18n.t('_sfx.' + type) }}
<template #suffix>{{ sounds[type].type || i18n.ts.none }}</template> <template #suffix>{{ sounds[type].type || i18n.ts.none }}</template>
<template #suffixIcon><i class="ph-caret-down-bold ph-lg"></i></template> <template #suffixIcon><i class="ph-caret-down-bold ph-lg"></i></template>
</FormLink> </FormLink>

View file

@ -51,7 +51,7 @@
</dl> </dl>
<dl v-if="user.birthday" class="field"> <dl v-if="user.birthday" class="field">
<dt class="name"><i class="ph-cake-bold ph-lg ph-fw ph-lg"></i> {{ i18n.ts.birthday }}</dt> <dt class="name"><i class="ph-cake-bold ph-lg ph-fw ph-lg"></i> {{ i18n.ts.birthday }}</dt>
<dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ $t('yearsOld', { age }) }})</dd> <dd class="value">{{ user.birthday.replace('-', '/').replace('-', '/') }} ({{ i18n.t('yearsOld', { age }) }})</dd>
</dl> </dl>
<dl class="field"> <dl class="field">
<dt class="name"><i class="ph-calendar-blank-bold ph-lg ph-fw ph-lg"></i> {{ i18n.ts.registeredDate }}</dt> <dt class="name"><i class="ph-calendar-blank-bold ph-lg ph-fw ph-lg"></i> {{ i18n.ts.registeredDate }}</dt>

View file

@ -105,7 +105,7 @@ export default defineComponent({
showMenu(ev) { showMenu(ev) {
os.popupMenu([{ os.popupMenu([{
text: this.$t('aboutX', { x: instanceName }), text: i18n.t('aboutX', { x: instanceName }),
icon: 'ph-info-bold ph-lg', icon: 'ph-info-bold ph-lg',
action: () => { action: () => {
os.pageWindow('/about'); os.pageWindow('/about');

View file

@ -125,7 +125,7 @@ export default defineComponent({
showMenu(ev) { showMenu(ev) {
os.popupMenu([{ os.popupMenu([{
text: this.$t('aboutX', { x: instanceName }), text: i18n.t('aboutX', { x: instanceName }),
icon: 'ph-info-bold ph-lg', icon: 'ph-info-bold ph-lg',
action: () => { action: () => {
os.pageWindow('/about'); os.pageWindow('/about');

View file

@ -11,9 +11,9 @@
<div v-if="disabled" class="iwaalbte"> <div v-if="disabled" class="iwaalbte">
<p> <p>
<i class="ph-minus-circle-bold ph-lg"></i> <i class="ph-minus-circle-bold ph-lg"></i>
{{ $t('disabled-timeline.title') }} {{ i18n.t('disabled-timeline.title') }}
</p> </p>
<p class="desc">{{ $t('disabled-timeline.description') }}</p> <p class="desc">{{ i18n.t('disabled-timeline.description') }}</p>
</div> </div>
<XTimeline v-else-if="column.tl" ref="timeline" :key="column.tl" :src="column.tl" @after="() => emit('loaded')" @queue="queueUpdated" @note="onNote"/> <XTimeline v-else-if="column.tl" ref="timeline" :key="column.tl" :src="column.tl" @after="() => emit('loaded')" @queue="queueUpdated" @note="onNote"/>
</XColumn> </XColumn>

View file

@ -2,11 +2,11 @@
<div class="mkw-calendar" :class="{ _panel: !widgetProps.transparent }"> <div class="mkw-calendar" :class="{ _panel: !widgetProps.transparent }">
<div class="calendar" :class="{ isHoliday }"> <div class="calendar" :class="{ isHoliday }">
<p class="month-and-year"> <p class="month-and-year">
<span class="year">{{ $t('yearX', { year }) }}</span> <span class="year">{{ i18n.t('yearX', { year }) }}</span>
<span class="month">{{ $t('monthX', { month }) }}</span> <span class="month">{{ i18n.t('monthX', { month }) }}</span>
</p> </p>
<p v-if="month === 1 && day === 1" class="day">🎉{{ $t('dayX', { day }) }}<span style="display: inline-block; transform: scaleX(-1);">🎉</span></p> <p v-if="month === 1 && day === 1" class="day">🎉{{ i18n.t('dayX', { day }) }}<span style="display: inline-block; transform: scaleX(-1);">🎉</span></p>
<p v-else class="day">{{ $t('dayX', { day }) }}</p> <p v-else class="day">{{ i18n.t('dayX', { day }) }}</p>
<p class="week-day">{{ weekDay }}</p> <p class="week-day">{{ weekDay }}</p>
</div> </div>
<div class="info"> <div class="info">

View file

@ -4,7 +4,7 @@
<p v-if="widgetProps.folderId == null"> <p v-if="widgetProps.folderId == null">
{{ i18n.ts.folder }} {{ i18n.ts.folder }}
</p> </p>
<p v-if="widgetProps.folderId != null && images.length === 0 && !fetching">{{ $t('no-image') }}</p> <p v-if="widgetProps.folderId != null && images.length === 0 && !fetching">{{ i18n.t('no-image') }}</p>
<div ref="slideA" class="slide a"></div> <div ref="slideA" class="slide a"></div>
<div ref="slideB" class="slide b"></div> <div ref="slideB" class="slide b"></div>
</div> </div>

View file

@ -8,7 +8,7 @@
<i v-else-if="widgetProps.src === 'global'" class="ph-planet-bold ph-lg"></i> <i v-else-if="widgetProps.src === 'global'" class="ph-planet-bold ph-lg"></i>
<i v-else-if="widgetProps.src === 'list'" class="ph-list-bullets-bold ph-lg"></i> <i v-else-if="widgetProps.src === 'list'" class="ph-list-bullets-bold ph-lg"></i>
<i v-else-if="widgetProps.src === 'antenna'" class="ph-television-bold ph-lg"></i> <i v-else-if="widgetProps.src === 'antenna'" class="ph-television-bold ph-lg"></i>
<span style="margin-left: 8px;">{{ widgetProps.src === 'list' ? widgetProps.list.name : widgetProps.src === 'antenna' ? widgetProps.antenna.name : $t('_timelines.' + widgetProps.src) }}</span> <span style="margin-left: 8px;">{{ widgetProps.src === 'list' ? widgetProps.list.name : widgetProps.src === 'antenna' ? widgetProps.antenna.name : i18n.t('_timelines.' + widgetProps.src) }}</span>
<i :class="menuOpened ? 'ph-caret-up-bold ph-lg' : 'ph-caret-down-bold ph-lg'" style="margin-left: 8px;"></i> <i :class="menuOpened ? 'ph-caret-up-bold ph-lg' : 'ph-caret-down-bold ph-lg'" style="margin-left: 8px;"></i>
</button> </button>
</template> </template>

View file

@ -8,7 +8,7 @@
<div v-for="stat in stats" :key="stat.tag"> <div v-for="stat in stats" :key="stat.tag">
<div class="tag"> <div class="tag">
<MkA class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</MkA> <MkA class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</MkA>
<p>{{ $t('nUsersMentioned', { n: stat.usersCount }) }}</p> <p>{{ i18n.t('nUsersMentioned', { n: stat.usersCount }) }}</p>
</div> </div>
<MkMiniChart class="chart" :src="stat.chart"/> <MkMiniChart class="chart" :src="stat.chart"/>
</div> </div>