mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 03:39:57 +02:00
Add support for plural forms
This commit is contained in:
@@ -6,9 +6,16 @@ struct LocaleEN : public Locale
|
||||
{
|
||||
String GetName() const { return "English"_ascii; }
|
||||
|
||||
size_t GetPluralIndex(size_t n) const
|
||||
{
|
||||
// 0: singular, 1: plural
|
||||
return n == 1 ? 0 : 1;
|
||||
}
|
||||
|
||||
void Set() const
|
||||
{
|
||||
using i18n::translation;
|
||||
using i18n::pluralForm;
|
||||
}
|
||||
|
||||
String GetIntroText() const
|
||||
@@ -132,7 +139,6 @@ struct LocaleEN : public Locale
|
||||
"\n"
|
||||
"If you have any questions about what is and isn't against the rules, feel free to contact a moderator.";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Locale const &Locale_EN = LocaleEN{};
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common/Localization.h"
|
||||
|
||||
extern Locale const &Locale_EN;
|
||||
|
Reference in New Issue
Block a user