diff --git a/interface/i18n/mist.de.i18n.json b/interface/i18n/mist.de.i18n.json index a403a5926..97b39ecf2 100644 --- a/interface/i18n/mist.de.i18n.json +++ b/interface/i18n/mist.de.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Ansicht", - "fullscreen": "Vollbildmodus" + "fullscreen": "Vollbildmodus", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Konten", @@ -95,7 +108,7 @@ "nodeConnectionTimeout": "Ethereum Node konnte nicht gestartet werden!
Wenn Sie Geth installiert haben,, verwenden Sie bitte diesen Befehl, um Geth zu starten:
geth --ipcpath __path__

oder senden Sie einen Fehlerreport", "nodeBinaryNotFound": "Keine Programmdatei für den Ethereum Node gefunden!
Bitte starten Sie den Ethereum Node manuell. ", "nodeSyncing": "Ethereum Node muss synchronisiert werden, bitte warten...", - "nodeSyncInfo": "Block __currentBlock__ von __highestBlock__ wird heruntergeladen.", + "nodeSyncInfo": "Block __displayBlock__ von __highestBlock__ wird heruntergeladen.", "nodeSyncConnecting": "Suche nach Peers...", "nodeSyncProcessing": "Blöcke werden verarbeitet, bitte warten...", "peerSearchTimeout": "Peer-Suche überspringen" diff --git a/interface/i18n/mist.en.i18n.json b/interface/i18n/mist.en.i18n.json index fcf65e8c3..7aee62bed 100644 --- a/interface/i18n/mist.en.i18n.json +++ b/interface/i18n/mist.en.i18n.json @@ -21,7 +21,21 @@ }, "view": { "label": "View", - "fullscreen": "Toggle Fullscreen" + "fullscreen": "Toggle Fullscreen", + "languages": "Change language", + "default": "Default", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Accounts", @@ -148,7 +162,7 @@ "title": { "sendTransaction": "Send transaction", "contractExecution": "Execute contract", - "createContract": "Create contract" + "createContract": "Create contract" }, "contractExecutionInfo": "You are about to execute a function on a contract. This might involve transfer of value.", "contractCreationInfo": "You are about to create a contract from the provided data.", diff --git a/interface/i18n/mist.es.i18n.json b/interface/i18n/mist.es.i18n.json index cd47f84d4..d1fbe14b7 100644 --- a/interface/i18n/mist.es.i18n.json +++ b/interface/i18n/mist.es.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Ver", - "fullscreen": "Pantalla Completa" + "fullscreen": "Pantalla Completa", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Cuentas", @@ -95,7 +108,7 @@ "nodeConnectionTimeout": "No se pudo iniciar un nodo Ethereum!
Si has instalado Geth, utiliza este comando para ejecutarlo:
geth --ipcpath __path__

O informa del problema ", "nodeBinaryNotFound": "No se ha encontrado el binario del nodo Ethereum!
Por favor, inicie antes uno manualmente. ", "nodeSyncing": "El nodo de Ethereum necesita sincronizarse, por favor espere...", - "nodeSyncInfo": "Descargando bloque __currentBlock__ de __highestBlock__.", + "nodeSyncInfo": "Descargando bloque __displayBlock__ de __highestBlock__.", "nodeSyncConnecting": "Buscando pares...", "nodeSyncProcessing": "Procesando bloques, por favor espere...", "peerSearchTimeout": "Omitir la búsqueda de pares" diff --git a/interface/i18n/mist.fr.i18n.json b/interface/i18n/mist.fr.i18n.json index 2dcb6addb..09e306990 100644 --- a/interface/i18n/mist.fr.i18n.json +++ b/interface/i18n/mist.fr.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Voir", - "fullscreen": "Basculer en mode plein écran" + "fullscreen": "Basculer en mode plein écran", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Comptes", @@ -93,7 +106,7 @@ "nodeConnectionTimeout": "Echec du démarrage du nœud Ethereum !
Si vous avez installé Geth, utilisez cette commande pour le lancer :
geth --ipcpath __path__

