From 2aa3d03af6cd040a5e941ddf0f8fd213bfc253cd Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Mon, 20 Jul 2020 19:27:27 +0300 Subject: [PATCH] Fix #9422 --- OsmAnd/src/net/osmand/plus/dialogs/DetailsBottomSheet.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/DetailsBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/DetailsBottomSheet.java index cae8be284e..4e8febb56e 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/DetailsBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/DetailsBottomSheet.java @@ -20,6 +20,7 @@ import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.SettingsActivity; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton; import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTwoChoicesButton.OnBottomBtnClickListener; @@ -124,6 +125,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet { for (int i = 0; i < properties.size(); i++) { RenderingRuleProperty property = properties.get(i); final CommonPreference pref = preferences.get(i); + final String propertyName = SettingsActivity.getStringPropertyName(app, property.getAttrName(), property.getName()); if (STREET_LIGHTING.equals(property.getAttrName()) && streetLightNightProp != null) { final CommonPreference streetLightsNightPref = preferences.get(properties.indexOf(streetLightNightProp)); final BottomSheetItemTwoChoicesButton[] item = new BottomSheetItemTwoChoicesButton[1]; @@ -139,7 +141,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet { }) .setCompoundButtonColorId(selectedProfileColorRes) .setChecked(pref.get()) - .setTitle(property.getName()) + .setTitle(propertyName) .setIconHidden(true) .setLayoutId(R.layout.bottom_sheet_item_two_choices) .setOnClickListener(new View.OnClickListener() { @@ -160,7 +162,7 @@ public class DetailsBottomSheet extends BasePreferenceBottomSheet { item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder() .setCompoundButtonColorId(selectedProfileColorRes) .setChecked(pref.get()) - .setTitle(property.getName()) + .setTitle(propertyName) .setIconHidden(true) .setLayoutId(R.layout.bottom_sheet_item_with_switch) .setOnClickListener(new View.OnClickListener() {