From 32e950e0477ba1551b99edb0211bb91fb81a1a24 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Sun, 13 Oct 2019 16:07:35 +0900
Subject: [PATCH] refs #1055 Add a tray menu to open window
---
src/config/locales/de/translation.json | 1 +
src/config/locales/en/translation.json | 1 +
src/config/locales/fr/translation.json | 1 +
src/config/locales/it/translation.json | 1 +
src/config/locales/ja/translation.json | 1 +
src/config/locales/ko/translation.json | 1 +
src/config/locales/pl/translation.json | 1 +
src/config/locales/zh_cn/translation.json | 1 +
src/main/index.ts | 10 ++++++++++
9 files changed, 18 insertions(+)
diff --git a/src/config/locales/de/translation.json b/src/config/locales/de/translation.json
index dde1cf23..f0324b36 100644
--- a/src/config/locales/de/translation.json
+++ b/src/config/locales/de/translation.json
@@ -8,6 +8,7 @@
"hide": "Whalebird verstecken",
"hide_others": "Andere verstecken",
"show_all": "Alle anzeigen",
+ "open": "Open Window",
"quit": "Beenden"
},
"toot": {
diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json
index 1eedd4cd..d1f0e954 100644
--- a/src/config/locales/en/translation.json
+++ b/src/config/locales/en/translation.json
@@ -8,6 +8,7 @@
"hide": "Hide Whalebird",
"hide_others": "Hide Others",
"show_all": "Show All",
+ "open": "Open Window",
"quit": "Quit"
},
"toot": {
diff --git a/src/config/locales/fr/translation.json b/src/config/locales/fr/translation.json
index 1ebeb523..c7d68815 100644
--- a/src/config/locales/fr/translation.json
+++ b/src/config/locales/fr/translation.json
@@ -8,6 +8,7 @@
"hide": "Cacher Whalebird",
"hide_others": "Cacher les autres",
"show_all": "Tout afficher",
+ "open": "Ouvrir la fenêtre",
"quit": "Quitter"
},
"toot": {
diff --git a/src/config/locales/it/translation.json b/src/config/locales/it/translation.json
index e86763b6..9e29e764 100644
--- a/src/config/locales/it/translation.json
+++ b/src/config/locales/it/translation.json
@@ -8,6 +8,7 @@
"hide": "Nascondi Whalebird",
"hide_others": "Nascondi Altri",
"show_all": "Mostra Tutto",
+ "open": "Apri Finestra",
"quit": "Esci"
},
"toot": {
diff --git a/src/config/locales/ja/translation.json b/src/config/locales/ja/translation.json
index 91fb4b55..295bda5d 100644
--- a/src/config/locales/ja/translation.json
+++ b/src/config/locales/ja/translation.json
@@ -8,6 +8,7 @@
"hide": "Whalebirdを隠す",
"hide_others": "ほかを隠す",
"show_all": "すべてを表示",
+ "open": "ウィンドウを開く",
"quit": "終了"
},
"toot": {
diff --git a/src/config/locales/ko/translation.json b/src/config/locales/ko/translation.json
index 109499fc..2d570183 100644
--- a/src/config/locales/ko/translation.json
+++ b/src/config/locales/ko/translation.json
@@ -8,6 +8,7 @@
"hide": "Whalebird 숨기기",
"hide_others": "나머지 숨기기",
"show_all": "모두 보이기",
+ "open": "창 열기",
"quit": "나가기"
},
"toot": {
diff --git a/src/config/locales/pl/translation.json b/src/config/locales/pl/translation.json
index de65f544..74ab4e92 100644
--- a/src/config/locales/pl/translation.json
+++ b/src/config/locales/pl/translation.json
@@ -8,6 +8,7 @@
"hide": "Ukryj Whalebird",
"hide_others": "Ukryj pozostałe",
"show_all": "Pokaż wszystkie",
+ "open": "Open Window",
"quit": "Wyjdź"
},
"toot": {
diff --git a/src/config/locales/zh_cn/translation.json b/src/config/locales/zh_cn/translation.json
index 0f9271ca..c4518bde 100644
--- a/src/config/locales/zh_cn/translation.json
+++ b/src/config/locales/zh_cn/translation.json
@@ -8,6 +8,7 @@
"hide": "隐藏 Whalebird",
"hide_others": "隐藏其它窗口",
"show_all": "全部显示",
+ "open": "打开窗口",
"quit": "退出"
},
"toot": {
diff --git a/src/main/index.ts b/src/main/index.ts
index d19c05c5..6618e9dd 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -1291,6 +1291,16 @@ const ApplicationMenu = (accountsChange: Array, i18n
const TrayMenu = (accountsChange: Array, i18n: i18n.i18n): Menu => {
const template: Array = [
...accountsChange,
+ {
+ label: i18n.t('main_menu.application.open'),
+ click: async () => {
+ if (mainWindow) {
+ mainWindow.show()
+ } else {
+ await createWindow()
+ }
+ }
+ },
{
label: i18n.t('main_menu.application.quit'),
click: () => {