Ou signalez le problème ", "nodeBinaryNotFound": "Pas de binaire du nœud Ethereum trouvé !
Veuillez en lancer d'abord un manuellement. ", "nodeSyncing": "Le nœud Ethereum se synchronise, veuillez patienter...", - "nodeSyncInfo": "Télechargement du bloc __currentBlock__ depuis le bloc __highestBlock__.", + "nodeSyncInfo": "Télechargement du bloc __displayBlock__ depuis le bloc __highestBlock__.", "nodeSyncConnecting": "À la recherche de pairs...", "nodeSyncProcessing": "Traitement de bloc, veuillez patienter...", "peerSearchTimeout": "Recherche de pairs ignorée" diff --git a/interface/i18n/mist.it.i18n.json b/interface/i18n/mist.it.i18n.json index a6828b5fc..b76e9fdb4 100644 --- a/interface/i18n/mist.it.i18n.json +++ b/interface/i18n/mist.it.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Visualizza", - "fullscreen": "Schermo intero" + "fullscreen": "Schermo intero", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Accounts", @@ -95,7 +108,7 @@ "nodeConnectionTimeout": "Impossibile avviare un nodo Ethereum!
Se hai installato Geth, usa questo comando per eseguirlo:
geth --ipcpath __path__

o riporta il problema ", "nodeBinaryNotFound": "Impossibile trovare l'eseguibile del nodo Ethereum !
Per favore avvialo manualmente prima. ", "nodeSyncing": "Il nodo Ethereum deve sincronizzarsi, attendere prego...", - "nodeSyncInfo": "Scaricamento blocco __currentBlock__ di __highestBlock__.", + "nodeSyncInfo": "Scaricamento blocco __displayBlock__ di __highestBlock__.", "nodeSyncConnecting": "Alla ricerca di nodi...", "nodeSyncProcessing": "Elaborazione blocchi, attendere prego...", "privateChainTimeout": "Salta ricerca di nodi" diff --git a/interface/i18n/mist.ja.i18n.json b/interface/i18n/mist.ja.i18n.json index 6f8c67df9..f30ea132f 100644 --- a/interface/i18n/mist.ja.i18n.json +++ b/interface/i18n/mist.ja.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "ビュー", - "fullscreen": "フルスクリーンをトグルする" + "fullscreen": "フルスクリーンをトグルする", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "アカウント", @@ -93,7 +106,7 @@ "nodeConnectionTimeout": "Ethereum nodeをスタート出来ませんでした!
もしGethをインストールしているならば,このコマンドを使ってみてください:
geth --ipcpath __path__

もしくは問題を報告して下さい。 ", "nodeBinaryNotFound": "Ethereum node バイナリーが見つかりませんでした。
手動でスタートして下さい。 ", "nodeSyncing": "Ethereum node は同期中です...", - "nodeSyncInfo": "blockをダウンロードしています。 __currentBlock__ of __highestBlock__.", + "nodeSyncInfo": "blockをダウンロードしています。 __displayBlock__ of __highestBlock__.", "nodeSyncConnecting": "ピアーを探しています。...", "nodeSyncProcessing": "ブロックを処理しています...", "peerSearchTimeout": "ピアーの検索を中止しています" diff --git a/interface/i18n/mist.ko.i18n.json b/interface/i18n/mist.ko.i18n.json index 7d9a58298..8fc97ee45 100644 --- a/interface/i18n/mist.ko.i18n.json +++ b/interface/i18n/mist.ko.i18n.json @@ -17,7 +17,20 @@ }, "view": { "label": "보기", - "fullscreen": "전체화면으로" + "fullscreen": "전체화면으로", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "계정", diff --git a/interface/i18n/mist.nb.i18n.json b/interface/i18n/mist.nb.i18n.json index 992b92e4f..d5b154371 100644 --- a/interface/i18n/mist.nb.i18n.json +++ b/interface/i18n/mist.nb.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Vis", - "fullscreen": "Veksle Mellom Fullskjerm" + "fullscreen": "Veksle Mellom Fullskjerm", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Kontoer", diff --git a/interface/i18n/mist.pt.i18n.json b/interface/i18n/mist.pt.i18n.json index c40d8ceb2..38e88eaea 100644 --- a/interface/i18n/mist.pt.i18n.json +++ b/interface/i18n/mist.pt.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "Ver", - "fullscreen": "Modo de tela cheia" + "fullscreen": "Modo de tela cheia", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "Contas", @@ -95,7 +108,8 @@ "nodeConnectionTimeout": "Não pode inicializar um Node!
Instale um manualmente, e use esse comando para executa-lo:
geth --ipcpath __path__

