mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-17 00:14:48 +00:00
Display subtypes in search results
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "indexer/feature_data.hpp"
|
||||
#include "indexer/feature_visibility.hpp"
|
||||
#include "indexer/ftypes_matcher.hpp"
|
||||
#include "indexer/ftypes_subtypes.hpp"
|
||||
#include "indexer/scales.hpp"
|
||||
|
||||
#include "platform/distance.hpp"
|
||||
@@ -440,6 +441,19 @@ vector<int8_t> GetDescriptionLangPriority(RegionData const & regionData)
|
||||
return PrioritizedLanguages(preferredLangs, DefaultLanguage(regionData, preferredLangs));
|
||||
}
|
||||
|
||||
vector<string> GetLocalizedSubtypes(TypesHolder const & types)
|
||||
{
|
||||
TypesHolder copiedTypes = types;
|
||||
copiedTypes.SortBySpec();
|
||||
auto const & classificator = classif();
|
||||
auto subtypes = ftypes::Subtypes::Instance();
|
||||
vector<string> localizedSubtypes;
|
||||
for (auto const type : copiedTypes)
|
||||
if (subtypes.IsSubtype(type))
|
||||
localizedSubtypes.push_back(platform::GetLocalizedTypeName(classificator.GetReadableObjectName(type)));
|
||||
return localizedSubtypes;
|
||||
}
|
||||
|
||||
vector<string> GetCuisines(TypesHolder const & types)
|
||||
{
|
||||
auto const & isCuisine = ftypes::IsCuisineChecker::Instance();
|
||||
|
||||
Reference in New Issue
Block a user