Fix release issues

This commit is contained in:
Victor Shcherb 2015-11-25 12:11:25 +01:00
parent 57319bce46
commit bab02e3d08
3 changed files with 29 additions and 3 deletions

View file

@ -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

View file

@ -2200,7 +2200,7 @@
<string name="favourites_context_menu_add">즐겨찾기 추가</string>
<string name="are_you_sure">확실한가요?</string>
<string name="unsaved_changes_will_be_lost">저장되지 않은 변경 내용이 손실 됩니다. 계속 하시겠습니까?</string>
<string name="downloads_left_template">%1$ 다운로드 남았습니다</string>
<string name="downloads_left_template">%1$s 다운로드 남았습니다</string>
<string name="roads">경로</string>
<string name="downloading_number_of_files">다운로드중-%1$d 파일</string>
<string name="show_free_version_banner">무료 버전 배너를 표시</string>

View file

@ -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);