From 0432b9090a396efc5a547a2e08a0a05398ad3a68 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 10 Jan 2017 22:10:32 -0500 Subject: [PATCH] TLS: Aligned source with Taskserver --- src/TLSClient.cpp | 11 +++++------ src/l10n/deu-DEU.h | 4 ---- src/l10n/eng-USA.h | 4 ---- src/l10n/epo-RUS.h | 4 ---- src/l10n/esp-ESP.h | 4 ---- src/l10n/fra-FRA.h | 4 ---- src/l10n/ita-ITA.h | 4 ---- src/l10n/jpn-JPN.h | 4 ---- src/l10n/pol-POL.h | 4 ---- src/l10n/por-PRT.h | 4 ---- 10 files changed, 5 insertions(+), 42 deletions(-) diff --git a/src/TLSClient.cpp b/src/TLSClient.cpp index db9d7e02f..61132d041 100644 --- a/src/TLSClient.cpp +++ b/src/TLSClient.cpp @@ -47,7 +47,6 @@ #include #include #include -#include #define MAX_BUF 16384 @@ -191,7 +190,7 @@ void TLSClient::init ( if (_debug && ret == GNUTLS_E_INVALID_REQUEST) std::cout << "c: ERROR Priority error at: " << err << '\n'; - throw format (STRING_TLS_INIT_FAIL, gnutls_strerror (ret)); // All + throw format ("Error initializing TLS. {1}", gnutls_strerror (ret)); // All } // Apply the x509 credentials to the current session. @@ -253,7 +252,7 @@ void TLSClient::connect (const std::string& host, const std::string& port) free (res); if (p == NULL) - throw format (STRING_CMD_SYNC_CONNECT, host, port); + throw format ("Could not connect to {1} {2}", host, port); #if GNUTLS_VERSION_NUMBER >= 0x030100 gnutls_handshake_set_timeout (_session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT); // 3.1.0 @@ -284,10 +283,10 @@ void TLSClient::connect (const std::string& host, const std::string& port) gnutls_free (out.data); // All std::string error {(const char*) out.data}; - throw format (STRING_CMD_SYNC_HANDSHAKE, error); + throw format ("Handshake failed. {1}", error); } #else - throw format (STRING_CMD_SYNC_HANDSHAKE, gnutls_strerror (ret)); // All + throw format ("Handshake failed. {1}", gnutls_strerror (ret)); // All #endif } @@ -301,7 +300,7 @@ void TLSClient::connect (const std::string& host, const std::string& port) { if (_debug) std::cout << "c: ERROR Certificate verification failed.\n"; - throw format (STRING_TLS_INIT_FAIL, gnutls_strerror (ret)); // All + throw format ("Error initializing TLS. {1}", gnutls_strerror (ret)); // All } #endif diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index a9b9b08ac..70a025325 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "Das Server-Konto wurde verschoben. Bitte Konfiguration folgendermaßen ändern:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA-Zertifikat nicht gefunden." -#define STRING_CMD_SYNC_CONNECT "Konnte nicht mit {1} {2} verbinden." -#define STRING_CMD_SYNC_HANDSHAKE "Verbindungsaufbau gescheitert. {1}" #define STRING_CMD_SYNC_TRUST_CA "Entweder ein CA-Zertifikat bereitstellen oder Prüfung deaktivieren, nicht jedoch beides." #define STRING_CMD_SYNC_TRUST_OBS "Erlaubte Werte der 'taskd.trust'-Option sind nur noch 'strict', 'ignore hostname' und 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Möchten Sie, dass diese Abhängigkeitskette korrigiert wird?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Unbekannten Namen nicht erkannt '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "Das UDA '{1}' hat den selben Namen wie eine eingebaute Eigenschaft, und ist daher nicht erlaubt." #define STRING_INVALID_MOD "Die '{1}'-Eigenschaft erlaubt keinen Wert '{2}'." #define STRING_INVALID_SORT_COL "Nach Spalte '{1}' kann nicht sortiert weden." -#define STRING_TLS_INIT_FAIL "Fehler bei der TLS-Initialisierung. {1}" #define STRING_ERROR_DETAILS "Die Option 'calendar.details.report' muss einen einzelnen Report-Namen enthalten." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index b97d2af53..e689aa99d 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -488,8 +488,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "The server account has been relocated. Please update your configuration using:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA certificate not found." -#define STRING_CMD_SYNC_CONNECT "Could not connect to {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Handshake failed. {1}" #define STRING_CMD_SYNC_TRUST_CA "You should either provide a CA certificate or override verification, but not both." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -667,7 +665,6 @@ #define STRING_DEPEND_FIX_CHAIN "Would you like the dependency chain fixed?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Cannot get unrecognized name '{1}'." // Eval @@ -758,7 +755,6 @@ #define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." -#define STRING_TLS_INIT_FAIL "Error initializing TLS. {1}" #define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index bc042d318..a1a8432c0 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "La servila konto transloĝiĝis. Bonvolu aktualigi via agordo kun:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA certificate not found." -#define STRING_CMD_SYNC_CONNECT "Ne povis konekti al {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Handshake failed. {1}" #define STRING_CMD_SYNC_TRUST_CA "You should either provide a CA certificate or override verification, but not both." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Ĉu vi volas, ke la dependeca ĉeno repariĝus?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Ne povis inspekti nekonatan nomon '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "UDA '{1}' kaj enkonstruita atributo havas la saman nomon. Tio estas malpermesita." #define STRING_INVALID_MOD "Atributo '{1}' ne permesas valoron '{2}'." #define STRING_INVALID_SORT_COL "Kolumno '{1}' ne estas valida kampo por ordigi." -#define STRING_TLS_INIT_FAIL "Erara eko de TLS. {1}" #define STRING_ERROR_DETAILS "Agordo 'calendar.details.report' devas enhavi sole unu raportnomon." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index bec9c96a7..71b7e22a8 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -498,8 +498,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "La cuenta del servidor ha sido reubicada. Por favor, actualice su configuración utilizando:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" // |esp-ESP|==|eng-USA| #define STRING_CMD_SYNC_BAD_CA "Certificado CA no encontrado." -#define STRING_CMD_SYNC_CONNECT "No se pudo conectar a {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Handshake fallido. {1}" #define STRING_CMD_SYNC_TRUST_CA "Debe proveer un certificado CA o la verificación de sobrescritura, pero no ambos." #define STRING_CMD_SYNC_TRUST_OBS "Los ajustes de 'taskd.trust' ahora solo pueden contener uno de los valores 'strict', 'ignore hostname' o 'allow all'." #define STRING_CMD_DIAG_USAGE "Detalles de plataforma, construcción y entorno" @@ -678,7 +676,6 @@ #define STRING_DEPEND_FIX_CHAIN "¿Desea que la cadena de dependencias sea arreglada?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: No se pudo obtener el nombre no reconocido '{1}'." // Eval @@ -769,7 +766,6 @@ #define STRING_UDA_COLLISION "El UDA denominado '{1}' es el mismo que un atributo del núcleo, y no está permitido." #define STRING_INVALID_MOD "El atributo '{1}' no admite un valor '{2}'." #define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido." -#define STRING_TLS_INIT_FAIL "Error inicializando TLS. {1}" #define STRING_ERROR_DETAILS "El ajuste 'calendar.details.report' debe contener un único nombre de informe." #define STRING_ERROR_NO_FILTER "Los filtros de línea de comando no están soportados por este comando." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index a3b4f43ee..beca6a2ab 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "The server account has been relocated. Please update your configuration using:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA certificate not found." -#define STRING_CMD_SYNC_CONNECT "Could not connect to {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Handshake failed. {1}" #define STRING_CMD_SYNC_TRUST_CA "You should either provide a CA certificate or override verification, but not both." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Would you like the dependency chain fixed?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Cannot get unrecognized name '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "L'ADU nommé '{1}' est le même qu'un attribut du noyau, et ce n'est pas autorisé." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." -#define STRING_TLS_INIT_FAIL "Erreur en initialisant TLS. {1}" #define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index 287931916..e7c80c6ee 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -489,8 +489,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "The server account has been relocated. Please update your configuration using:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA certificate not found." -#define STRING_CMD_SYNC_CONNECT "Could not connect to {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Handshake failed. {1}" #define STRING_CMD_SYNC_TRUST_CA "You should either provide a CA certificate or override verification, but not both." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -668,7 +666,6 @@ #define STRING_DEPEND_FIX_CHAIN "Si desidera riparare la catena delle dipendenze?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Impossibile ottenere il nome non riconosciuto '{1}'." // Eval @@ -759,7 +756,6 @@ #define STRING_UDA_COLLISION "L'UDA '{1}' ha lo stesso nome di un attributo di sistema, e ciò non è permesso." #define STRING_INVALID_MOD "L'attributo '{1}' non ammette un valore pari a '{2}'." #define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido." -#define STRING_TLS_INIT_FAIL "Error initializing TLS. {1}" #define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/jpn-JPN.h b/src/l10n/jpn-JPN.h index 4857322ae..c97b81cc1 100644 --- a/src/l10n/jpn-JPN.h +++ b/src/l10n/jpn-JPN.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "The server account has been relocated. Please update your configuration using:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "CA certificate が見つからない。" -#define STRING_CMD_SYNC_CONNECT "{1} {2} に接続できない。" -#define STRING_CMD_SYNC_HANDSHAKE "ハンドシェーク失敗。 {1}" #define STRING_CMD_SYNC_TRUST_CA "You should either provide a CA certificate or override verification, but not both." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Would you like the dependency chain fixed?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Cannot get unrecognized name '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted." #define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'." #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." -#define STRING_TLS_INIT_FAIL "TLS初期化でエラー。 {1}" #define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index b177b0ab9..a31e59bc5 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "Konto na serwerze zostało przeniesione. Proszę uaktualnij swoją konfigurację używając:" #define STRING_CMD_SYNC_RELOCATE1 "konfiguracji taskd.server {1}" #define STRING_CMD_SYNC_BAD_CA "Certyfikat CA nie znaleziony." -#define STRING_CMD_SYNC_CONNECT "Nie mogę połączyć się z {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "Nieudany handshake. {1}" #define STRING_CMD_SYNC_TRUST_CA "Powinieneś udostępnić certyfikat CA lub nadpisać weryfikację. Wybierz jedną z opcji." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Czy chcesz naprawić łańcuch zależności?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Nie mogę pobrać nierozpoznanej nazwy '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "Nazwa UDA '{1}' jest jedną z nazw atrybutów podstawowych i dlatego jest niedozwolona." #define STRING_INVALID_MOD "Atrybut '{1}' nie zezwala na wartość '{2}'." #define STRING_INVALID_SORT_COL "Kolumna '{1}' nie jest poprawnym parametrem sortowania." -#define STRING_TLS_INIT_FAIL "Błąd inicjalizacji TLS." #define STRING_ERROR_DETAILS "Zmienna 'calendar.details.report' musi zawierać nazwę raportu." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made." diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index 909f59d2c..77525aa0b 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -490,8 +490,6 @@ #define STRING_CMD_SYNC_RELOCATE0 "A sua conta no servidor foi relocalizada. Por favor ajuste a configuração usando:" #define STRING_CMD_SYNC_RELOCATE1 "task config taskd.server {1}" // |por-PRT|==|eng-USA| #define STRING_CMD_SYNC_BAD_CA "Certificado CA não encontrado." -#define STRING_CMD_SYNC_CONNECT "Não foi possível connectar a {1} {2}" -#define STRING_CMD_SYNC_HANDSHAKE "'Handshake' falhou. {1}" #define STRING_CMD_SYNC_TRUST_CA "Deve fornecer um certificado CA ou desactivar a verificação, mas não ambos." #define STRING_CMD_SYNC_TRUST_OBS "The 'taskd.trust' settings may now only contain a value of 'strict', 'ignore hostname' or 'allow all'." @@ -669,7 +667,6 @@ #define STRING_DEPEND_FIX_CHAIN "Deseja que a cadeia de dependências seja corrigida?" // DOM -#define STRING_DOM_UNKNOWN "" #define STRING_DOM_UNREC "DOM: Não foi possível obter nome não reconhecido '{1}'." // Eval @@ -760,7 +757,6 @@ #define STRING_UDA_COLLISION "O UDA '{1}' tem o mesmo nome que um atributo interno, tal não é permitido." #define STRING_INVALID_MOD "O atributo '{1}' não permite o valor '{2}'." #define STRING_INVALID_SORT_COL "A coluna '{1}' não pode ser ordenada." -#define STRING_TLS_INIT_FAIL "Erro a iniciar componente TLS. {1}" #define STRING_ERROR_DETAILS "A definição 'calendar.details.report' pode apenas indicar um nome de relatório." #define STRING_ERROR_NO_FILTER "Command line filters are not supported by this command." #define STRING_ERROR_CONFIRM_SIGINT "Interrupted: No changes made."