diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-03-22 23:11:48 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-03-22 23:11:48 +0100 |
commit | 582685cf384cc6ca2e837c4e3b2db1c028654d60 (patch) | |
tree | d7c8469f0e6476784a330c4c4c7c9e5eb5eab5f7 /systray.go | |
parent | 2c56f8841b06df96ae7f2166f02e4e630dda020d (diff) |
[i18n] add pt-BR locale
Diffstat (limited to 'systray.go')
-rw-r--r-- | systray.go | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -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() { |