From 5dfe483152149cf5dcae9c906585ed3f027f0c02 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Mon, 19 Dec 2022 00:56:41 +0300 Subject: [PATCH] [i18n] add Czech translation Signed-off-by: R4SAS --- contrib/i2pd.conf | 2 +- i18n/Czech.cpp | 216 ++++++++++++++++++++++++++++++++++++++++++++++ i18n/I18N_langs.h | 2 + 3 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 i18n/Czech.cpp diff --git a/contrib/i2pd.conf b/contrib/i2pd.conf index b281ce8f..b3048ff5 100644 --- a/contrib/i2pd.conf +++ b/contrib/i2pd.conf @@ -126,7 +126,7 @@ port = 7070 # user = i2pd # pass = changeme ## Select webconsole language -## Currently supported english (default), afrikaans, armenian, chinese, french, +## Currently supported english (default), afrikaans, armenian, chinese, czech, french, ## german, italian, russian, spanish, turkmen, ukrainian and uzbek languages # lang = english diff --git a/i18n/Czech.cpp b/i18n/Czech.cpp new file mode 100644 index 00000000..f6ac7188 --- /dev/null +++ b/i18n/Czech.cpp @@ -0,0 +1,216 @@ +/* +* Copyright (c) 2022, The PurpleI2P Project +* +* This file is part of Purple i2pd project and licensed under BSD3 +* +* See full license text in LICENSE file at top of project tree +*/ + +#include +#include +#include +#include +#include "I18N.h" + +// Czech localization file + +namespace i2p +{ +namespace i18n +{ +namespace czech // language namespace +{ + // language name in lowercase + static std::string language = "czech"; + + // See for language plural forms here: + // https://localization-guide.readthedocs.io/en/latest/l10n/pluralforms.html + static int plural (int n) { + return (n == 1) ? 0 : (n >= 2 && n <= 4) ? 1 : 2; + } + + static std::map strings + { + {"KiB", "KiB"}, + {"MiB", "MiB"}, + {"GiB", "GiB"}, + {"building", "vytváří se"}, + {"failed", "selhalo"}, + {"expiring", "končící"}, + {"established", "vytvořeno"}, + {"unknown", "neznámý"}, + {"exploratory", "průzkumné"}, + {"Purple I2P Webconsole", "Purple I2P Webkonsole"}, + {"i2pd webconsole", "i2pd webkonsole"}, + {"Main page", "Hlavní stránka"}, + {"Router commands", "Router příkazy"}, + {"Local Destinations", "Lokální destinace"}, + {"LeaseSets", "LeaseSety"}, + {"Tunnels", "Tunely"}, + {"Transit Tunnels", "Transitní tunely"}, + {"Transports", "Transporty"}, + {"I2P tunnels", "I2P tunely"}, + {"SAM sessions", "SAM relace"}, + {"ERROR", "CHYBA"}, + {"OK", "OK"}, + {"Testing", "Testuji"}, + {"Firewalled", "Za Firewallem"}, + {"Unknown", "Neznámý"}, + {"Proxy", "Proxy"}, + {"Mesh", "Síť"}, + {"Error", "Chyba"}, + {"Clock skew", "Časová nesrovnalost"}, + {"Offline", "Offline"}, + {"Symmetric NAT", "Symetrický NAT"}, + {"Uptime", "Doba provozu"}, + {"Network status", "Status sítě"}, + {"Network status v6", "Status sítě v6"}, + {"Stopping in", "Zastavuji za"}, + {"Family", "Rodina"}, + {"Tunnel creation success rate", "Úspěšnost vytváření tunelů"}, + {"Received", "Přijato"}, + {"KiB/s", "KiB/s"}, + {"Sent", "Odesláno"}, + {"Transit", "Tranzit"}, + {"Data path", "Cesta k data souborům"}, + {"Hidden content. Press on text to see.", "Skrytý kontent. Pro zobrazení, klikni na text."}, + {"Router Ident", "Routerová Identita"}, + {"Router Family", "Rodina routerů"}, + {"Router Caps", "Omezení Routerů"}, + {"Version", "Verze"}, + {"Our external address", "Naše externí adresa"}, + {"supported", "podporováno"}, + {"Routers", "Routery"}, + {"Floodfills", "Floodfilly"}, + {"Client Tunnels", "Klientské tunely"}, + {"Services", "Služby"}, + {"Enabled", "Zapnuto"}, + {"Disabled", "Vypnuto"}, + {"Encrypted B33 address", "Šifrovaná adresa B33"}, + {"Address registration line", "Registrační řádek adresy"}, + {"Domain", "Doména"}, + {"Generate", "Vygenerovat"}, + {"Note: result string can be used only for registering 2LD domains (example.i2p). For registering subdomains please use i2pd-tools.", "Poznámka: výsledný řetězec může být použit pouze pro registraci 2LD domén (example.i2p). Pro registraci subdomén použijte prosím i2pd-tools."}, + {"Address", "Adresa"}, + {"Type", "Typ"}, + {"EncType", "EncType"}, + {"Inbound tunnels", "Příchozí tunely"}, + {"ms", "ms"}, + {"Outbound tunnels", "Odchozí tunely"}, + {"Tags", "Štítky"}, + {"Incoming", "Příchozí"}, + {"Outgoing", "Odchozí"}, + {"Destination", "Destinace"}, + {"Amount", "Množství"}, + {"Incoming Tags", "Příchozí štítky"}, + {"Tags sessions", "Relace štítků"}, + {"Status", "Status"}, + {"Local Destination", "Lokální Destinace"}, + {"Streams", "Toky"}, + {"Close stream", "Uzavřít tok"}, + {"I2CP session not found", "I2CP relace nenalezena"}, + {"I2CP is not enabled", "I2CP není zapnuto"}, + {"Invalid", "Neplatný"}, + {"Store type", "Druh uložení"}, + {"Expires", "Vyprší"}, + {"Non Expired Leases", "Nevypršené Leasy"}, + {"Gateway", "Brána"}, + {"TunnelID", "ID tunelu"}, + {"EndDate", "Datum ukončení"}, + {"not floodfill", "není floodfill"}, + {"Queue size", "Velikost fronty"}, + {"Run peer test", "Spustit peer test"}, + {"Decline transit tunnels", "Odmítnout tranzitní tunely"}, + {"Accept transit tunnels", "Přijmout tranzitní tunely"}, + {"Cancel graceful shutdown", "Zrušit hladké vypnutí"}, + {"Start graceful shutdown", "Zahájit hladké vypnutí"}, + {"Force shutdown", "Vynutit vypnutí"}, + {"Reload external CSS styles", "Znovu načíst externí CSS"}, + {"Note: any action done here are not persistent and not changes your config files.", "Poznámka: žádná vykonaná akce zde není trvalá a nemění konfigurační soubory."}, + {"Logging level", "Úroveň logování"}, + {"Transit tunnels limit", "Limit tranzitních tunelů"}, + {"Change", "Změnit"}, + {"Change language", "Změnit jazyk"}, + {"no transit tunnels currently built", "Žádný tranzitní tunel není momentálně vytvořen"}, + {"SAM disabled", "SAM vypnutý"}, + {"no sessions currently running", "Momentálně nejsou spuštěné žádné relace"}, + {"SAM session not found", "SAM relace nenalezena"}, + {"SAM Session", "SAM Relace"}, + {"Server Tunnels", "Server Tunely"}, + {"Client Forwards", "Přesměrování Klienta"}, + {"Server Forwards", "Přesměrování Serveru"}, + {"Unknown page", "Neznámá stránka"}, + {"Invalid token", "Neplatný token"}, + {"SUCCESS", "ÚSPĚCH"}, + {"Stream closed", "Tok uzavřen"}, + {"Stream not found or already was closed", "Tok nenalezen nebo byl již uzavřen"}, + {"Destination not found", "Destinace nenalezena"}, + {"StreamID can't be null", "StreamID nemůže být null"}, + {"Return to destination page", "Zpět na stránku destinací"}, + {"You will be redirected in 5 seconds", "Budete přesměrováni za 5 vteřin"}, + {"Transit tunnels count must not exceed 65535", "Počet tranzitních tunelů nesmí přesáhnout 65535"}, + {"Back to commands list", "Zpět na list příkazů"}, + {"Register at reg.i2p", "Zaregistrovat na reg.i2p"}, + {"Description", "Popis"}, + {"A bit information about service on domain", "Trochu informací o službě na doméně"}, + {"Submit", "Odeslat"}, + {"Domain can't end with .b32.i2p", "Doména nesmí končit na .b32.i2p"}, + {"Domain must end with .i2p", "Doména musí končit s .i2p"}, + {"Such destination is not found", "Takováto destinace nebyla nalezena"}, + {"Unknown command", "Neznámý příkaz"}, + {"Command accepted", "Příkaz přijat"}, + {"Proxy error", "Chyba proxy serveru"}, + {"Proxy info", "Proxy informace"}, + {"Proxy error: Host not found", "Chyba proxy serveru: Hostitel nenalezen"}, + {"Remote host not found in router's addressbook", "Vzdálený hostitel nebyl nalezen v adresáři routeru"}, + {"You may try to find this host on jump services below", "Můžete se pokusit najít tohoto hostitele na startovacích službách níže"}, + {"Invalid request", "Neplatný požadavek"}, + {"Proxy unable to parse your request", "Proxy server nemohl zpracovat váš požadavek"}, + {"addresshelper is not supported", "Adresshelper není podporován"}, + {"Host", "Hostitel"}, + {"added to router's addressbook from helper", "přidáno do adresáře routeru od pomocníka"}, + {"Click here to proceed:", "Pro pokračování, klikněte zde:"}, + {"Continue", "Pokračovat"}, + {"Addresshelper found", "Adresář nalezen"}, + {"already in router's addressbook", "je již v adresáři routeru"}, + {"Click here to update record:", "Pro aktualizaci záznamu, klikněte zde:"}, + {"invalid request uri", "neplatný URI požadavek"}, + {"Can't detect destination host from request", "Nelze zjistit cílového hostitele z požadavku"}, + {"Outproxy failure", "Outproxy selhání"}, + {"bad outproxy settings", "špatné outproxy nastavení"}, + {"not inside I2P network, but outproxy is not enabled", "není uvnitř I2P sítě a outproxy není nastavena"}, + {"unknown outproxy url", "neznámá outproxy URL"}, + {"cannot resolve upstream proxy", "nelze rozluštit upstream proxy server"}, + {"hostname too long", "Název hostitele je příliš dlouhý"}, + {"cannot connect to upstream socks proxy", "nelze se připojit k upstream socks proxy serveru"}, + {"Cannot negotiate with socks proxy", "Nelze vyjednávat se socks proxy serverem"}, + {"CONNECT error", "Chyba PŘIPOJENÍ"}, + {"Failed to Connect", "Připojení se nezdařilo"}, + {"socks proxy error", "chyba socks proxy serveru"}, + {"failed to send request to upstream", "odeslání žádosti upstream serveru se nezdařilo"}, + {"No Reply From socks proxy", "Žádná odpověď od socks proxy serveru"}, + {"cannot connect", "nelze se připojit"}, + {"http out proxy not implemented", "http out proxy není implementován"}, + {"cannot connect to upstream http proxy", "nelze se připojit k upstream socks proxy serveru"}, + {"Host is down", "Hostitel je nedostupný"}, + {"Can't create connection to requested host, it may be down. Please try again later.", "Připojení k požadovanému hostiteli nelze vytvořit, může být nedostupný. Zkuste to, prosím, znovu později."}, + {"", ""}, + }; + + static std::map> plurals + { + {"days", {"den", "dny", "dní", "dní"}}, + {"hours", {"hodina", "hodiny", "hodin", "hodin"}}, + {"minutes", {"minuta", "minuty", "minut", "minut"}}, + {"seconds", {"vteřina", "vteřiny", "vteřin", "vteřin"}}, + {"", {"", "", "", ""}}, + }; + + std::shared_ptr GetLocale() + { + return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); }); + } + +} // language +} // i18n +} // i2p diff --git a/i18n/I18N_langs.h b/i18n/I18N_langs.h index 42c7ba4e..1b03917d 100644 --- a/i18n/I18N_langs.h +++ b/i18n/I18N_langs.h @@ -26,6 +26,7 @@ namespace i18n namespace afrikaans { std::shared_ptr GetLocale (); } namespace armenian { std::shared_ptr GetLocale (); } namespace chinese { std::shared_ptr GetLocale (); } + namespace czech { std::shared_ptr GetLocale (); } namespace english { std::shared_ptr GetLocale (); } namespace french { std::shared_ptr GetLocale (); } namespace german { std::shared_ptr GetLocale (); } @@ -44,6 +45,7 @@ namespace i18n { "afrikaans", {"Afrikaans", "af", i2p::i18n::afrikaans::GetLocale} }, { "armenian", {"hայերէն", "hy", i2p::i18n::armenian::GetLocale} }, { "chinese", {"简体字", "zh-CN", i2p::i18n::chinese::GetLocale} }, + { "czech", {"čeština ", "cs", i2p::i18n::czech::GetLocale} }, { "english", {"English", "en", i2p::i18n::english::GetLocale} }, { "french", {"Français", "fr", i2p::i18n::french::GetLocale} }, { "german", {"Deutsch", "de", i2p::i18n::german::GetLocale} },