From d733a1b445db1e70f55b3cbac4786d81486bc34a Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 7 Aug 2018 03:20:26 +0900 Subject: i18n --- src/client/app/common/scripts/date-stringify.ts | 13 ------------- src/client/app/common/views/components/signin.vue | 2 +- src/client/app/desktop/api/update-avatar.ts | 16 ++++++++-------- src/client/app/desktop/api/update-banner.ts | 16 ++++++++-------- src/client/app/desktop/views/components/note-detail.vue | 3 +-- src/client/app/desktop/views/components/note-preview.vue | 3 +-- .../app/desktop/views/components/notes.note.sub.vue | 3 +-- src/client/app/desktop/views/components/notes.note.vue | 3 +-- .../app/desktop/views/components/user-lists-window.vue | 2 +- src/client/app/desktop/views/pages/user/user.profile.vue | 4 ++-- src/client/app/desktop/views/widgets/post-form.vue | 2 +- 11 files changed, 25 insertions(+), 42 deletions(-) delete mode 100644 src/client/app/common/scripts/date-stringify.ts (limited to 'src') diff --git a/src/client/app/common/scripts/date-stringify.ts b/src/client/app/common/scripts/date-stringify.ts deleted file mode 100644 index 2b8e525567..0000000000 --- a/src/client/app/common/scripts/date-stringify.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default date => { - if (typeof date == 'string') date = new Date(date); - return ( - date.getFullYear() + '%i18n:common.date.full-year%' + - (date.getMonth() + 1) + '%i18n:common.date.month%' + - date.getDate() + '%i18n:common.date.day%' + - ' ' + - date.getHours() + '%i18n:common.date.hours%' + - date.getMinutes() + '%i18n:common.date.minutes%' + - ' ' + - `(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})` - ); -}; diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue index 58241cef09..deaeeca6a7 100644 --- a/src/client/app/common/views/components/signin.vue +++ b/src/client/app/common/views/components/signin.vue @@ -12,7 +12,7 @@ {{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }} -

またはTwitterでログイン

+

%i18n:@or%%i18n:@signin-with-twitter%

diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts index 887367a24e..83820f92bd 100644 --- a/src/client/app/desktop/api/update-avatar.ts +++ b/src/client/app/desktop/api/update-avatar.ts @@ -8,7 +8,7 @@ export default (os: OS) => (cb, file = null) => { const w = os.new(CropWindow, { image: file, - title: 'アバターとして表示する部分を選択', + title: '%i18n:desktop.avatar-crop-title%', aspectRatio: 1 / 1 }); @@ -18,11 +18,11 @@ export default (os: OS) => (cb, file = null) => { data.append('file', blob, file.name + '.cropped.png'); os.api('drive/folders/find', { - name: 'アイコン' + name: '%i18n:desktop.avatar%' }).then(iconFolder => { if (iconFolder.length === 0) { os.api('drive/folders/create', { - name: 'アイコン' + name: '%i18n:desktop.avatar%' }).then(iconFolder => { upload(data, iconFolder); }); @@ -41,7 +41,7 @@ export default (os: OS) => (cb, file = null) => { const upload = (data, folder) => { const dialog = os.new(ProgressDialog, { - title: '新しいアバターをアップロードしています' + title: '%i18n:desktop.uploading-avatar%' }); document.body.appendChild(dialog.$el); @@ -76,10 +76,10 @@ export default (os: OS) => (cb, file = null) => { }); os.apis.dialog({ - title: '%fa:info-circle%アバターを更新しました', - text: '新しいアバターが反映されるまで時間がかかる場合があります。', + title: '%fa:info-circle% %i18n:desktop.avatar-updated%', + text: null, actions: [{ - text: 'わかった' + text: '%i18n:common.got-it%' }] }); @@ -92,7 +92,7 @@ export default (os: OS) => (cb, file = null) => { } else { os.apis.chooseDriveFile({ multiple: false, - title: '%fa:image%アバターにする画像を選択' + title: '%fa:image% %i18n:desktop.choose-avatar%' }).then(file => { fileSelected(file); }); diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts index 4e6dd4e2c7..33c4e306a2 100644 --- a/src/client/app/desktop/api/update-banner.ts +++ b/src/client/app/desktop/api/update-banner.ts @@ -8,7 +8,7 @@ export default (os: OS) => { const cropImage = file => new Promise((resolve, reject) => { const w = os.new(CropWindow, { image: file, - title: 'バナーとして表示する部分を選択', + title: '%i18n:desktop.banner-crop-title%', aspectRatio: 16 / 9 }); @@ -18,11 +18,11 @@ export default (os: OS) => { data.append('file', blob, file.name + '.cropped.png'); os.api('drive/folders/find', { - name: 'バナー' + name: '%i18n:desktop.banner%' }).then(bannerFolder => { if (bannerFolder.length === 0) { os.api('drive/folders/create', { - name: 'バナー' + name: '%i18n:desktop.banner%' }).then(iconFolder => { resolve(upload(data, iconFolder)); }); @@ -43,7 +43,7 @@ export default (os: OS) => { const upload = (data, folder) => new Promise((resolve, reject) => { const dialog = os.new(ProgressDialog, { - title: '新しいバナーをアップロードしています' + title: '%i18n:desktop.uploading-banner%' }); document.body.appendChild(dialog.$el); @@ -79,10 +79,10 @@ export default (os: OS) => { }); os.apis.dialog({ - title: '%fa:info-circle%バナーを更新しました', - text: '新しいバナーが反映されるまで時間がかかる場合があります。', + title: '%fa:info-circle% %i18n:desktop.banner-updated%', + text: null, actions: [{ - text: 'わかった' + text: '%i18n:common.got-it%' }] }); @@ -95,7 +95,7 @@ export default (os: OS) => { ? Promise.resolve(file) : os.apis.chooseDriveFile({ multiple: false, - title: '%fa:image%バナーにする画像を選択' + title: '%fa:image% %i18n:desktop.choose-banner%' }); return selectedFile diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue index 36a5889220..b6980fae72 100644 --- a/src/client/app/desktop/views/components/note-detail.vue +++ b/src/client/app/desktop/views/components/note-detail.vue @@ -79,7 +79,6 @@