diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2484375334..d6a0521fea 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -485,6 +485,14 @@ common/views/components/trends.vue: count: "{}人が投稿" empty: "トレンドなし" +common/views/components/language-settings.vue: + title: "表示言語" + pick-language: "言語を選択" + recommended: "推奨" + auto: "自動" + specify-language: "言語を指定" + info: "変更はページの再度読み込み後に反映されます。" + common/views/components/profile-editor.vue: title: "プロフィール" name: "名前" @@ -870,13 +878,6 @@ desktop/views/components/settings.vue: volume: "ボリューム" test: "テスト" - language: "言語" - pick-language: "言語を選択" - recommended: "推奨" - auto: "自動" - specify-language: "言語を指定" - language-desc: "変更はページの再度読み込み後に反映されます。" - cache: "キャッシュ" clean-cache: "クリーンアップ" cache-warn: "クリーンアップを行うと、ブラウザに記憶されたアカウント情報のキャッシュ、書きかけの投稿・返信・メッセージ、およびその他のデータ(設定情報含む)が削除されます。クリーンアップを行った後はページを再度読み込みする必要があります。" @@ -1554,11 +1555,6 @@ mobile/views/pages/selectdrive.vue: mobile/views/pages/settings.vue: signed-in-as: "{}としてサインイン中" - lang: "言語" - lang-tip: "変更はページの再読み込み後に反映されます。" - recommended: "推奨" - auto: "自動" - specify-language: "言語を指定" design: "デザインと表示" dark-mode: "ダークモード" i-am-under-limited-internet: "私は通信を制限されている" diff --git a/src/client/app/common/views/components/language-settings.vue b/src/client/app/common/views/components/language-settings.vue new file mode 100644 index 0000000000..aa3f290511 --- /dev/null +++ b/src/client/app/common/views/components/language-settings.vue @@ -0,0 +1,54 @@ + + + {{ $t('title') }} + + + + + {{ $t('auto') }} + + + + {{ x[1] }} + + + Current: {{ currentLanguage }} + {{ $t('info') }} + + + + + diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index 39145bdb04..a89982eea4 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -169,24 +169,7 @@ - - {{ $t('language') }} - - - - {{ $t('auto') }} - - - - {{ x[1] }} - - - - Current: {{ this.currentLanguage }} - {{ $t('language-desc') }} - - - + {{ $t('cache') }} @@ -318,8 +301,9 @@ import XMuteAndBlock from '../../../common/views/components/mute-and-block.vue'; import XPasswordSettings from '../../../common/views/components/password-settings.vue'; import XProfileEditor from '../../../common/views/components/profile-editor.vue'; import XApiSettings from '../../../common/views/components/api-settings.vue'; +import XLanguageSettings from '../../../common/views/components/language-settings.vue'; -import { url, langs, clientVersion as version } from '../../../config'; +import { url, clientVersion as version } from '../../../config'; import checkForUpdate from '../../../common/scripts/check-for-update'; export default Vue.extend({ @@ -338,6 +322,7 @@ export default Vue.extend({ XPasswordSettings, XProfileEditor, XApiSettings, + XLanguageSettings, }, props: { initialPage: { @@ -350,8 +335,6 @@ export default Vue.extend({ page: this.initialPage || 'profile', meta: null, version, - langs, - currentLanguage: 'Unknown', latestVersion: undefined, checkingForUpdate: false }; @@ -412,11 +395,6 @@ export default Vue.extend({ set(value) { this.$store.commit('device/set', { key: 'soundVolume', value }); } }, - lang: { - get() { return this.$store.state.device.lang; }, - set(value) { this.$store.commit('device/set', { key: 'lang', value }); } - }, - preventUpdate: { get() { return this.$store.state.device.preventUpdate; }, set(value) { this.$store.commit('device/set', { key: 'preventUpdate', value }); } @@ -556,12 +534,6 @@ export default Vue.extend({ this.$root.getMeta().then(meta => { this.meta = meta; }); - - try { - const locale = JSON.parse(localStorage.getItem('locale') || "{}"); - const localeKey = localStorage.getItem('localeKey'); - this.currentLanguage = `${locale.meta.lang} (${localeKey})`; - } catch { } }, methods: { readAllUnreadNotes() { diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index ff4475242e..de881af3ba 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -105,23 +105,7 @@ - - {{ $t('lang') }} - - - - - {{ $t('auto') }} - - - - {{ x[1] }} - - - Current: {{ this.currentLanguage }} - {{ $t('lang-tip') }} - - + {{ $t('twitter') }} @@ -199,7 +183,7 @@
{{ $t('language-desc') }}
{{ $t('lang-tip') }}