diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp
index dca545fe..be1ec4ac 100644
--- a/daemon/HTTPServer.cpp
+++ b/daemon/HTTPServer.cpp
@@ -134,7 +134,7 @@ namespace http {
{
std::string state;
std::string_view stateText;
- switch (eState)
+ switch (eState)
{
case i2p::tunnel::eTunnelStateBuildReplyReceived :
case i2p::tunnel::eTunnelStatePending : state = "building"; break;
@@ -146,7 +146,7 @@ namespace http {
default: state = "unknown"; break;
}
if (stateText.empty ()) stateText = tr(state);
-
+
s << " " << stateText << ((explr) ? " (" + std::string(tr("exploratory")) + ")" : "") << ", "; // TODO:
ShowTraffic(s, bytes);
s << "\r\n";
@@ -172,9 +172,12 @@ namespace http {
auto it = i2p::i18n::languages.find(currLang);
std::string langCode = it->second.ShortCode;
+ // Right to Left language option
+ bool rtl = i2p::client::context.GetLanguage ()->GetRTL();
+
s <<
"\r\n"
- "\r\n"
+ "\r\n"
"
\r\n" /* TODO: Find something to parse html/template system. This is horrible. */
" \r\n"
" \r\n"
@@ -1479,7 +1482,7 @@ namespace http {
reply.body = content;
m_SendBuffer = reply.to_string();
- boost::asio::async_write (*m_Socket, boost::asio::buffer(m_SendBuffer), boost::asio::transfer_all (),
+ boost::asio::async_write (*m_Socket, boost::asio::buffer(m_SendBuffer), boost::asio::transfer_all (),
std::bind (&HTTPConnection::Terminate, shared_from_this (), std::placeholders::_1));
}
diff --git a/i18n/Afrikaans.cpp b/i18n/Afrikaans.cpp
index b69c42ef..0afa086f 100644
--- a/i18n/Afrikaans.cpp
+++ b/i18n/Afrikaans.cpp
@@ -29,6 +29,9 @@ namespace afrikaans // language namespace
return n != 1 ? 1 : 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"failed", "Het misluk"},
@@ -73,7 +76,7 @@ namespace afrikaans // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/Armenian.cpp b/i18n/Armenian.cpp
index 67955d8a..af22d0d9 100644
--- a/i18n/Armenian.cpp
+++ b/i18n/Armenian.cpp
@@ -29,6 +29,9 @@ namespace armenian // language namespace
return n != 1 ? 1 : 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"%.2f KiB", "%.2f ԿիԲ"},
@@ -196,7 +199,7 @@ namespace armenian // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/Chinese.cpp b/i18n/Chinese.cpp
index e3b63ebd..f439bb67 100644
--- a/i18n/Chinese.cpp
+++ b/i18n/Chinese.cpp
@@ -29,6 +29,9 @@ namespace chinese // language namespace
return 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"%.2f KiB", "%.2f KiB"},
@@ -215,7 +218,7 @@ namespace chinese // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/Czech.cpp b/i18n/Czech.cpp
index 94803354..c9697f41 100644
--- a/i18n/Czech.cpp
+++ b/i18n/Czech.cpp
@@ -29,6 +29,9 @@ namespace czech // language namespace
return (n == 1) ? 0 : (n >= 2 && n <= 4) ? 1 : 2;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"%.2f KiB", "%.2f KiB"},
@@ -215,7 +218,7 @@ namespace czech // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/English.cpp b/i18n/English.cpp
index fb774527..eb7067e2 100644
--- a/i18n/English.cpp
+++ b/i18n/English.cpp
@@ -30,6 +30,9 @@ namespace english // language namespace
return n != 1 ? 1 : 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"", ""},
@@ -42,7 +45,7 @@ namespace english // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/French.cpp b/i18n/French.cpp
index 985296a3..2618772f 100644
--- a/i18n/French.cpp
+++ b/i18n/French.cpp
@@ -29,6 +29,9 @@ namespace french // language namespace
return n != 1 ? 1 : 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"%.2f KiB", "%.2f Kio"},
@@ -44,7 +47,7 @@ namespace french // language namespace
{"i2pd webconsole", "Console web i2pd"},
{"Main page", "Page principale"},
{"Router commands", "Commandes du routeur"},
- {"Local Destinations", "Destinations locales"},
+ {"Local Destinations", "Destinatioans localeAlger"},
{"LeaseSets", "Jeu de baux"},
{"Tunnels", "Tunnels"},
{"Transit Tunnels", "Tunnels transitoires"},
@@ -215,7 +218,7 @@ namespace french // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/German.cpp b/i18n/German.cpp
index 90ce82f4..b3b35e99 100644
--- a/i18n/German.cpp
+++ b/i18n/German.cpp
@@ -29,6 +29,9 @@ namespace german // language namespace
return n != 1 ? 1 : 0;
}
+ // Right to Left language?
+ static bool rtl = false;
+
static const LocaleStrings strings
{
{"%.2f KiB", "%.2f KiB"},
@@ -210,7 +213,7 @@ namespace german // language namespace
std::shared_ptr GetLocale()
{
- return std::make_shared(language, strings, plurals, [] (int n)->int { return plural(n); });
+ return std::make_shared(language, rtl, strings, plurals, [] (int n)->int { return plural(n); });
}
} // language
diff --git a/i18n/Hebrew.cpp b/i18n/Hebrew.cpp
new file mode 100644
index 00000000..7e56395f
--- /dev/null
+++ b/i18n/Hebrew.cpp
@@ -0,0 +1,202 @@
+/*
+* Copyright (c) 2025, 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