Merge pull request #650 from afischerdev/app-trans
App: Added more strings in resources
This commit is contained in:
commit
5979df131b
14 changed files with 951 additions and 77 deletions
|
|
@ -10,7 +10,6 @@ import android.annotation.SuppressLint;
|
|||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
|
|
@ -214,7 +213,8 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
.build();
|
||||
|
||||
} catch (IllegalStateException e) {
|
||||
Toast.makeText(this, "Too much data for download. Please reduce.", Toast.LENGTH_LONG).show();
|
||||
Object data;
|
||||
Toast.makeText(this, R.string.msg_too_much_data, Toast.LENGTH_LONG).show();
|
||||
|
||||
e.printStackTrace();
|
||||
return;
|
||||
|
|
@ -264,7 +264,7 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
if (workInfo.getState() == WorkInfo.State.ENQUEUED) {
|
||||
Toast.makeText(this, "Download scheduled. Check internet connection if it doesn't start.", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.msg_download_start, Toast.LENGTH_LONG).show();
|
||||
mProgressIndicator.hide();
|
||||
mProgressIndicator.setIndeterminate(true);
|
||||
mProgressIndicator.show();
|
||||
|
|
@ -279,7 +279,7 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
String segmentName = progress.getString(DownloadWorker.PROGRESS_SEGMENT_NAME);
|
||||
int percent = progress.getInt(DownloadWorker.PROGRESS_SEGMENT_PERCENT, 0);
|
||||
if (percent > 0) {
|
||||
mDownloadSummaryInfo.setText("Downloading .. " + segmentName);
|
||||
mDownloadSummaryInfo.setText(getString(R.string.msg_download_started) + segmentName);
|
||||
}
|
||||
if (percent > 0) {
|
||||
mProgressIndicator.setIndeterminate(false);
|
||||
|
|
@ -295,13 +295,13 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
String result;
|
||||
switch (workInfo.getState()) {
|
||||
case FAILED:
|
||||
result = "Download failed";
|
||||
result = getString(R.string.msg_download_failed);
|
||||
break;
|
||||
case CANCELLED:
|
||||
result = "Download cancelled";
|
||||
result = getString(R.string.msg_download_cancel);
|
||||
break;
|
||||
case SUCCEEDED:
|
||||
result = "Download succeeded";
|
||||
result = getString(R.string.msg_download_succeed);
|
||||
break;
|
||||
default:
|
||||
result = "";
|
||||
|
|
@ -349,12 +349,12 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
switch (id) {
|
||||
case DIALOG_CONFIRM_DELETE_ID:
|
||||
builder
|
||||
.setTitle("Confirm Delete")
|
||||
.setMessage("Really delete?").setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_delete)
|
||||
.setMessage(R.string.summary_delete).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
deleteSelectedTiles();
|
||||
}
|
||||
}).setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
}).setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
}
|
||||
});
|
||||
|
|
@ -362,9 +362,9 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
|
||||
case DIALOG_CONFIRM_NEXTSTEPS_ID:
|
||||
builder
|
||||
.setTitle("Version Problem")
|
||||
.setMessage("The base version for tiles has changed. What to do?")
|
||||
.setPositiveButton("Continue with current download, delete other old data", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_version)
|
||||
.setMessage(R.string.summary_version)
|
||||
.setPositiveButton(R.string.action_version1, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
ArrayList<Integer> allTiles = mBInstallerView.getSelectedTiles(MASK_INSTALLED_RD5);
|
||||
|
|
@ -376,11 +376,11 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
}
|
||||
downloadSelectedTiles();
|
||||
}
|
||||
}).setNegativeButton("Select all for download and start", new DialogInterface.OnClickListener() {
|
||||
}).setNegativeButton(R.string.action_version2, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
downloadInstalledTiles();
|
||||
}
|
||||
}).setNeutralButton("Cancel now, complete on an other day", new DialogInterface.OnClickListener() {
|
||||
}).setNeutralButton(R.string.action_version3, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
File tmplookupFile = new File(mBaseDir, "brouter/profiles2/lookups.dat.tmp");
|
||||
tmplookupFile.delete();
|
||||
|
|
@ -391,17 +391,17 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
|
||||
case DIALOG_CONFIRM_GETDIFFS_ID:
|
||||
builder
|
||||
.setTitle("Version Differences")
|
||||
.setMessage("The base version for some tiles is different. What to do?")
|
||||
.setPositiveButton("Download all different tiles", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_version_diff)
|
||||
.setMessage(R.string.summary_version_diff)
|
||||
.setPositiveButton(R.string.action_version_diff1, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
downloadDiffVersionTiles();
|
||||
}
|
||||
}).setNegativeButton("Drop all different tiles", new DialogInterface.OnClickListener() {
|
||||
}).setNegativeButton(R.string.action_version_diff2, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dropDiffVersionTiles();
|
||||
}
|
||||
}).setNeutralButton("Cancel now, complete on an other day", new DialogInterface.OnClickListener() {
|
||||
}).setNeutralButton(R.string.action_version_diff3, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
|
|
@ -409,9 +409,9 @@ public class BInstallerActivity extends AppCompatActivity {
|
|||
return builder.create();
|
||||
case DIALOG_NEW_APP_NEEDED_ID:
|
||||
builder
|
||||
.setTitle("App Version")
|
||||
.setMessage("The new data version needs a new app. Please update BRouter first")
|
||||
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_version)
|
||||
.setMessage(R.string.summary_new_version)
|
||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
private static final int DIALOG_PICKWAYPOINT_ID = 10;
|
||||
private static final int DIALOG_SELECTBASEDIR_ID = 11;
|
||||
private static final int DIALOG_MAINACTION_ID = 12;
|
||||
private static final int DIALOG_OLDDATAHINT_ID = 13;
|
||||
//private static final int DIALOG_OLDDATAHINT_ID = 13;
|
||||
private static final int DIALOG_SHOW_REPEAT_TIMEOUT_HELP_ID = 16;
|
||||
private final Set<Integer> dialogIds = new HashSet<>();
|
||||
private BRouterView mBRouterView;
|
||||
|
|
@ -133,7 +133,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
|
||||
switch (id) {
|
||||
case DIALOG_SELECTPROFILE_ID:
|
||||
builder.setTitle("Select a routing profile");
|
||||
builder.setTitle(R.string.action_select_profile);
|
||||
builder.setItems(availableProfiles, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int item) {
|
||||
selectedProfile = availableProfiles[item];
|
||||
|
|
@ -142,9 +142,9 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_MAINACTION_ID:
|
||||
builder.setTitle("Select Main Action");
|
||||
builder.setTitle(R.string.main_action);
|
||||
builder.setItems(
|
||||
new String[]{"Download Manager", "BRouter App"},
|
||||
new String[]{getString(R.string.main_action_1), getString(R.string.main_action_2)},
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int item) {
|
||||
if (item == 0)
|
||||
|
|
@ -153,7 +153,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
showADialog(DIALOG_SELECTPROFILE_ID);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getString(R.string.close), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
|
|
@ -161,19 +161,15 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
return builder.create();
|
||||
case DIALOG_SHOW_DM_INFO_ID:
|
||||
builder
|
||||
.setTitle("BRouter Download Manager")
|
||||
.setMessage(
|
||||
"*** Attention: ***\n\n" + "The Download Manager is used to download routing-data "
|
||||
+ "files which can be up to 170MB each. Do not start the Download Manager "
|
||||
+ "on a cellular data connection without a data plan! "
|
||||
+ "Download speed is restricted to 16 MBit/s.")
|
||||
.setPositiveButton("I know", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_download)
|
||||
.setMessage(R.string.summary_download)
|
||||
.setPositiveButton(R.string.i_know, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
Intent intent = new Intent(BRouterActivity.this, BInstallerActivity.class);
|
||||
startActivity(intent);
|
||||
showNewDialog(DIALOG_MAINACTION_ID);
|
||||
}
|
||||
}).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
}).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
|
|
@ -181,18 +177,15 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
return builder.create();
|
||||
case DIALOG_SHOW_REPEAT_TIMEOUT_HELP_ID:
|
||||
builder
|
||||
.setTitle("Successfully prepared a timeout-free calculation")
|
||||
.setMessage(
|
||||
"You successfully repeated a calculation that previously run into a timeout "
|
||||
+ "when started from your map-tool. If you repeat the same request from your "
|
||||
+ "maptool, with the exact same destination point and a close-by starting point, "
|
||||
+ "this request is guaranteed not to time out.")
|
||||
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
.setTitle(R.string.title_timeoutfree)
|
||||
.setMessage(R.string.summary_timeoutfree)
|
||||
.setNegativeButton(R.string.exit, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
/*
|
||||
case DIALOG_OLDDATAHINT_ID:
|
||||
builder
|
||||
.setTitle("Local setup needs reset")
|
||||
|
|
@ -202,12 +195,13 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
+ "Before downloading new datafiles made for the new table, "
|
||||
+ "you have to reset your local setup by 'moving away' (or deleting) "
|
||||
+ "your <basedir>/brouter directory and start a new setup by calling the " + "BRouter App again.")
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
*/
|
||||
case DIALOG_ROUTINGMODES_ID:
|
||||
builder.setTitle(message);
|
||||
builder.setMultiChoiceItems(routingModes, routingModesChecked,
|
||||
|
|
@ -217,7 +211,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
routingModesChecked[which] = isChecked;
|
||||
}
|
||||
});
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
mBRouterView.configureService(routingModes, routingModesChecked);
|
||||
}
|
||||
|
|
@ -225,9 +219,9 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
return builder.create();
|
||||
case DIALOG_EXCEPTION_ID:
|
||||
builder
|
||||
.setTitle("An Error occured")
|
||||
.setTitle(R.string.error)
|
||||
.setMessage(errorMessage)
|
||||
.setPositiveButton("OK",
|
||||
.setPositiveButton(R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
mBRouterView.continueProcessing();
|
||||
|
|
@ -235,12 +229,12 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_TEXTENTRY_ID:
|
||||
builder.setTitle("Enter SDCARD base dir:");
|
||||
builder.setTitle(R.string.title_sdcard);
|
||||
builder.setMessage(message);
|
||||
final EditText input = new EditText(this);
|
||||
// input.setText(defaultbasedir);
|
||||
builder.setView(input);
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
String basedir = input.getText().toString();
|
||||
mBRouterView.startSetup(new File(basedir), true, false);
|
||||
|
|
@ -248,7 +242,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_SELECTBASEDIR_ID:
|
||||
builder.setTitle("Choose brouter data base dir:");
|
||||
builder.setTitle(getString(R.string.action_choose_folder));
|
||||
// builder.setMessage( message );
|
||||
builder.setSingleChoiceItems(basedirOptions, 0, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
|
|
@ -256,7 +250,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
selectedBasedir = item;
|
||||
}
|
||||
});
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
if (selectedBasedir < availableBasedirs.size()) {
|
||||
mBRouterView.startSetup(availableBasedirs.get(selectedBasedir), true, false);
|
||||
|
|
@ -267,7 +261,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_VIASELECT_ID:
|
||||
builder.setTitle("Check VIA Selection:");
|
||||
builder.setTitle(R.string.action_via_select);
|
||||
builder.setMultiChoiceItems(availableVias, getCheckedBooleanArray(availableVias.length),
|
||||
new DialogInterface.OnMultiChoiceClickListener() {
|
||||
@Override
|
||||
|
|
@ -279,7 +273,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
}
|
||||
}
|
||||
});
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
mBRouterView.updateViaList(selectedVias);
|
||||
mBRouterView.startProcessing(selectedProfile);
|
||||
|
|
@ -287,7 +281,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_NOGOSELECT_ID:
|
||||
builder.setTitle("Check NoGo Selection:");
|
||||
builder.setTitle(R.string.action_nogo_select);
|
||||
String[] nogoNames = new String[nogoList.size()];
|
||||
for (int i = 0; i < nogoList.size(); i++)
|
||||
nogoNames[i] = nogoList.get(i).name;
|
||||
|
|
@ -299,7 +293,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
nogoEnabled[which] = isChecked;
|
||||
}
|
||||
});
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
mBRouterView.updateNogoList(nogoEnabled);
|
||||
mBRouterView.startProcessing(selectedProfile);
|
||||
|
|
@ -325,21 +319,21 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
List<String> slist = new ArrayList<>();
|
||||
// Neutral button
|
||||
if (wpCount == 0) {
|
||||
slist.add("Server-Mode");
|
||||
slist.add(getString(R.string.action_servermode));
|
||||
} else if (wpCount == -3) {
|
||||
slist.add("Info");
|
||||
slist.add(getString(R.string.action_info));
|
||||
} else if (wpCount >= 2) {
|
||||
slist.add("Calc Route");
|
||||
slist.add(getString(R.string.action_calc_route));
|
||||
}
|
||||
|
||||
if (wpCount == 0) {
|
||||
slist.add("Profile Settings");
|
||||
slist.add(getString(R.string.action_profile_settings));
|
||||
}
|
||||
// Positive button
|
||||
if (wpCount == -3 || wpCount == -1) {
|
||||
slist.add("Share GPX");
|
||||
slist.add(getString(R.string.action_share));
|
||||
} else if (wpCount >= 0) {
|
||||
String selectLabel = wpCount == 0 ? "Select from" : "Select to/via";
|
||||
String selectLabel = wpCount == 0 ? getString(R.string.action_select_from) : getString(R.string.action_select_to);
|
||||
slist.add(selectLabel);
|
||||
}
|
||||
|
||||
|
|
@ -407,16 +401,16 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
*/
|
||||
|
||||
// Negative button
|
||||
builder.setNegativeButton("Exit", (dialog, which) -> {
|
||||
builder.setNegativeButton(R.string.exit, (dialog, which) -> {
|
||||
finish();
|
||||
});
|
||||
|
||||
return builder.create();
|
||||
case DIALOG_MODECONFIGOVERVIEW_ID:
|
||||
builder
|
||||
.setTitle("Success")
|
||||
.setTitle(R.string.success)
|
||||
.setMessage(message)
|
||||
.setPositiveButton("Exit",
|
||||
.setPositiveButton(R.string.exit,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finish();
|
||||
|
|
@ -424,7 +418,7 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
});
|
||||
return builder.create();
|
||||
case DIALOG_PICKWAYPOINT_ID:
|
||||
builder.setTitle(wpCount > 0 ? "Select to/via" : "Select from");
|
||||
builder.setTitle(wpCount == 0 ? getString(R.string.action_select_from) : getString(R.string.action_select_to));
|
||||
builder.setItems(availableWaypoints, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int item) {
|
||||
mBRouterView.updateWaypointList(availableWaypoints[item]);
|
||||
|
|
@ -472,11 +466,11 @@ public class BRouterActivity extends AppCompatActivity implements ActivityCompat
|
|||
//startActivityForResult(i, 100);
|
||||
someActivityResultLauncher.launch(i);
|
||||
} else {
|
||||
Toast.makeText(this, "no profile data", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.msg_no_profile, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, selectedProfile + ", no used profile", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, selectedProfile + getString(R.string.msg_no_used_profile), Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,14 +380,14 @@ public class BRouterView extends View {
|
|||
try {
|
||||
cor.readAllPoints();
|
||||
} catch (Exception e) {
|
||||
msg = "Error reading waypoints: " + e;
|
||||
msg = getContext().getString(R.string.msg_read_wpt_error)+ ": " + e;
|
||||
}
|
||||
|
||||
int size = cor.allpoints.size();
|
||||
if (size < 1)
|
||||
msg = "coordinate source does not contain any waypoints!";
|
||||
msg = getContext().getString(R.string.msg_no_wpt);
|
||||
if (size > 1000)
|
||||
msg = "coordinate source contains too much waypoints: " + size + "(please use from/to/via names)";
|
||||
msg = String.format(getContext().getString(R.string.msg_too_much_wpts), size);
|
||||
}
|
||||
|
||||
if (msg != null) {
|
||||
|
|
@ -471,13 +471,13 @@ public class BRouterView extends View {
|
|||
if (needsWaypointSelection) {
|
||||
StringBuilder msg;
|
||||
if (wpList.size() == 0) {
|
||||
msg = new StringBuilder("Expecting waypoint selection\n" + "(coordinate-source: " + cor.basedir + cor.rootdir + ")");
|
||||
msg = new StringBuilder(getContext().getString(R.string.msg_no_wpt_selection) + "(coordinate-source: " + cor.basedir + cor.rootdir + ")");
|
||||
} else {
|
||||
msg = new StringBuilder("current waypoint selection:\n");
|
||||
msg = new StringBuilder(getContext().getString(R.string.msg_wpt_selection));
|
||||
for (int i = 0; i < wpList.size(); i++)
|
||||
msg.append(i > 0 ? "->" : "").append(wpList.get(i).name);
|
||||
}
|
||||
((BRouterActivity) getContext()).showResultMessage("Select Action", msg.toString(), wpList.size());
|
||||
((BRouterActivity) getContext()).showResultMessage(getContext().getString(R.string.title_action), msg.toString(), wpList.size());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -718,8 +718,13 @@ public class BRouterView extends View {
|
|||
((BRouterActivity) getContext()).showErrorMessage(cr.getErrorMessage());
|
||||
} else {
|
||||
String memstat = memoryClass + "mb pathPeak " + ((cr.getPathPeak() + 500) / 1000) + "k";
|
||||
String result = "version = BRouter-" + getContext().getString(R.string.app_version) + "\n" + "mem = " + memstat + "\ndistance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
|
||||
+ " m\n" + "plain ascend = " + cr.getPlainAscend() + " m\n" + "estimated time = " + cr.getTime();
|
||||
String result = String.format(getContext().getString(R.string.msg_status_result),
|
||||
getContext().getString(R.string.app_version),
|
||||
memstat,
|
||||
Double.toString(cr.getDistance() / 1000.),
|
||||
Integer.toString(cr.getAscend()),
|
||||
Integer.toString(cr.getPlainAscend()),
|
||||
cr.getTime());
|
||||
|
||||
rawTrack = cr.getFoundRawTrack();
|
||||
|
||||
|
|
@ -728,9 +733,9 @@ public class BRouterView extends View {
|
|||
writeRawTrackToPath(rawTrackPath);
|
||||
}
|
||||
|
||||
String title = "Success";
|
||||
String title = getContext().getString(R.string.success);
|
||||
if (cr.getAlternativeIndex() > 0)
|
||||
title += " / " + cr.getAlternativeIndex() + ". Alternative";
|
||||
title += " / " + cr.getAlternativeIndex() + ". " + getContext().getString(R.string.msg_alternative);
|
||||
|
||||
((BRouterActivity) getContext()).showResultMessage(title, result, rawTrackPath == null ? -1 : -3);
|
||||
trackOutfile = cr.getOutfile();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue