diff --git a/gulpfile.ts b/gulpfile.ts index 262c0a503..880adb51d 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -11,7 +11,7 @@ const cleanCSS = require('gulp-clean-css'); const sass = require('gulp-dart-sass'); const fiber = require('fibers'); -const locales = require('./locales'); +const locales: { [x: string]: any } = require('./locales'); const meta = require('./package.json'); gulp.task('build:ts', () => { @@ -31,8 +31,10 @@ gulp.task('build:copy:views', () => gulp.task('build:copy:locales', cb => { fs.mkdirSync('./built/client/assets/locales', { recursive: true }); + const v = { '_version_': meta.version }; + for (const [lang, locale] of Object.entries(locales)) { - fs.writeFileSync(`./built/client/assets/locales/${lang}.${meta.version}.json`, JSON.stringify(locale), 'utf-8'); + fs.writeFileSync(`./built/client/assets/locales/${lang}.${meta.version}.json`, JSON.stringify({ ...locale, ...v }), 'utf-8'); } cb(); diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ab293eb89..3c7dc6640 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -507,6 +507,8 @@ addRelay: "リレーの追加" inboxUrl: "inboxのURL" addedRelays: "追加済みのリレー" serviceworkerInfo: "プッシュ通知を行うには有効する必要があります。" +deletedNote: "削除された投稿" +invisibleNote: "非公開の投稿" _theme: explore: "テーマを探す" @@ -1102,3 +1104,17 @@ _relayStatus: requesting: "承認待ち" accepted: "承認済み" rejected: "拒否済み" + +_notification: + fileUploaded: "ファイルがアップロードされました" + youGotMention: "{name}からのメンション" + youGotReply: "{name}からのリプライ" + youGotQuote: "{name}による引用" + youRenoted: "{name}がRenoteしました" + youGotPoll: "{name}が投票しました" + youGotMessagingMessageFromUser: "{name}からのチャットがあります" + youGotMessagingMessageFromGroup: "{name}のチャットがあります" + youWereFollowed: "フォローされました" + youReceivedFollowRequest: "フォローリクエストが来ました" + yourFollowRequestAccepted: "フォローリクエストが承認されました" + youWereInvitedToGroup: "グループに招待されました" diff --git a/package.json b/package.json index 15c1478db..d34394d13 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "css-loader": "3.5.3", "cssnano": "4.1.10", "dateformat": "3.0.3", + "deep-entries": "3.1.0", "diskusage": "1.1.3", "double-ended-queue": "2.1.0-0", "escape-regexp": "0.0.1", @@ -151,6 +152,7 @@ "http-proxy-agent": "4.0.1", "http-signature": "1.3.4", "https-proxy-agent": "5.0.0", + "idb-keyval": "3.2.0", "insert-text-at-cursor": "0.3.0", "is-root": "2.1.0", "is-svg": "4.2.1", diff --git a/src/client/app.vue b/src/client/app.vue index 5e7396205..8e192d463 100644 --- a/src/client/app.vue +++ b/src/client/app.vue @@ -136,15 +136,12 @@ import { faGripVertical, faChevronLeft, faHashtag, faBroadcastTower, faFireAlt, import { faBell, faEnvelope, faLaugh, faComments } from '@fortawesome/free-regular-svg-icons'; import { ResizeObserver } from '@juggle/resize-observer'; import { v4 as uuid } from 'uuid'; -import i18n from './i18n'; import { host, instanceName } from './config'; import { search } from './scripts/search'; const DESKTOP_THRESHOLD = 1100; export default Vue.extend({ - i18n, - components: { XClock: () => import('./components/header-clock.vue').then(m => m.default), MkButton: () => import('./components/ui/button.vue').then(m => m.default), diff --git a/src/client/components/captcha.vue b/src/client/components/captcha.vue index 6b1ee6f0b..1a894d935 100644 --- a/src/client/components/captcha.vue +++ b/src/client/components/captcha.vue @@ -7,7 +7,6 @@