Caso não consiga, entre em contato ", "nodeBinaryNotFound": "Nó não encontrado!
Instale um manualmente", "nodeSyncing": "Sincronizando, favor aguarde...", - "nodeSyncInfo": "Carregando bloco __currentBlock__ de __highestBlock__.", + "nodeSyncInfoStates": "Carregando bloco __displayBlock__ de __highestBlock__,
Lendo estrutura __displayState__ de __displayKnownStates__", + "nodeSyncInfo": "Carregando bloco __displayBlock__ de __highestBlock__.", "nodeSyncConnecting": "Procurando outros nós...", "nodeSyncProcessing": "Processando blocos recebidos, favor aguarde...", "peerSearchTimeout": "Não procure nós agora", diff --git a/interface/i18n/mist.zh-TW.i18n.json b/interface/i18n/mist.zh-TW.i18n.json index 3b98fc915..cc5668261 100644 --- a/interface/i18n/mist.zh-TW.i18n.json +++ b/interface/i18n/mist.zh-TW.i18n.json @@ -17,7 +17,21 @@ }, "view": { "label": "檢視", - "fullscreen": "全螢幕" + "fullscreen": "全螢幕", + "languages": "語言", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "帳號", @@ -92,7 +106,7 @@ "nodeConnectionTimeout": "無法開啓以太坊節點!
如果您已經安裝Geth,使用此命令運行:
geth --ipcpath __path__

或者上報此問題 ", "nodeBinaryNotFound": "找不到以太坊節點安裝文件!
請事先手動開啓一個節點 ", "nodeSyncing": "需要同步以太坊節點,請等待……", - "nodeSyncInfo": "正在下載第__currentBlock__塊,共__highestBlock__。", + "nodeSyncInfo": "正在下載第__displayBlock__塊,共__highestBlock__。", "nodeSyncConnecting": "正在查找節點……", "nodeSyncProcessing": "正在處理區塊,請等待……", "peerSearchTimeout": "跳過節點搜索" diff --git a/interface/i18n/mist.zh.i18n.json b/interface/i18n/mist.zh.i18n.json index 4417653f2..bd0760a73 100644 --- a/interface/i18n/mist.zh.i18n.json +++ b/interface/i18n/mist.zh.i18n.json @@ -20,7 +20,20 @@ }, "view": { "label": "视图", - "fullscreen": "全屏切换" + "fullscreen": "全屏切换", + "languages": "Change language", + "langCodes" : { + "de": "Deutsch", + "en": "English", + "es": "Español", + "fr": "Français", + "ja": "日本語", + "ko": "한국어 ", + "nb": "Norsk", + "pt": "Português", + "zh": "普通話", + "zh-TW": "國語" + } }, "accounts": { "label": "账户", @@ -95,7 +108,7 @@ "nodeConnectionTimeout": "无法开启以太坊节点!
如果你已经安装Geth,使用此命令运行:
geth --ipcpath __path__

