From f78ae399f2a49379e0790ee07d2d8b8988ea01ef Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Sun, 15 Apr 2018 05:22:16 +0900 Subject: [PATCH] wip --- locales/ja.yml | 13 +++++++++---- src/build/i18n.ts | 5 ++--- .../app/desktop/views/components/settings.apps.vue | 2 +- .../views/pages/user/user.followers-you-know.vue | 6 +++--- .../app/desktop/views/pages/user/user.friends.vue | 6 +++--- .../app/desktop/views/pages/user/user.photos.vue | 6 +++--- src/client/app/mobile/views/components/timeline.vue | 5 +++-- src/client/app/mobile/views/pages/settings.vue | 1 - 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/locales/ja.yml b/locales/ja.yml index 8787aaad2..597b0f47e 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -41,13 +41,13 @@ common: update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。" my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。" -common/views/connect-failed.vue: +common/views/components/connect-failed.vue: title: "サーバーに接続できません" description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから{再度お試し}ください。" thanks: "いつもMisskeyをご利用いただきありがとうございます。" troubleshoot: "トラブルシュート" -common/views/connect-failed.troubleshooter.vue: +common/views/components/connect-failed.troubleshooter.vue: title: "トラブルシューティング" network: "ネットワーク接続" checking-network: "ネットワーク接続を確認中" @@ -182,11 +182,11 @@ common/views/widgets/server.vue: title: "サーバー情報" toggle: "表示を切り替え" -common/views/widgets/activity.vue: +desktop/views/components/activity.vue: title: "アクティビティ" toggle: "表示を切り替え" -desktop/views/widgets/calendar.vue: +desktop/views/components/calendar.vue: title: "{1}年 {2}月" prev: "前の月" next: "次の月" @@ -304,6 +304,7 @@ desktop/views/components/settings.vue: password: "パスワード" 2fa: "二段階認証" other: "その他" + license: "ライセンス" desktop/views/components/settings.2fa.vue: intro: "二段階認証を設定すると、サインイン時にパスワードだけでなく、予め登録しておいた物理的なデバイス(例えばあなたのスマートフォンなど)も必要になり、よりセキュリティが向上します。" @@ -331,6 +332,9 @@ desktop/views/components/settings.api.vue: regenerate-token: "トークンを再生成" enter-password: "パスワードを入力してください" +desktop/views/components/settings.app.vue: + no-apps: "連携しているアプリケーションはありません" + desktop/views/components/settings.mute.vue: no-users: "ミュートしているユーザーはいません" @@ -557,6 +561,7 @@ mobile/views/pages/selectdrive.vue: select-file: "ファイルを選択" mobile/views/pages/settings.vue: + signed-in-as: "{}としてサインイン中" profile: "プロフィール" twitter: "Twitter連携" signin-history: "サインイン履歴" diff --git a/src/build/i18n.ts b/src/build/i18n.ts index 57d6a20fd..35204c34a 100644 --- a/src/build/i18n.ts +++ b/src/build/i18n.ts @@ -55,12 +55,11 @@ export default class Replacer { public replacement(ctx, match, a, b, c) { const client = 'misskey/src/client/app/'; - const name = ctx ? ctx.src.substr(ctx.src.indexOf(client) + client.length) : null; + let name = null; let key = a || b || c; if (key[0] == '@') { - //if (name.startsWith('app/desktop/views/')) prefix = 'desktop.views.'; - //if (name.startsWith('app/mobile/views/')) prefix = 'mobile.views.'; + name = ctx.src.substr(ctx.src.indexOf(client) + client.length); key = key.substr(1); } diff --git a/src/client/app/desktop/views/components/settings.apps.vue b/src/client/app/desktop/views/components/settings.apps.vue index 0503b03ab..7d562f9c1 100644 --- a/src/client/app/desktop/views/components/settings.apps.vue +++ b/src/client/app/desktop/views/components/settings.apps.vue @@ -1,7 +1,7 @@ <template> <div class="root"> <div class="none ui info" v-if="!fetching && apps.length == 0"> - <p>%fa:info-circle%%i18n:common.tags.mk-authorized-apps.no-apps%</p> + <p>%fa:info-circle%%i18n:@no-apps%</p> </div> <div class="apps" v-if="apps.length != 0"> <div v-for="app in apps"> diff --git a/src/client/app/desktop/views/pages/user/user.followers-you-know.vue b/src/client/app/desktop/views/pages/user/user.followers-you-know.vue index e50f62d96..9ccbc7a31 100644 --- a/src/client/app/desktop/views/pages/user/user.followers-you-know.vue +++ b/src/client/app/desktop/views/pages/user/user.followers-you-know.vue @@ -1,13 +1,13 @@ <template> <div class="followers-you-know"> - <p class="title">%fa:users%%i18n:@followers-you-know.title%</p> - <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@followers-you-know.loading%<mk-ellipsis/></p> + <p class="title">%fa:users%%i18n:@title%</p> + <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p> <div v-if="!fetching && users.length > 0"> <router-link v-for="user in users" :to="user | userPage" :key="user.id"> <img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user | userName" v-user-preview="user.id"/> </router-link> </div> - <p class="empty" v-if="!fetching && users.length == 0">%i18n:@followers-you-know.no-users%</p> + <p class="empty" v-if="!fetching && users.length == 0">%i18n:@no-users%</p> </div> </template> diff --git a/src/client/app/desktop/views/pages/user/user.friends.vue b/src/client/app/desktop/views/pages/user/user.friends.vue index 12426a26c..203f93647 100644 --- a/src/client/app/desktop/views/pages/user/user.friends.vue +++ b/src/client/app/desktop/views/pages/user/user.friends.vue @@ -1,7 +1,7 @@ <template> <div class="friends"> - <p class="title">%fa:users%%i18n:@frequently-replied-users.title%</p> - <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@frequently-replied-users.loading%<mk-ellipsis/></p> + <p class="title">%fa:users%%i18n:@title%</p> + <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p> <template v-if="!fetching && users.length != 0"> <div class="user" v-for="friend in users"> <router-link class="avatar-anchor" :to="friend | userPage"> @@ -14,7 +14,7 @@ <mk-follow-button :user="friend"/> </div> </template> - <p class="empty" v-if="!fetching && users.length == 0">%i18n:@frequently-replied-users.no-users%</p> + <p class="empty" v-if="!fetching && users.length == 0">%i18n:@no-users%</p> </div> </template> diff --git a/src/client/app/desktop/views/pages/user/user.photos.vue b/src/client/app/desktop/views/pages/user/user.photos.vue index d1dfac9d7..9f749d5cc 100644 --- a/src/client/app/desktop/views/pages/user/user.photos.vue +++ b/src/client/app/desktop/views/pages/user/user.photos.vue @@ -1,13 +1,13 @@ <template> <div class="photos"> - <p class="title">%fa:camera%%i18n:@photos.title%</p> - <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@photos.loading%<mk-ellipsis/></p> + <p class="title">%fa:camera%%i18n:@title%</p> + <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p> <div class="stream" v-if="!fetching && images.length > 0"> <div v-for="image in images" class="img" :style="`background-image: url(${image.url}?thumbnail&size=256)`" ></div> </div> - <p class="empty" v-if="!fetching && images.length == 0">%i18n:@photos.no-photos%</p> + <p class="empty" v-if="!fetching && images.length == 0">%i18n:@no-photos%</p> </div> </template> diff --git a/src/client/app/mobile/views/components/timeline.vue b/src/client/app/mobile/views/components/timeline.vue index 6bc12096c..12cc7fcf1 100644 --- a/src/client/app/mobile/views/components/timeline.vue +++ b/src/client/app/mobile/views/components/timeline.vue @@ -7,7 +7,7 @@ </div> <div class="empty" v-if="!fetching && notes.length == 0"> %fa:R comments% - %i18n:@empty-timeline% + %i18n:@empty% </div> <button v-if="!fetching && existMore" @click="more" :disabled="moreFetching" slot="tail"> <span v-if="!moreFetching">%i18n:@load-more%</span> @@ -26,7 +26,8 @@ export default Vue.extend({ props: { date: { type: Date, - required: false + required: false, + default: null } }, data() { diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index a294bf12a..36f7f09b8 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -5,7 +5,6 @@ <p v-html="'%i18n:@signed-in-as%'.replace('{}', '<b>' + name + '</b>')"></p> <ul> <li><router-link to="./settings/profile">%fa:user%%i18n:@profile%%fa:angle-right%</router-link></li> - <li><router-link to="./settings/authorized-apps">%fa:puzzle-piece%%i18n:@applications%%fa:angle-right%</router-link></li> <li><router-link to="./settings/twitter">%fa:B twitter%%i18n:@twitter%%fa:angle-right%</router-link></li> <li><router-link to="./settings/signin-history">%fa:sign-in-alt%%i18n:@signin-history%%fa:angle-right%</router-link></li> </ul>