From 74cd253297feeb2cb44753ce95bc476a51c3030d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 12:34:39 +0000 Subject: [PATCH 1/2] build(deps): bump i18next from 21.9.1 to 22.4.9 Bumps [i18next](https://github.com/i18next/i18next) from 21.9.1 to 22.4.9. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v21.9.1...v22.4.9) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index f586a668..22af590f 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "electron-window-state": "^5.0.3", "element-plus": "^2.2.28", "emoji-mart-vue-fast": "^12.0.1", - "i18next": "^21.9.1", + "i18next": "^22.4.9", "megalodon": "5.0.6", "minimist": "^1.2.7", "mitt": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 0466dbec..b188a09d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -942,7 +942,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/runtime@7.20.7", "@babel/runtime@^7.17.2", "@babel/runtime@^7.18.6", "@babel/runtime@^7.8.4": +"@babel/runtime@7.20.7", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.6", "@babel/runtime@^7.8.4": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== @@ -6944,12 +6944,12 @@ humanize-plus@^1.8.1: resolved "https://registry.yarnpkg.com/humanize-plus/-/humanize-plus-1.8.2.tgz#a65b34459ad6367adbb3707a82a3c9f916167030" integrity sha1-pls0RZrWNnrbs3B6gqPJ+RYWcDA= -i18next@*, i18next@^21.9.1: - version "21.9.1" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.9.1.tgz#9e3428990f5b2cc9ac1b98dd025f3e411c368249" - integrity sha512-ITbDrAjbRR73spZAiu6+ex5WNlHRr1mY+acDi2ioTHuUiviJqSz269Le1xHAf0QaQ6GgIHResUhQNcxGwa/PhA== +i18next@*, i18next@^22.4.9: + version "22.4.9" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.9.tgz#98c8384c6bd41ff937da98b1e809ba03d3b41053" + integrity sha512-8gWMmUz460KJDQp/ob3MNUX84cVuDRY9PLFPnV8d+Qezz/6dkjxwOaH70xjrCNDO+JrUL25iXfAIN9wUkInNZw== dependencies: - "@babel/runtime" "^7.17.2" + "@babel/runtime" "^7.20.6" iconv-corefoundation@^1.1.7: version "1.1.7" From 995c040649571187ab4c15a0c7673cb362224c0d Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 14 Jan 2023 10:44:13 +0900 Subject: [PATCH 2/2] Follow up typescript for i18next --- package.json | 1 - src/main/index.ts | 58 ++++++++++----------- src/renderer/components/utils/reloadable.ts | 2 +- yarn.lock | 9 +--- 4 files changed, 31 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 22af590f..3d3bfc96 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,6 @@ "@electron/universal": "^1.3.4", "@types/auto-launch": "^5.0.2", "@types/electron-json-storage": "^4.5.0", - "@types/i18next": "^13.0.0", "@types/jest": "27.4.1", "@types/jsdom": "^20.0.1", "@types/node": "^18.11.18", diff --git a/src/main/index.ts b/src/main/index.ts index 3f267cf1..edec4e3c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -847,22 +847,22 @@ const ApplicationMenu = (accountsChange: Array, menu type: 'separator' }, { - label: i18n.t('main_menu.application.services'), + label: i18n.t('main_menu.application.services'), role: 'services' }, { type: 'separator' }, { - label: i18n.t('main_menu.application.hide'), + label: i18n.t('main_menu.application.hide'), role: 'hide' }, { - label: i18n.t('main_menu.application.hide_others'), + label: i18n.t('main_menu.application.hide_others'), role: 'hideOthers' }, { - label: i18n.t('main_menu.application.show_all'), + label: i18n.t('main_menu.application.show_all'), role: 'unhide' } ] @@ -872,7 +872,7 @@ const ApplicationMenu = (accountsChange: Array, menu ? [] : [ { - label: i18n.t('main_menu.window.always_show_menu_bar'), + label: i18n.t('main_menu.window.always_show_menu_bar'), type: 'checkbox', checked: !menu.autoHideMenu, click: item => { @@ -888,14 +888,14 @@ const ApplicationMenu = (accountsChange: Array, menu process.platform === 'darwin' ? [ { - label: i18n.t('main_menu.application.quit'), + label: i18n.t('main_menu.application.quit'), accelerator: 'CmdOrCtrl+Q', role: 'quit' } ] : [ { - label: i18n.t('main_menu.application.quit'), + label: i18n.t('main_menu.application.quit'), accelerator: 'CmdOrCtrl+Q', click: () => { mainWindow!.destroy() @@ -905,10 +905,10 @@ const ApplicationMenu = (accountsChange: Array, menu const template: Array = [ { - label: i18n.t('main_menu.application.name'), + label: i18n.t('main_menu.application.name'), submenu: [ { - label: i18n.t('main_menu.application.about'), + label: i18n.t('main_menu.application.about'), role: 'about', click: () => { openAboutWindow({ @@ -923,14 +923,14 @@ const ApplicationMenu = (accountsChange: Array, menu type: 'separator' }, { - label: i18n.t('main_menu.application.preferences'), + label: i18n.t('main_menu.application.preferences'), accelerator: 'CmdOrCtrl+,', click: () => { mainWindow!.webContents.send('open-preferences') } }, { - label: i18n.t('main_menu.application.shortcuts'), + label: i18n.t('main_menu.application.shortcuts'), accelerator: 'Shift+?', click: () => { mainWindow!.webContents.send('open-shortcuts-list') @@ -944,10 +944,10 @@ const ApplicationMenu = (accountsChange: Array, menu ] }, { - label: i18n.t('main_menu.toot.name'), + label: i18n.t('main_menu.toot.name'), submenu: [ { - label: i18n.t('main_menu.toot.new'), + label: i18n.t('main_menu.toot.new'), accelerator: 'CmdOrCtrl+N', click: () => { mainWindow!.webContents.send('CmdOrCtrl+N') @@ -956,15 +956,15 @@ const ApplicationMenu = (accountsChange: Array, menu ] }, { - label: i18n.t('main_menu.edit.name'), + label: i18n.t('main_menu.edit.name'), submenu: [ { - label: i18n.t('main_menu.edit.undo'), + label: i18n.t('main_menu.edit.undo'), accelerator: 'CmdOrCtrl+Z', role: 'undo' }, { - label: i18n.t('main_menu.edit.redo'), + label: i18n.t('main_menu.edit.redo'), accelerator: 'Shift+CmdOrCtrl+Z', role: 'redo' }, @@ -972,60 +972,60 @@ const ApplicationMenu = (accountsChange: Array, menu type: 'separator' }, { - label: i18n.t('main_menu.edit.cut'), + label: i18n.t('main_menu.edit.cut'), accelerator: 'CmdOrCtrl+X', role: 'cut' }, { - label: i18n.t('main_menu.edit.copy'), + label: i18n.t('main_menu.edit.copy'), accelerator: 'CmdOrCtrl+C', role: 'copy' }, { - label: i18n.t('main_menu.edit.paste'), + label: i18n.t('main_menu.edit.paste'), accelerator: 'CmdOrCtrl+V', role: 'paste' }, { - label: i18n.t('main_menu.edit.select_all'), + label: i18n.t('main_menu.edit.select_all'), accelerator: 'CmdOrCtrl+A', role: 'selectall' } ] as Array }, { - label: i18n.t('main_menu.view.name'), + label: i18n.t('main_menu.view.name'), submenu: [ { - label: i18n.t('main_menu.view.toggle_full_screen'), + label: i18n.t('main_menu.view.toggle_full_screen'), role: 'togglefullscreen' } ] }, { - label: i18n.t('main_menu.window.name'), + label: i18n.t('main_menu.window.name'), submenu: [ ...macWindowMenu, { - label: i18n.t('main_menu.window.close'), + label: i18n.t('main_menu.window.close'), role: 'close' }, { - label: i18n.t('main_menu.window.open'), + label: i18n.t('main_menu.window.open'), enabled: false, click: () => { reopenWindow() } }, { - label: i18n.t('main_menu.window.minimize'), + label: i18n.t('main_menu.window.minimize'), role: 'minimize' }, { type: 'separator' }, { - label: i18n.t('main_menu.window.jump_to'), + label: i18n.t('main_menu.window.jump_to'), accelerator: 'CmdOrCtrl+K', enabled: true, click: () => { @@ -1047,7 +1047,7 @@ const TrayMenu = (accountsChange: Array, i18n: I18n) const template: Array = [ ...accountsChange, { - label: i18n.t('main_menu.application.open'), + label: i18n.t('main_menu.application.open'), click: async () => { if (mainWindow) { mainWindow.show() @@ -1057,7 +1057,7 @@ const TrayMenu = (accountsChange: Array, i18n: I18n) } }, { - label: i18n.t('main_menu.application.quit'), + label: i18n.t('main_menu.application.quit'), click: () => { stopAllStreamings() mainWindow!.destroy() diff --git a/src/renderer/components/utils/reloadable.ts b/src/renderer/components/utils/reloadable.ts index e9947824..54f122c8 100644 --- a/src/renderer/components/utils/reloadable.ts +++ b/src/renderer/components/utils/reloadable.ts @@ -9,7 +9,7 @@ export default function useReloadable(store: Store, route: RouteLocat async function reloadable() { const account = await store.dispatch(`TimelineSpace/${ACTION_TYPES.LOCAL_ACCOUNT}`, route.params.id).catch(err => { ElMessage({ - message: i18next.t('message.account_load_error'), + message: i18next.t('message.account_load_error'), type: 'error' }) throw err diff --git a/yarn.lock b/yarn.lock index b188a09d..e60963b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1837,13 +1837,6 @@ dependencies: "@types/node" "*" -"@types/i18next@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@types/i18next/-/i18next-13.0.0.tgz#403ef338add0104e74d9759f1b39217e7c5d4084" - integrity sha512-gp/SIShAuf4WOqi8ey0nuI7qfWaVpMNCcs/xLygrh/QTQIXmlDC1E0TtVejweNW+7SGDY7g0lyxyKZIJuCKIJw== - dependencies: - i18next "*" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" @@ -6944,7 +6937,7 @@ humanize-plus@^1.8.1: resolved "https://registry.yarnpkg.com/humanize-plus/-/humanize-plus-1.8.2.tgz#a65b34459ad6367adbb3707a82a3c9f916167030" integrity sha1-pls0RZrWNnrbs3B6gqPJ+RYWcDA= -i18next@*, i18next@^22.4.9: +i18next@^22.4.9: version "22.4.9" resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.9.tgz#98c8384c6bd41ff937da98b1e809ba03d3b41053" integrity sha512-8gWMmUz460KJDQp/ob3MNUX84cVuDRY9PLFPnV8d+Qezz/6dkjxwOaH70xjrCNDO+JrUL25iXfAIN9wUkInNZw==