diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2016-11-02 12:43:23 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-11 11:05:56 +0300 |
commit | 7bd2eed6a4825cf4036011079fa1c8abb7ef5915 (patch) | |
tree | e37ec9364de67211ce0f4745ffd76da48f974114 /indexer/feature_utils.hpp | |
parent | 36e7c13457c8850567276c60eb25dabb2c720ea5 (diff) |
Naming priority for poi objects was changed
Diffstat (limited to 'indexer/feature_utils.hpp')
-rw-r--r-- | indexer/feature_utils.hpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/indexer/feature_utils.hpp b/indexer/feature_utils.hpp index e7e0f46306..d6ff2ff180 100644 --- a/indexer/feature_utils.hpp +++ b/indexer/feature_utils.hpp @@ -10,11 +10,37 @@ class StringUtf8Multilang; namespace feature { class TypesHolder; + class RegionData; /// Get viewport scale to show given feature. Used in search. int GetFeatureViewportScale(TypesHolder const & types); - void GetPreferredNames(FeatureID const & id, StringUtf8Multilang const & src, string & primary, - string & secondary); - void GetReadableName(FeatureID const & id, StringUtf8Multilang const & src, string & out); + /// Primary name using priority: + /// - device language name; + /// - international name; + /// - english name. + /// Secondary name using priority: + /// - default name; + /// - international name; + /// - country language name; + /// - english name. + /// In case when primary name is empty it will be propagated from secondary and secondary will be + /// cleared. In case when primary name contains secondary name then secondary will be cleared. + void GetPreferredNames(RegionData const & regionData, StringUtf8Multilang const & src, + int8_t const deviceLang, string & primary, string & secondary); + + /// When MWM contains user's language, the priority is the following: + /// - device language name; + /// - default name; + /// - international name; + /// - english name; + /// - country language name. + /// When MWM does not contain user's language, the priority is the following: + /// - device language name; + /// - international name; + /// - english name; + /// - default name; + /// - country language name. + void GetReadableName(RegionData const & regionData, StringUtf8Multilang const & src, + int8_t const deviceLang, string & out); } // namespace feature |