mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
[i18n] use xgettext compatible function format for plural
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
@@ -35,12 +35,12 @@ namespace i18n
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetPlural (const std::string& arg, const int& n) const
|
||||
std::string GetPlural (const std::string& arg, const std::string& arg2, const int& n) const
|
||||
{
|
||||
const auto it = m_Plurals.find(arg);
|
||||
if (it == m_Plurals.end())
|
||||
const auto it = m_Plurals.find(arg2);
|
||||
if (it == m_Plurals.end()) // not found, fallback to english
|
||||
{
|
||||
return arg;
|
||||
return n == 1 ? arg : arg2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user