diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index fcf5a8548e..bdaa91c4b6 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -184,6 +184,22 @@ task updateNoTranslate(type: Copy) { into 'res/values/' } +task validateTranslate { + new java.io.File("res").eachFileRecurse groovy.io.FileType.FILES, { + if(it.name == "strings.xml" || it.name == "phrases.xml") { + it.eachLine { line -> + if( line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") || + line.contains(" \$s") || line.contains(" \$d") || line.contains(" \$f") || + line.contains("1\$ ") || line.contains("2\$ ") || line.contains("3\$ ") || + (line.contains("% \$") || line.contains("% 1") || + line.contains("% 2") || line.contains("% 3") )) { + throw new GradleException("Incorrect translation " + it.getAbsolutePath() + " " + line); + } + } + } + } +} + task collectVoiceAssets(type: Sync) { from "../../resources/voice" into "assets/voice" @@ -265,7 +281,8 @@ collectExternalResources.dependsOn collectVoiceAssets, collectRegionsInfoResources, collectMiscResources, copyStyleIcons, - updateNoTranslate + updateNoTranslate, + validateTranslate // tasks.whenTaskAdded { task -> // if (task.name.startsWith("generate") && task.name.endsWith("Resources")) { // task.dependsOn collectExternalResources diff --git a/OsmAnd/res/values-ko/strings.xml b/OsmAnd/res/values-ko/strings.xml index 27de60094d..c8b2cea3bb 100644 --- a/OsmAnd/res/values-ko/strings.xml +++ b/OsmAnd/res/values-ko/strings.xml @@ -1825,7 +1825,7 @@ 대중교통 정류소 음성 안내 오프라인 지도를 다운로드 하시겠습니까? - %1 $s 지도 다운로드됨 + %1$s 지도 다운로드됨 새로운 지도 다운로드 관리 도로 스타일 @@ -2200,7 +2200,7 @@ 즐겨찾기 추가 확실한가요? 저장되지 않은 변경 내용이 손실 됩니다. 계속 하시겠습니까? - %1$ 다운로드 남았습니다 + %1$s 다운로드 남았습니다 경로 다운로드중-%1$d 파일 무료 버전 배너를 표시 diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index d6bb4c270d..f1847179af 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -277,6 +277,11 @@ public class MapActivityActions implements DialogProvider { adapter.item(R.string.context_menu_item_directions_from).iconColor( R.drawable.ic_action_gdirections_dark).reg(); } + if (getMyApplication().getTargetPointsHelper().getPointToNavigate() != null && + (mapActivity.getRoutingHelper().isFollowingMode() || mapActivity.getRoutingHelper().isRoutePlanningMode())) { + adapter.item(R.string.context_menu_item_last_intermediate_point).iconColor( + R.drawable.ic_action_flage_dark).reg(); + } OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj); final AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity); @@ -290,6 +295,10 @@ public class MapActivityActions implements DialogProvider { OnContextMenuClick click = adapter.getClickAdapter(which); if (click != null) { click.onContextMenuClick(listAdapter, standardId, which, false); + } else if (standardId == R.string.context_menu_item_last_intermediate_point) { + getMyApplication().getTargetPointsHelper().navigateToPoint(new LatLon(latitude, longitude), + true, getMyApplication().getTargetPointsHelper().getIntermediatePoints().size(), + mapActivity.getContextMenu().getPointDescription()); } else if (standardId == R.string.context_menu_item_search) { Intent intent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization().getSearchActivity()); intent.putExtra(SearchActivity.SEARCH_LAT, latitude);