From 3eb7dd51656e67321aa156f29650a0ef63fa8681 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Tue, 23 Jan 2018 17:51:39 +0200 Subject: [PATCH] Made some map styles translatable --- OsmAnd/res/values-ru/strings.xml | 3 +++ OsmAnd/res/values-uk/strings.xml | 4 ++++ OsmAnd/res/values/strings.xml | 3 +++ .../src/net/osmand/plus/render/RendererRegistry.java | 11 ++++++++--- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 351b2df509..18cb7918bd 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -2810,4 +2810,7 @@ Без имени Лаосский Выходной + Зимний/лыжный + Туристический (контраст и детали) + Морской diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 14d984cdb6..fe959178f0 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -3158,4 +3158,8 @@ OSM-одержувачі Всього пожертвувань Вихідний + Зимовий/лижний + Туристичний (контраст і деталі) + Морський + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index e93245d7c9..3885571bf2 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -2842,4 +2842,7 @@ OSM recipients Total donations off + Winter and ski + Touring view (contrast and details) + Nautical diff --git a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java index de54b63de2..617d39b3bd 100644 --- a/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java +++ b/OsmAnd/src/net/osmand/plus/render/RendererRegistry.java @@ -15,6 +15,7 @@ import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.R; import net.osmand.render.RenderingRuleProperty; import net.osmand.render.RenderingRulesStorage; import net.osmand.render.RenderingRulesStorage.RenderingRulesStorageResolver; @@ -31,11 +32,12 @@ public class RendererRegistry { public final static String DEFAULT_RENDER = "OsmAnd"; //$NON-NLS-1$ public final static String DEFAULT_RENDER_FILE_PATH = "default.render.xml"; - public final static String TOURING_VIEW = "Touring view (contrast and details)"; //$NON-NLS-1$ - public final static String WINTER_SKI_RENDER = "Winter and ski"; //$NON-NLS-1$ - public final static String NAUTICAL_RENDER = "Nautical"; //$NON-NLS-1$ public final static String TOPO_RENDER = "Topo"; //$NON-NLS-1$ public final static String MAPNIK_RENDER = "Mapnik"; //$NON-NLS-1$ + // Translatable renders + public static String TOURING_VIEW; + public static String WINTER_SKI_RENDER; + public static String NAUTICAL_RENDER; private RenderingRulesStorage defaultRender = null; private RenderingRulesStorage currentSelectedRender = null; @@ -55,6 +57,9 @@ public class RendererRegistry { public RendererRegistry(OsmandApplication app){ this.app = app; + WINTER_SKI_RENDER = app.getResources().getString(R.string.winter_and_ski_renderer); + TOURING_VIEW = app.getResources().getString(R.string.touring_view_renderer); + NAUTICAL_RENDER = app.getResources().getString(R.string.nautical_renderer); internalRenderers.put(DEFAULT_RENDER, DEFAULT_RENDER_FILE_PATH); internalRenderers.put(TOURING_VIEW, "Touring-view_(more-contrast-and-details)" +".render.xml"); internalRenderers.put(TOPO_RENDER, "topo" + ".render.xml");