| 66 | } |
| 67 | |
| 68 | void ProcessName(CategoriesHolder::Category::Name name, std::vector<std::string> const & groups, |
| 69 | std::vector<uint32_t> const & types, CategoriesHolder::GroupTranslations & translations, |
| 70 | std::vector<CategoriesHolder::Category::Name> & synonyms) |
| 71 | { |
| 72 | if (name.m_name.empty()) |
| 73 | { |
| 74 | LOG(LWARNING, ("Incorrect name for category:", groups)); |
| 75 | return; |
| 76 | } |
| 77 | |
| 78 | FillPrefixLengthToSuggest(name); |
| 79 | |
| 80 | if (name.m_name.starts_with("U+") && !ParseEmoji(name)) |
| 81 | return; |
| 82 | |
| 83 | if (groups.size() == 1 && types.empty()) |
| 84 | { |
| 85 | // Not a translation, but a category group definition. |
| 86 | translations[groups[0]].push_back(name); |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | synonyms.push_back(name); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | void ProcessCategory(std::string_view line, std::vector<std::string> & groups, std::vector<uint32_t> & types) |
| 95 | { |
no test coverage detected