GUI: Support translating peer network names

This commit is contained in:
Luke Dashjr 2022-05-15 21:18:13 +00:00 committed by Hennadii Stepanov
parent f1f9811198
commit 3868ba3a27
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -673,12 +673,17 @@ QString NetworkToQString(Network net)
{
switch (net) {
case NET_UNROUTABLE: return QObject::tr("Unroutable");
case NET_IPV4: return "IPv4";
case NET_IPV6: return "IPv6";
case NET_ONION: return "Onion";
case NET_I2P: return "I2P";
case NET_CJDNS: return "CJDNS";
case NET_INTERNAL: return QObject::tr("Internal");
//: Name of IPv4 network in peer info
case NET_IPV4: return QObject::tr("IPv4", "network name");
//: Name of IPv6 network in peer info
case NET_IPV6: return QObject::tr("IPv6", "network name");
//: Name of Tor network in peer info
case NET_ONION: return QObject::tr("Onion", "network name");
//: Name of I2P network in peer info
case NET_I2P: return QObject::tr("I2P", "network name");
//: Name of CJDNS network in peer info
case NET_CJDNS: return QObject::tr("CJDNS", "network name");
case NET_INTERNAL: return "Internal"; // should never actually happen
case NET_MAX: assert(false);
} // no default case, so the compiler can warn about missing cases
assert(false);