From 56954f9baaa46b74a676f44ea9cf0952da6072fb Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 14 Jul 2014 15:26:14 +0400 Subject: [PATCH 1/2] Added translations for hillshade --- .../osmand/plus/download/DownloadActivityType.java | 3 +++ .../plus/helpers/FileNameTranslationHelper.java | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java index a9939082d8..c6616af3fb 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java @@ -204,6 +204,9 @@ public class DownloadActivityType { if (bn.endsWith(FileNameTranslationHelper.WIKI_NAME)){ return FileNameTranslationHelper.getWikiName(ctx,bn); } + if (bn.startsWith(FileNameTranslationHelper.HILL_SHADE)){ + return FileNameTranslationHelper.getHillShadeName(ctx, osmandRegions, bn); + } final String lc = bn.toLowerCase(); String std = FileNameTranslationHelper.getStandardMapName(ctx, lc); if (std != null) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/FileNameTranslationHelper.java b/OsmAnd/src/net/osmand/plus/helpers/FileNameTranslationHelper.java index cc30f4cb66..97508398a6 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/FileNameTranslationHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/FileNameTranslationHelper.java @@ -14,6 +14,7 @@ import java.lang.reflect.Field; public class FileNameTranslationHelper { public static final String WIKI_NAME = "_wiki"; + public static final String HILL_SHADE = "Hillshade"; public static String getFileName(Context ctx, OsmandRegions regions, String fileName) { String basename = getBasename(fileName); @@ -21,6 +22,8 @@ public class FileNameTranslationHelper { return getWikiName(ctx,basename); } else if (fileName.endsWith("tts")) { //tts files return getVoiceName(ctx, fileName); + } else if (fileName.startsWith(HILL_SHADE)){ + return getHillShadeName(ctx, regions, basename); } else if (fileName.length() == 2) { //voice recorded files try { Field f = R.string.class.getField("lang_"+fileName); @@ -47,6 +50,14 @@ public class FileNameTranslationHelper { return null; } + public static String getHillShadeName(Context ctx, OsmandRegions regions, String basename) { + String intermName = basename.replace(HILL_SHADE,""); + String hillsh = ctx.getString(R.string.download_hillshade_item) + " "; + + String locName = regions.getLocaleName(intermName.trim().replace(" ", "_")); + return hillsh + locName; + } + public static String getWikiName(Context ctx, String basename){ String cutted = basename.substring(0, basename.indexOf("_wiki")); String wikiName = getStandardLangName(ctx, cutted); From c8042edf63287c554c6a205e2e6a1d461cb7a82f Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 14 Jul 2014 15:35:14 +0400 Subject: [PATCH 2/2] Changed create grop text to icon --- OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 9659f04346..c0adbf11ae 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -854,7 +854,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements R.drawable.ic_action_gshare_light, R.drawable.ic_action_gshare_dark, MenuItem.SHOW_AS_ACTION_IF_ROOM); createMenuItem(menu, CREATE_GROUP, R.string.osmo_create_group, - 0, 0,/*R.drawable.ic_action_marker_light,*/ + R.drawable.ic_action_plus_light, R.drawable.ic_action_plus_dark, MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); createMenuItem(menu, SETTINGS_ID, R.string.settings, R.drawable.ic_action_settings_light, R.drawable.ic_action_settings_dark,