mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-04 21:37:45 +00:00
Generate correct lang tag count, not hardcoded.
This commit is contained in:
parent
670a725c53
commit
dd005d9027
@ -32,6 +32,8 @@ namespace codegen {
|
||||
namespace lang {
|
||||
namespace {
|
||||
|
||||
constexpr auto kMaxPluralVariants = 6;
|
||||
|
||||
char hexChar(uchar ch) {
|
||||
if (ch < 10) {
|
||||
return '0' + ch;
|
||||
@ -139,8 +141,8 @@ LangString langCounted(ushort key0, ushort tag, float64 value);\n\
|
||||
}
|
||||
header_->stream() << "\
|
||||
\n\
|
||||
constexpr auto lngtags_cnt = 70;\n\
|
||||
constexpr auto lngtags_max_counted_values = 6;\n\
|
||||
constexpr auto lngtags_cnt = " << langpack_.tags.size() << ";\n\
|
||||
constexpr auto lngtags_max_counted_values = " << kMaxPluralVariants << ";\n\
|
||||
\n\
|
||||
enum LangKey {\n";
|
||||
for (auto &entry : langpack_.entries) {
|
||||
|
Loading…
Reference in New Issue
Block a user