或者上报此问题 ", "nodeBinaryNotFound": "找不到以太坊节点安装文件!
请事先手动开启一个节点 ", "nodeSyncing": "需要同步以太坊节点,请等待……", - "nodeSyncInfo": "正在下载第__currentBlock__块,共__highestBlock__。", + "nodeSyncInfo": "正在下载第__displayBlock__块,共__highestBlock__。", "nodeSyncConnecting": "正在查找节点……", "nodeSyncProcessing": "正在处理区块,请等待……", "peerSearchTimeout": "跳过节点搜索" diff --git a/modules/menuItems.js b/modules/menuItems.js index 4bee3cb5d..72c62fd49 100644 --- a/modules/menuItems.js +++ b/modules/menuItems.js @@ -56,7 +56,7 @@ var menuTempl = function(webviews) { click: function(){ Windows.createPopup('about', { electronOptions: { - width: 420, + width: 420, height: 230, alwaysOnTop: true, } @@ -124,7 +124,7 @@ var menuTempl = function(webviews) { { label: i18n.t('mist.applicationMenu.accounts.importPresale'), accelerator: 'CommandOrControl+I', - enabled: ethereumNode.isMainNetwork, + enabled: ethereumNode.isMainNetwork, click: function(){ Windows.createPopup('importAccount', { electronOptions: { @@ -132,7 +132,7 @@ var menuTempl = function(webviews) { } }); } - }, + }, { type: 'separator' }, @@ -150,7 +150,7 @@ var menuTempl = function(webviews) { path = global.path.APPDATA + '\\Web3\\keys'; else path += '/.web3/keys'; - + // geth } else { if(process.platform === 'darwin') @@ -218,6 +218,33 @@ var menuTempl = function(webviews) { ] }) + let genSwitchLanguageFunc = (lang_code) => function(menuItem, browserWindow){ + browserWindow.webContents.executeJavaScript( + `TAPi18n.setLanguage("${lang_code}");` + ); + ipc.emit("backendAction_setLanguage", {}, lang_code); + } + + let languageMenu = + Object.keys(i18n.options.resources) + .filter(lang_code => lang_code != 'dev') + .map(lang_code => { + menuItem = { + label: i18n.t('mist.applicationMenu.view.langCodes.' + lang_code), + type: 'checkbox', + checked: (global.language.substr(0,2) === lang_code), + click: genSwitchLanguageFunc(lang_code) + } + return menuItem + }); + let defaultLang = app.getLocale().substr(0,2); + languageMenu.unshift({ + label: i18n.t('mist.applicationMenu.view.default'), + click: genSwitchLanguageFunc(defaultLang) + }, { + type: 'separator' + }); + // VIEW menu.push({ label: i18n.t('mist.applicationMenu.view.label'), @@ -230,6 +257,10 @@ var menuTempl = function(webviews) { mainWindow.window.setFullScreen(!mainWindow.window.isFullScreen()); } + }, + { + label: i18n.t('mist.applicationMenu.view.languages'), + submenu: languageMenu } ] }) @@ -307,7 +338,7 @@ var menuTempl = function(webviews) { - + // add node switching menu devToolsMenu.push({ @@ -355,7 +386,7 @@ var menuTempl = function(webviews) { }, { label: 'Testnet (Morden)', - accelerator: 'CommandOrControl+Shift+2', + accelerator: 'CommandOrControl+Shift+2', checked: ethereumNode.isOwnNode && ethereumNode.isTestNetwork, enabled: ethereumNode.isOwnNode && !ethereumNode.isTestNetwork, type: 'checkbox', @@ -378,7 +409,7 @@ var menuTempl = function(webviews) { if (ret.result) { global.mining = true; createMenu(webviews); - } + } }) .catch((err) => { log.error('miner_start', err); @@ -391,7 +422,7 @@ var menuTempl = function(webviews) { if (ret.result) { global.mining = false; createMenu(webviews); - } + } }) .catch((err) => { log.error('miner_stop', err);