From 582685cf384cc6ca2e837c4e3b2db1c028654d60 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 22 Mar 2018 23:11:48 +0100 Subject: [i18n] add pt-BR locale --- catalog.go | 161 ++++++++++++++++++++--------------- locales/en-US/messages.gotext.json | 119 ++++++++++++++------------ locales/es-ES/messages.gotext.json | 97 +++++++++++----------- locales/pt-BR/messages.gotext.json | 166 +++++++++++++++++++++++++++++++++++++ systray.go | 26 ++++-- 5 files changed, 394 insertions(+), 175 deletions(-) create mode 100644 locales/pt-BR/messages.gotext.json diff --git a/catalog.go b/catalog.go index 12f31ce..89c41c5 100644 --- a/catalog.go +++ b/catalog.go @@ -26,6 +26,7 @@ func init() { dict := map[string]catalog.Dictionary{ "en_US": &dictionary{index: en_USIndex, data: en_USData}, "es_ES": &dictionary{index: es_ESIndex, data: es_ESData}, + "pt_BR": &dictionary{index: pt_BRIndex, data: pt_BRData}, } fallback := language.MustParse("en-US") cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) @@ -36,80 +37,108 @@ func init() { } var messageKeyToIndex = map[string]int{ - "... I have donated": 15, - "About ...": 16, - "Can't contact bitmask": 2, - "Cancel": 11, - "Cancel connection to RiseupVPN": 12, - "Checking status...": 6, - "Could not find a polkit authentication agent. Please run one and try again.": 5, - "Donate ...": 14, - "Donate to RiseupVPN": 0, - "Help ...": 13, - "Is bitmaskd running? Start bitmask and try again.": 3, - "Missing authentication agent": 4, - "Quit": 17, - "Quit BitmaskVPN": 18, - "Retry": 21, - "RiseupVPN is %v": 23, - "Route traffic through": 19, - "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn": 1, - "Turn RiseupVPN off": 10, - "Turn RiseupVPN on": 8, - "Turn off": 9, - "Turn on": 7, - "Use RiseupVPN %v gateway": 20, - "VPN is %v": 24, - "blocking internet": 22, + "About ...": 13, + "Can't contact bitmask": 0, + "Cancel": 9, + "Cancel connection to RiseupVPN": 10, + "Checking status...": 4, + "Could not find a polkit authentication agent. Please run one and try again.": 3, + "Donate ...": 12, + "Help ...": 11, + "Is bitmaskd running? Start bitmask and try again.": 1, + "Missing authentication agent": 2, + "Quit": 14, + "Quit BitmaskVPN": 15, + "Retry": 26, + "RiseupVPN is blocking internet": 27, + "RiseupVPN is off": 20, + "RiseupVPN is on": 18, + "RiseupVPN is starting": 22, + "RiseupVPN is stopping": 24, + "Route traffic through": 16, + "Turn RiseupVPN off": 8, + "Turn RiseupVPN on": 6, + "Turn off": 7, + "Turn on": 5, + "Use RiseupVPN %v gateway": 17, + "VPN is blocking internet": 28, + "VPN is off": 21, + "VPN is on": 19, + "VPN is starting": 23, + "VPN is stopping": 25, } -var en_USIndex = []uint32{ // 26 elements - 0x00000000, 0x00000014, 0x00000118, 0x0000012e, - 0x00000160, 0x0000017d, 0x000001c9, 0x000001dc, - 0x000001e4, 0x000001f6, 0x000001ff, 0x00000212, - 0x00000219, 0x00000238, 0x00000241, 0x00000250, - 0x00000263, 0x0000026d, 0x00000272, 0x00000282, - 0x00000298, 0x000002b4, 0x000002ba, 0x000002cc, - 0x000002df, 0x000002ec, -} // Size: 128 bytes +var en_USIndex = []uint32{ // 30 elements + 0x00000000, 0x00000016, 0x00000048, 0x00000065, + 0x000000b1, 0x000000c4, 0x000000cc, 0x000000de, + 0x000000e7, 0x000000fa, 0x00000101, 0x00000120, + 0x00000129, 0x00000138, 0x00000142, 0x00000147, + 0x00000157, 0x0000016d, 0x00000189, 0x00000199, + 0x000001a3, 0x000001b4, 0x000001bf, 0x000001d5, + 0x000001e5, 0x000001fb, 0x0000020b, 0x00000211, + 0x00000230, 0x00000249, +} // Size: 144 bytes -const en_USData string = "" + // Size: 748 bytes - "\x02Donate to RiseupVPN\x02The RiseupVPN service is expensive to run. Be" + - "cause we don't want to store personal information about you, there is no" + - " accounts or billing for this service. But if you want the service to co" + - "ntinue, donate at least $5 each month at https://riseup.net/donate-vpn" + +const en_USData string = "" + // Size: 585 bytes "\x02Can't contact bitmask\x02Is bitmaskd running? Start bitmask and try " + "again.\x02Missing authentication agent\x02Could not find a polkit authen" + "tication agent. Please run one and try again.\x02Checking status...\x02T" + "urn on\x02Turn RiseupVPN on\x02Turn off\x02Turn RiseupVPN off\x02Cancel" + - "\x02Cancel connection to RiseupVPN\x02Help ...\x02Donate ...!!!!\x02... " + - "I have donated\x02About ...\x02Quit\x02Quit BitmaskVPN\x02Route traffic " + - "through\x02Use RiseupVPN %[1]v gateway\x02Retry\x02blocking internet\x02" + - "RiseupVPN is %[1]v\x02VPN is %[1]v" + "\x02Cancel connection to RiseupVPN\x02Help ...\x02Donate ...!!!!\x02Abou" + + "t ...\x02Quit\x02Quit BitmaskVPN\x02Route traffic through\x02Use RiseupV" + + "PN %[1]v gateway\x02RiseupVPN is on\x02VPN is on\x02RiseupVPN is off\x02" + + "VPN is off\x02RiseupVPN is starting\x02VPN is starting\x02RiseupVPN is s" + + "topping\x02VPN is stopping\x02Retry\x02RiseupVPN is blocking internet" + + "\x02VPN is blocking internet" -var es_ESIndex = []uint32{ // 26 elements - 0x00000000, 0x00000011, 0x00000108, 0x00000129, - 0x00000168, 0x0000018a, 0x000001f1, 0x0000020a, - 0x00000213, 0x00000226, 0x0000022d, 0x0000023d, - 0x00000246, 0x00000267, 0x00000271, 0x0000027a, - 0x0000028b, 0x00000299, 0x000002a0, 0x000002b2, - 0x000002c5, 0x000002ea, 0x000002f5, 0x00000308, - 0x0000031e, 0x0000032e, -} // Size: 128 bytes +var es_ESIndex = []uint32{ // 30 elements + 0x00000000, 0x00000021, 0x00000060, 0x00000082, + 0x000000e9, 0x00000102, 0x0000010b, 0x0000011e, + 0x00000125, 0x00000135, 0x0000013e, 0x0000015f, + 0x00000169, 0x00000172, 0x00000180, 0x00000187, + 0x00000199, 0x000001ac, 0x000001d1, 0x000001ea, + 0x000001f8, 0x0000020f, 0x0000021b, 0x00000235, + 0x00000244, 0x0000025c, 0x00000269, 0x00000274, + 0x00000297, 0x000002af, +} // Size: 144 bytes -const es_ESData string = "" + // Size: 814 bytes - "\x02Dona a RiseupVPN\x02El servicio RiseupVPN es caro de mantener. Como " + - "no queremos guardar ninguna información personal tuya, no hay cuentas ni" + - " servicio de facturación. Si quieres que este servicio continúe, dona al" + - " menos $5 cada mes en https://riseup.net/donate-vpn\x02No se pudo contac" + - "tar con bitmask\x02¿Está corriendo bitmaskd? Arranca bitmask y prueba de" + - " nuevo.\x02Falta un agente de autenticación\x02No se pudo encontrar ning" + - "ún agente de autenticacion de polkit. Por favor lanza uno y prueba de n" + - "uevo.\x02Comprobando el estado...\x02Encender\x02Enciende RiseupVPN\x02A" + - "pagar\x02Apaga RiseupVPN\x02Cancelar\x02Cancela la conexión a RiseupVPN" + - "\x02Ayuda ...\x02Dona ...\x02... ya he donado\x02Acerca de ...\x02Cerrar" + +const es_ESData string = "" + // Size: 687 bytes + "\x02No se pudo contactar con bitmask\x02¿Está corriendo bitmaskd? Arranc" + + "a bitmask y prueba de nuevo.\x02Falta un agente de autenticación\x02No s" + + "e pudo encontrar ningún agente de autenticacion de polkit. Por favor lan" + + "za uno y prueba de nuevo.\x02Comprobando el estado...\x02Encender\x02Enc" + + "iende RiseupVPN\x02Apagar\x02Apaga RiseupVPN\x02Cancelar\x02Cancela la c" + + "onexión a RiseupVPN\x02Ayuda ...\x02Dona ...\x02Acerca de ...\x02Cerrar" + "\x02Cerrar BitmaskVPN\x02Salir a través de\x02Usa la salida de RiseupVPN" + - " por %[1]v\x02Reintentar\x02internet bloqueada\x02RiseupVPN está %[1]v" + - "\x02VPN está %[1]v" + " por %[1]v\x02RiseupVPN esta encendida\x02VPN encendida\x02RiseupVPN est" + + "a apagada\x02VPN apagada\x02RiseupVPN esta arrancando\x02VPN arrancando" + + "\x02RiseupVPN esta apagando\x02VPN apagando\x02Reintentar\x02RiseupVPN e" + + "sta bloqueando internet\x02VPN bloqueando internet" - // Total table size 1818 bytes (1KiB); checksum: 21DEB3F +var pt_BRIndex = []uint32{ // 30 elements + 0x00000000, 0x0000002c, 0x00000086, 0x000000b1, + 0x00000122, 0x00000141, 0x00000147, 0x00000159, + 0x00000162, 0x00000177, 0x00000180, 0x000001a1, + 0x000001ab, 0x000001c2, 0x000001cc, 0x000001d3, + 0x000001e5, 0x00000203, 0x00000225, 0x0000023c, + 0x0000024f, 0x00000269, 0x0000027f, 0x0000029e, + 0x000002b9, 0x000002d6, 0x000002ef, 0x00000300, + 0x00000326, 0x00000348, +} // Size: 144 bytes + +const pt_BRData string = "" + // Size: 840 bytes + "\x02Não foi possível se comunicar com bitmask\x02Você tem certeza que bi" + + "tmaskd está sendo executado? Inicie o bitmask e tente novamente.\x02Um a" + + "gente de autenticação está faltando\x02Não foi possível encontrar um age" + + "nte de autenticação polkit. Por favor, execute um agente e tente novamen" + + "te.\x02Verificando o estado da VPN...\x02Ligar\x02Ligar a RiseupVPN\x02D" + + "esligar\x02Desligar a RiseupVPN\x02Cancelar\x02Cancelar a conexão à Rise" + + "upVPN\x02Ajuda ...\x02Fazer uma doação ...\x02Sobre ...\x02Fechar\x02Fec" + + "har BitmaskVPN\x02Rotear o tráfego através de\x02Usar o gateway %[1]v da" + + " RiseupVPN\x02RiseupVPN está ligada\x02A VPN está ligada\x02RiseupVPN es" + + "tá desligada\x02A VPN está desligada\x02RiseupVPN está sendo iniciada" + + "\x02A VPN está sendo iniciada\x02RiseupVPN está sendo parada\x02A VPN es" + + "tá sendo parada\x02Tentar novamente\x02RiseupVPN está bloqueando a Inter" + + "net\x02A VPN está bloqueando a Internet" + + // Total table size 2544 bytes (2KiB); checksum: FDED99FB diff --git a/locales/en-US/messages.gotext.json b/locales/en-US/messages.gotext.json index 1559f61..bb021cf 100644 --- a/locales/en-US/messages.gotext.json +++ b/locales/en-US/messages.gotext.json @@ -1,23 +1,6 @@ { "language": "en-US", "messages": [ - { - "id": "Donate to RiseupVPN", - "message": "Donate to RiseupVPN", - "translation": "Donate to RiseupVPN", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": [ - "donationText", - "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn" - ], - "message": "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn", - "translation": "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn", - "translatorComment": "Copied from source.", - "fuzzy": true - }, { "id": "Can't contact bitmask", "message": "Can't contact bitmask", @@ -97,11 +80,6 @@ "message": "Donate ...", "translation": "Donate ...!!!!" }, - { - "id": "... I have donated", - "message": "... I have donated", - "translation": "... I have donated" - }, { "id": "About ...", "message": "About ...", @@ -137,45 +115,80 @@ } ] }, + { + "id": "RiseupVPN is on", + "message": "RiseupVPN is on", + "translation": "RiseupVPN is on", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "VPN is on", + "message": "VPN is on", + "translation": "VPN is on", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "RiseupVPN is off", + "message": "RiseupVPN is off", + "translation": "RiseupVPN is off", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "VPN is off", + "message": "VPN is off", + "translation": "VPN is off", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "RiseupVPN is starting", + "message": "RiseupVPN is starting", + "translation": "RiseupVPN is starting", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "VPN is starting", + "message": "VPN is starting", + "translation": "VPN is starting", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "RiseupVPN is stopping", + "message": "RiseupVPN is stopping", + "translation": "RiseupVPN is stopping", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "VPN is stopping", + "message": "VPN is stopping", + "translation": "VPN is stopping", + "translatorComment": "Copied from source.", + "fuzzy": true + }, { "id": "Retry", "message": "Retry", "translation": "Retry" }, { - "id": "blocking internet", - "message": "blocking internet", - "translation": "blocking internet" - }, - { - "id": "RiseupVPN is {StatusStr}", - "message": "RiseupVPN is {StatusStr}", - "translation": "RiseupVPN is {StatusStr}", - "placeholders": [ - { - "id": "StatusStr", - "string": "%[1]v", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "statusStr" - } - ] + "id": "RiseupVPN is blocking internet", + "message": "RiseupVPN is blocking internet", + "translation": "RiseupVPN is blocking internet", + "translatorComment": "Copied from source.", + "fuzzy": true }, { - "id": "VPN is {StatusStr}", - "message": "VPN is {StatusStr}", - "translation": "VPN is {StatusStr}", - "placeholders": [ - { - "id": "StatusStr", - "string": "%[1]v", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "statusStr" - } - ] + "id": "VPN is blocking internet", + "message": "VPN is blocking internet", + "translation": "VPN is blocking internet", + "translatorComment": "Copied from source.", + "fuzzy": true } ] } diff --git a/locales/es-ES/messages.gotext.json b/locales/es-ES/messages.gotext.json index c7b4a87..a140b78 100644 --- a/locales/es-ES/messages.gotext.json +++ b/locales/es-ES/messages.gotext.json @@ -1,19 +1,6 @@ { "language": "es-ES", "messages": [ - { - "id": "Donate to RiseupVPN", - "message": "Donate to RiseupVPN", - "translation": "Dona a RiseupVPN" - }, - { - "id": [ - "donationText", - "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn" - ], - "message": "The RiseupVPN service is expensive to run. Because we don't want to store personal information about you, there is no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month at https://riseup.net/donate-vpn", - "translation": "El servicio RiseupVPN es caro de mantener. Como no queremos guardar ninguna información personal tuya, no hay cuentas ni servicio de facturación. Si quieres que este servicio continúe, dona al menos $5 cada mes en https://riseup.net/donate-vpn" - }, { "id": "Can't contact bitmask", "message": "Can't contact bitmask", @@ -85,11 +72,6 @@ "message": "Donate ...", "translation": "Dona ..." }, - { - "id": "... I have donated", - "message": "... I have donated", - "translation": "... ya he donado" - }, { "id": "About ...", "message": "About ...", @@ -112,7 +94,7 @@ }, { "id": "Use RiseupVPN {Name} gateway", - "message": "Use RiskieupVPN {Name} gateway", + "message": "Use RiseupVPN {Name} gateway", "translation": "Usa la salida de RiseupVPN por {Name}", "placeholders": [ { @@ -125,45 +107,60 @@ } ] }, + { + "id": "RiseupVPN is on", + "message": "RiseupVPN is on", + "translation": "RiseupVPN esta encendida" + }, + { + "id": "VPN is on", + "message": "VPN is on", + "translation": "VPN encendida" + }, + { + "id": "RiseupVPN is off", + "message": "RiseupVPN is off", + "translation": "RiseupVPN esta apagada" + }, + { + "id": "VPN is off", + "message": "VPN is off", + "translation": "VPN apagada" + }, + { + "id": "RiseupVPN is starting", + "message": "RiseupVPN is starting", + "translation": "RiseupVPN esta arrancando" + }, + { + "id": "VPN is starting", + "message": "VPN is starting", + "translation": "VPN arrancando" + }, + { + "id": "RiseupVPN is stopping", + "message": "RiseupVPN is stopping", + "translation": "RiseupVPN esta apagando" + }, + { + "id": "VPN is stopping", + "message": "VPN is stopping", + "translation": "VPN apagando" + }, { "id": "Retry", "message": "Retry", "translation": "Reintentar" }, { - "id": "blocking internet", - "message": "blocking internet", - "translation": "internet bloqueada" + "id": "RiseupVPN is blocking internet", + "message": "RiseupVPN is blocking internet", + "translation": "RiseupVPN esta bloqueando internet" }, { - "id": "RiseupVPN is {StatusStr}", - "message": "RiseupVPN is {StatusStr}", - "translation": "RiseupVPN está {StatusStr}", - "placeholders": [ - { - "id": "StatusStr", - "string": "%[1]v", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "statusStr" - } - ] - }, - { - "id": "VPN is {StatusStr}", - "message": "VPN is {StatusStr}", - "translation": "VPN está {StatusStr}", - "placeholders": [ - { - "id": "StatusStr", - "string": "%[1]v", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "statusStr" - } - ] + "id": "VPN is blocking internet", + "message": "VPN is blocking internet", + "translation": "VPN bloqueando internet" } ] } diff --git a/locales/pt-BR/messages.gotext.json b/locales/pt-BR/messages.gotext.json new file mode 100644 index 0000000..460ef73 --- /dev/null +++ b/locales/pt-BR/messages.gotext.json @@ -0,0 +1,166 @@ +{ + "language": "pt-BR", + "messages": [ + { + "id": "Can't contact bitmask", + "message": "Can't contact bitmask", + "translation": "Não foi possível se comunicar com bitmask" + }, + { + "id": [ + "notRunning", + "Is bitmaskd running? Start bitmask and try again." + ], + "message": "Is bitmaskd running? Start bitmask and try again.", + "translation": "Você tem certeza que bitmaskd está sendo executado? Inicie o bitmask e tente novamente." + }, + { + "id": "Missing authentication agent", + "message": "Missing authentication agent", + "translation": "Um agente de autenticação está faltando" + }, + { + "id": [ + "missingAuthAgent", + "Could not find a polkit authentication agent. Please run one and try again." + ], + "message": "Could not find a polkit authentication agent. Please run one and try again.", + "translation": "Não foi possível encontrar um agente de autenticação polkit. Por favor, execute um agente e tente novamente." + }, + { + "id": "Checking status...", + "message": "Checking status...", + "translation": "Verificando o estado da VPN..." + }, + { + "id": "Turn on", + "message": "Turn on", + "translation": "Ligar" + }, + { + "id": "Turn RiseupVPN on", + "message": "Turn RiseupVPN on", + "translation": "Ligar a RiseupVPN" + }, + { + "id": "Turn off", + "message": "Turn off", + "translation": "Desligar" + }, + { + "id": "Turn RiseupVPN off", + "message": "Turn RiseupVPN off", + "translation": "Desligar a RiseupVPN" + }, + { + "id": "Cancel", + "message": "Cancel", + "translation": "Cancelar" + }, + { + "id": "Cancel connection to RiseupVPN", + "message": "Cancel connection to RiseupVPN", + "translation": "Cancelar a conexão à RiseupVPN" + }, + { + "id": "Help ...", + "message": "Help ...", + "translation": "Ajuda ..." + }, + { + "id": "Donate ...", + "message": "Donate ...", + "translation": "Fazer uma doação ..." + }, + { + "id": "About ...", + "message": "About ...", + "translation": "Sobre ..." + }, + { + "id": "Quit", + "message": "Quit", + "translation": "Fechar" + }, + { + "id": "Quit BitmaskVPN", + "message": "Quit BitmaskVPN", + "translation": "Fechar BitmaskVPN" + }, + { + "id": "Route traffic through", + "message": "Route traffic through", + "translation": "Rotear o tráfego através de" + }, + { + "id": "Use RiseupVPN {Name} gateway", + "message": "Use RiseupVPN {Name} gateway", + "translation": "Usar o gateway {Name} da RiseupVPN", + "placeholders": [ + { + "id": "Name", + "string": "%[1]v", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "name" + } + ] + }, + { + "id": "RiseupVPN is on", + "message": "RiseupVPN is on", + "translation": "RiseupVPN está ligada" + }, + { + "id": "VPN is on", + "message": "VPN is on", + "translation": "A VPN está ligada" + }, + { + "id": "RiseupVPN is off", + "message": "RiseupVPN is off", + "translation": "RiseupVPN está desligada" + }, + { + "id": "VPN is off", + "message": "VPN is off", + "translation": "A VPN está desligada" + }, + { + "id": "RiseupVPN is starting", + "message": "RiseupVPN is starting", + "translation": "RiseupVPN está sendo iniciada" + }, + { + "id": "VPN is starting", + "message": "VPN is starting", + "translation": "A VPN está sendo iniciada" + }, + { + "id": "RiseupVPN is stopping", + "message": "RiseupVPN is stopping", + "translation": "RiseupVPN está sendo parada" + }, + { + "id": "VPN is stopping", + "message": "VPN is stopping", + "translation": "A VPN está sendo parada" + }, + { + "id": "Retry", + "message": "Retry", + "translation": "Tentar novamente" + }, + { + "id": "RiseupVPN is blocking internet", + "message": "RiseupVPN is blocking internet", + "translation": "RiseupVPN está bloqueando a Internet" + }, + { + "id": "VPN is blocking internet", + "message": "VPN is blocking internet", + "translation": "A VPN está bloqueando a Internet" + } + ] +} diff --git a/systray.go b/systray.go index 51d4ed1..d0bdf93 100644 --- a/systray.go +++ b/systray.go @@ -155,7 +155,6 @@ func (bt *bmTray) addGateways() { } func (bt *bmTray) changeStatus(status string) { - statusStr := status bt.mTurnOn.SetTitle(printer.Sprintf("Turn on")) if bt.waitCh != nil { bt.waitCh <- true @@ -165,12 +164,20 @@ func (bt *bmTray) changeStatus(status string) { switch status { case "on": systray.SetIcon(icon.On) + systray.SetTooltip(printer.Sprintf("RiseupVPN is on")) + bt.mStatus.SetTitle(printer.Sprintf("VPN is on")) + bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is on")) + bt.mTurnOn.Hide() bt.mTurnOff.Show() bt.mCancel.Hide() case "off": systray.SetIcon(icon.Off) + systray.SetTooltip(printer.Sprintf("RiseupVPN is off")) + bt.mStatus.SetTitle(printer.Sprintf("VPN is off")) + bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is off")) + bt.mTurnOn.Show() bt.mTurnOff.Hide() bt.mCancel.Hide() @@ -178,6 +185,10 @@ func (bt *bmTray) changeStatus(status string) { case "starting": bt.waitCh = make(chan bool) go bt.waitIcon() + systray.SetTooltip(printer.Sprintf("RiseupVPN is starting")) + bt.mStatus.SetTitle(printer.Sprintf("VPN is starting")) + bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is starting")) + bt.mTurnOn.Hide() bt.mTurnOff.Hide() bt.mCancel.Show() @@ -185,6 +196,10 @@ func (bt *bmTray) changeStatus(status string) { case "stopping": bt.waitCh = make(chan bool) go bt.waitIcon() + systray.SetTooltip(printer.Sprintf("RiseupVPN is stopping")) + bt.mStatus.SetTitle(printer.Sprintf("VPN is stopping")) + bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is stopping")) + bt.mTurnOn.Hide() bt.mTurnOff.Hide() bt.mCancel.Hide() @@ -192,15 +207,14 @@ func (bt *bmTray) changeStatus(status string) { case "failed": systray.SetIcon(icon.Blocked) bt.mTurnOn.SetTitle(printer.Sprintf("Retry")) + systray.SetTooltip(printer.Sprintf("RiseupVPN is blocking internet")) + bt.mStatus.SetTitle(printer.Sprintf("VPN is blocking internet")) + bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is blocking internet")) + bt.mTurnOn.Show() bt.mTurnOff.Show() bt.mCancel.Hide() - statusStr = printer.Sprintf("blocking internet") } - - systray.SetTooltip(printer.Sprintf("RiseupVPN is %v", statusStr)) - bt.mStatus.SetTitle(printer.Sprintf("VPN is %v", statusStr)) - bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is %v", statusStr)) } func (bt *bmTray) waitIcon() { -- cgit v1.2.3