From e1128b51fcc6e65453c5a9911cd986104b7f2e73 Mon Sep 17 00:00:00 2001 From: savsch <119003089+savsch@users.noreply.github.com> Date: Thu, 23 Jan 2025 01:21:00 +0530 Subject: [PATCH] [bookmarks] Make bookmark's title depend on map language Resolves #10117 Signed-off-by: savsch <119003089+savsch@users.noreply.github.com> --- map/bookmark_helpers.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/map/bookmark_helpers.cpp b/map/bookmark_helpers.cpp index 465425bff5..73b12e7d06 100644 --- a/map/bookmark_helpers.cpp +++ b/map/bookmark_helpers.cpp @@ -709,12 +709,14 @@ void SaveFeatureTypes(feature::TypesHolder const & types, kml::BookmarkData & bm std::string GetPreferredBookmarkStr(kml::LocalizableString const & name) { - return kml::GetPreferredBookmarkStr(name, languages::GetCurrentNorm()); + auto const mapLanguageNorm = languages::Normalize(languages::GetCurrentMapLanguage()); + return kml::GetPreferredBookmarkStr(name, mapLanguageNorm); } std::string GetPreferredBookmarkStr(kml::LocalizableString const & name, feature::RegionData const & regionData) { - return kml::GetPreferredBookmarkStr(name, regionData, languages::GetCurrentNorm()); + auto const mapLanguageNorm = languages::Normalize(languages::GetCurrentMapLanguage()); + return kml::GetPreferredBookmarkStr(name, regionData, mapLanguageNorm); } std::string GetLocalizedFeatureType(std::vector const & types) @@ -751,7 +753,7 @@ std::string GetLocalizedBookmarkBaseType(BookmarkBaseType type) std::string GetPreferredBookmarkName(kml::BookmarkData const & bmData) { - return kml::GetPreferredBookmarkName(bmData, languages::GetCurrentOrig()); + return kml::GetPreferredBookmarkName(bmData, languages::GetCurrentMapLanguage()); } void ExpandRectForPreview(m2::RectD & rect)