Browse Source

Improve "OpenVPN GUI" tooltip handling (#649)

There is no point in localizing "OpenVPN GUI"
tray icon tooltip. Remove it from resources and
replace with PACKAGE_NAME define.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/652/head
Lev Stipakov 1 year ago committed by GitHub
parent
commit
72a4bb84bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      openvpn-gui-res.h
  2. 1
      res/openvpn-gui-res-cs.rc
  3. 1
      res/openvpn-gui-res-de.rc
  4. 1
      res/openvpn-gui-res-dk.rc
  5. 1
      res/openvpn-gui-res-en.rc
  6. 1
      res/openvpn-gui-res-es.rc
  7. 1
      res/openvpn-gui-res-fa.rc
  8. 1
      res/openvpn-gui-res-fi.rc
  9. 1
      res/openvpn-gui-res-fr.rc
  10. 1
      res/openvpn-gui-res-it.rc
  11. 1
      res/openvpn-gui-res-jp.rc
  12. 1
      res/openvpn-gui-res-kr.rc
  13. 1
      res/openvpn-gui-res-nl.rc
  14. 1
      res/openvpn-gui-res-no.rc
  15. 1
      res/openvpn-gui-res-pl.rc
  16. 1
      res/openvpn-gui-res-pt.rc
  17. 1
      res/openvpn-gui-res-ru.rc
  18. 1
      res/openvpn-gui-res-se.rc
  19. 1
      res/openvpn-gui-res-tr.rc
  20. 1
      res/openvpn-gui-res-ua.rc
  21. 1
      res/openvpn-gui-res-zh-hans.rc
  22. 1
      res/openvpn-gui-res-zh-hant.rc
  23. 4
      tray.c

1
openvpn-gui-res.h

@ -171,7 +171,6 @@
*/ */
/* Tray Tooltips */ /* Tray Tooltips */
#define IDS_TIP_DEFAULT 1000
#define IDS_TIP_CONNECTED 1001 #define IDS_TIP_CONNECTED 1001
#define IDS_TIP_CONNECTING 1003 #define IDS_TIP_CONNECTING 1003
#define IDS_TIP_CONNECTED_SINCE 1004 #define IDS_TIP_CONNECTED_SINCE 1004

1
res/openvpn-gui-res-cs.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Česky - Czech" IDS_LANGUAGE_NAME "Česky - Czech"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nPřipojeno: " IDS_TIP_CONNECTED "\nPřipojeno: "
IDS_TIP_CONNECTING "\nPřipojování: " IDS_TIP_CONNECTING "\nPřipojování: "
IDS_TIP_CONNECTED_SINCE "\nPřipojeno od: " IDS_TIP_CONNECTED_SINCE "\nPřipojeno od: "

1
res/openvpn-gui-res-de.rc

@ -311,7 +311,6 @@ BEGIN
IDS_LANGUAGE_NAME "Deutsch – German" IDS_LANGUAGE_NAME "Deutsch – German"
/* Tray – Resources */ /* Tray – Resources */
IDS_TIP_DEFAULT "OpenVPN GUI"
IDS_TIP_CONNECTED "\nVerbunden mit: " IDS_TIP_CONNECTED "\nVerbunden mit: "
IDS_TIP_CONNECTING "\nVerbinden mit: " IDS_TIP_CONNECTING "\nVerbinden mit: "
IDS_TIP_CONNECTED_SINCE "\nVerbunden seit: " IDS_TIP_CONNECTED_SINCE "\nVerbunden seit: "

1
res/openvpn-gui-res-dk.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Dansk - Danish" IDS_LANGUAGE_NAME "Dansk - Danish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN Brugerprogram"
IDS_TIP_CONNECTED "\nForbundet: " IDS_TIP_CONNECTED "\nForbundet: "
IDS_TIP_CONNECTING "\nEtablere forbindelse: " IDS_TIP_CONNECTING "\nEtablere forbindelse: "
IDS_TIP_CONNECTED_SINCE "\nForbundet siden: " IDS_TIP_CONNECTED_SINCE "\nForbundet siden: "

1
res/openvpn-gui-res-en.rc

@ -324,7 +324,6 @@ BEGIN
IDS_LANGUAGE_NAME "English" IDS_LANGUAGE_NAME "English"
/* Tray – Resources */ /* Tray – Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nConnected to: " IDS_TIP_CONNECTED "\nConnected to: "
IDS_TIP_CONNECTING "\nConnecting to: " IDS_TIP_CONNECTING "\nConnecting to: "
IDS_TIP_CONNECTED_SINCE "\nConnected since: " IDS_TIP_CONNECTED_SINCE "\nConnected since: "

1
res/openvpn-gui-res-es.rc

@ -308,7 +308,6 @@ BEGIN
IDS_LANGUAGE_NAME "Español - Spanish" IDS_LANGUAGE_NAME "Español - Spanish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nConectado a: " IDS_TIP_CONNECTED "\nConectado a: "
IDS_TIP_CONNECTING "\nConectando a: " IDS_TIP_CONNECTING "\nConectando a: "
IDS_TIP_CONNECTED_SINCE "\nConectado desde: " IDS_TIP_CONNECTED_SINCE "\nConectado desde: "

1
res/openvpn-gui-res-fa.rc

@ -318,7 +318,6 @@ BEGIN
IDS_LANGUAGE_NAME "فارسی - Persian(Farsi)" IDS_LANGUAGE_NAME "فارسی - Persian(Farsi)"
/* Tray – Resources */ /* Tray – Resources */
IDS_TIP_DEFAULT "رابط گرافیکی OpenVPN "
IDS_TIP_CONNECTED "\nاتصال به: " IDS_TIP_CONNECTED "\nاتصال به: "
IDS_TIP_CONNECTING "\nدر حال اتصال به: " IDS_TIP_CONNECTING "\nدر حال اتصال به: "
IDS_TIP_CONNECTED_SINCE "\nمتصل شده به: " IDS_TIP_CONNECTED_SINCE "\nمتصل شده به: "

1
res/openvpn-gui-res-fi.rc

@ -309,7 +309,6 @@ BEGIN
IDS_LANGUAGE_NAME "Suomi - Finnish" IDS_LANGUAGE_NAME "Suomi - Finnish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI"
IDS_TIP_CONNECTED "\nYhdistetty kohteeseen: " IDS_TIP_CONNECTED "\nYhdistetty kohteeseen: "
IDS_TIP_CONNECTING "\nYhdistetään kohteeseen: " IDS_TIP_CONNECTING "\nYhdistetään kohteeseen: "
IDS_TIP_CONNECTED_SINCE "\nYhteys luotu: " IDS_TIP_CONNECTED_SINCE "\nYhteys luotu: "

1
res/openvpn-gui-res-fr.rc

@ -309,7 +309,6 @@ BEGIN
IDS_LANGUAGE_NAME "Français - French" IDS_LANGUAGE_NAME "Français - French"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nConnecté à: " IDS_TIP_CONNECTED "\nConnecté à: "
IDS_TIP_CONNECTING "\nConnexion à: " IDS_TIP_CONNECTING "\nConnexion à: "
IDS_TIP_CONNECTED_SINCE "\nConnecté depuis: " IDS_TIP_CONNECTED_SINCE "\nConnecté depuis: "

1
res/openvpn-gui-res-it.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Italiano - Italian" IDS_LANGUAGE_NAME "Italiano - Italian"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nConnesso a: " IDS_TIP_CONNECTED "\nConnesso a: "
IDS_TIP_CONNECTING "\nConnessione in corso a: " IDS_TIP_CONNECTING "\nConnessione in corso a: "
IDS_TIP_CONNECTED_SINCE "\nConnesso da: " IDS_TIP_CONNECTED_SINCE "\nConnesso da: "

1
res/openvpn-gui-res-jp.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "日本語 - Japanese" IDS_LANGUAGE_NAME "日本語 - Japanese"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\n接続済み: " IDS_TIP_CONNECTED "\n接続済み: "
IDS_TIP_CONNECTING "\n接続中: " IDS_TIP_CONNECTING "\n接続中: "
IDS_TIP_CONNECTED_SINCE "\n接続時間: " IDS_TIP_CONNECTED_SINCE "\n接続時間: "

1
res/openvpn-gui-res-kr.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "한국어 - Korean" IDS_LANGUAGE_NAME "한국어 - Korean"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\n연결됨: " IDS_TIP_CONNECTED "\n연결됨: "
IDS_TIP_CONNECTING "\n연결중: " IDS_TIP_CONNECTING "\n연결중: "
IDS_TIP_CONNECTED_SINCE "\n연결 시간: " IDS_TIP_CONNECTED_SINCE "\n연결 시간: "

1
res/openvpn-gui-res-nl.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Nederlands - Dutch" IDS_LANGUAGE_NAME "Nederlands - Dutch"
/* Tray – Resources */ /* Tray – Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nVerbonden met: " IDS_TIP_CONNECTED "\nVerbonden met: "
IDS_TIP_CONNECTING "\nVerbinden met: " IDS_TIP_CONNECTING "\nVerbinden met: "
IDS_TIP_CONNECTED_SINCE "\nVerbonden sinds: " IDS_TIP_CONNECTED_SINCE "\nVerbonden sinds: "

1
res/openvpn-gui-res-no.rc

@ -309,7 +309,6 @@ BEGIN
IDS_LANGUAGE_NAME "Norsk - Norwegian" IDS_LANGUAGE_NAME "Norsk - Norwegian"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN Brukergrensesnitt"
IDS_TIP_CONNECTED "\nTilkoblet: " IDS_TIP_CONNECTED "\nTilkoblet: "
IDS_TIP_CONNECTING "\nKobler til: " IDS_TIP_CONNECTING "\nKobler til: "
IDS_TIP_CONNECTED_SINCE "\nTilkoblet siden: " IDS_TIP_CONNECTED_SINCE "\nTilkoblet siden: "

1
res/openvpn-gui-res-pl.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Polski - Polish" IDS_LANGUAGE_NAME "Polski - Polish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nPołączony z: " IDS_TIP_CONNECTED "\nPołączony z: "
IDS_TIP_CONNECTING "\nŁączenie z: " IDS_TIP_CONNECTING "\nŁączenie z: "
IDS_TIP_CONNECTED_SINCE "\nPołączony od: " IDS_TIP_CONNECTED_SINCE "\nPołączony od: "

1
res/openvpn-gui-res-pt.rc

@ -308,7 +308,6 @@ BEGIN
IDS_LANGUAGE_NAME "Português - Portuguese" IDS_LANGUAGE_NAME "Português - Portuguese"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nConectado a: " IDS_TIP_CONNECTED "\nConectado a: "
IDS_TIP_CONNECTING "\nConectando a: " IDS_TIP_CONNECTING "\nConectando a: "
IDS_TIP_CONNECTED_SINCE "\nConectado desde: " IDS_TIP_CONNECTED_SINCE "\nConectado desde: "

1
res/openvpn-gui-res-ru.rc

@ -311,7 +311,6 @@ BEGIN
IDS_LANGUAGE_NAME "Русский - Russian" IDS_LANGUAGE_NAME "Русский - Russian"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "Графический интерфейс OpenVPN"
IDS_TIP_CONNECTED "\nПодключен к: " IDS_TIP_CONNECTED "\nПодключен к: "
IDS_TIP_CONNECTING "\nПодключение к: " IDS_TIP_CONNECTING "\nПодключение к: "
IDS_TIP_CONNECTED_SINCE "\nПодключен с: " IDS_TIP_CONNECTED_SINCE "\nПодключен с: "

1
res/openvpn-gui-res-se.rc

@ -308,7 +308,6 @@ BEGIN
IDS_LANGUAGE_NAME "Svenska - Swedish" IDS_LANGUAGE_NAME "Svenska - Swedish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI"
IDS_TIP_CONNECTED "\nAnsluten till: " IDS_TIP_CONNECTED "\nAnsluten till: "
IDS_TIP_CONNECTING "\nAnsluter till: " IDS_TIP_CONNECTING "\nAnsluter till: "
IDS_TIP_CONNECTED_SINCE "\nAnsluten sedan: " IDS_TIP_CONNECTED_SINCE "\nAnsluten sedan: "

1
res/openvpn-gui-res-tr.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Türkçe - Turkish" IDS_LANGUAGE_NAME "Türkçe - Turkish"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nBağlanıldı: " IDS_TIP_CONNECTED "\nBağlanıldı: "
IDS_TIP_CONNECTING "\nBağlanılıyor: " IDS_TIP_CONNECTING "\nBağlanılıyor: "
IDS_TIP_CONNECTED_SINCE "\nBağlanıldı: " IDS_TIP_CONNECTED_SINCE "\nBağlanıldı: "

1
res/openvpn-gui-res-ua.rc

@ -310,7 +310,6 @@ BEGIN
IDS_LANGUAGE_NAME "Українська - Ukrainian" IDS_LANGUAGE_NAME "Українська - Ukrainian"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI "
IDS_TIP_CONNECTED "\nЗ'єднано з узлом: " IDS_TIP_CONNECTED "\nЗ'єднано з узлом: "
IDS_TIP_CONNECTING "\nЗ'єднання з: " IDS_TIP_CONNECTING "\nЗ'єднання з: "
IDS_TIP_CONNECTED_SINCE "\nЗ'єднано з такого часу: " IDS_TIP_CONNECTED_SINCE "\nЗ'єднано з такого часу: "

1
res/openvpn-gui-res-zh-hans.rc

@ -312,7 +312,6 @@ BEGIN
IDS_LANGUAGE_NAME "简体中文 - Chinese (Simplified)" IDS_LANGUAGE_NAME "简体中文 - Chinese (Simplified)"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI"
IDS_TIP_CONNECTED "\n已连接至: " IDS_TIP_CONNECTED "\n已连接至: "
IDS_TIP_CONNECTING "\n正在连接至: " IDS_TIP_CONNECTING "\n正在连接至: "
IDS_TIP_CONNECTED_SINCE "\n连接自: " IDS_TIP_CONNECTED_SINCE "\n连接自: "

1
res/openvpn-gui-res-zh-hant.rc

@ -312,7 +312,6 @@ BEGIN
IDS_LANGUAGE_NAME "繁體中文 - Chinese (Traditional)" IDS_LANGUAGE_NAME "繁體中文 - Chinese (Traditional)"
/* Tray - Resources */ /* Tray - Resources */
IDS_TIP_DEFAULT "OpenVPN GUI"
IDS_TIP_CONNECTED "\n已連線至: " IDS_TIP_CONNECTED "\n已連線至: "
IDS_TIP_CONNECTING "\n正在連線至: " IDS_TIP_CONNECTING "\n正在連線至: "
IDS_TIP_CONNECTED_SINCE "\n連線自: " IDS_TIP_CONNECTED_SINCE "\n連線自: "

4
tray.c

@ -434,7 +434,7 @@ ShowTrayIcon()
ni.uFlags = NIF_MESSAGE | NIF_TIP | NIF_ICON; ni.uFlags = NIF_MESSAGE | NIF_TIP | NIF_ICON;
ni.uCallbackMessage = WM_NOTIFYICONTRAY; ni.uCallbackMessage = WM_NOTIFYICONTRAY;
ni.hIcon = LoadLocalizedSmallIcon(ID_ICO_DISCONNECTED); ni.hIcon = LoadLocalizedSmallIcon(ID_ICO_DISCONNECTED);
_tcsncpy(ni.szTip, LoadLocalizedString(IDS_TIP_DEFAULT), _countof(ni.szTip)); _tcsncpy(ni.szTip, _T(PACKAGE_NAME), _countof(_T(PACKAGE_NAME)));
Shell_NotifyIcon(NIM_ADD, &ni); Shell_NotifyIcon(NIM_ADD, &ni);
} }
@ -449,7 +449,7 @@ SetTrayIcon(conn_state_t state)
UINT icon_id; UINT icon_id;
connection_t *cc = NULL; /* a connected config */ connection_t *cc = NULL; /* a connected config */
_tcsncpy(msg, LoadLocalizedString(IDS_TIP_DEFAULT), _countof(ni.szTip)); _tcsncpy(msg, _T(PACKAGE_NAME), _countof(_T(PACKAGE_NAME)));
_tcsncpy(msg_connected, LoadLocalizedString(IDS_TIP_CONNECTED), _countof(msg_connected)); _tcsncpy(msg_connected, LoadLocalizedString(IDS_TIP_CONNECTED), _countof(msg_connected));
_tcsncpy(msg_connecting, LoadLocalizedString(IDS_TIP_CONNECTING), _countof(msg_connecting)); _tcsncpy(msg_connecting, LoadLocalizedString(IDS_TIP_CONNECTING), _countof(msg_connecting));

Loading…
Cancel
Save