mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-04 10:23:06 +02:00
- rename and sort marker related variables
- rename and sort gps related variables - clean up unused strings in AndroidManifest.xml
This commit is contained in:
@@ -504,12 +504,12 @@ public class MapActivity extends com.google.android.maps.MapActivity
|
||||
final boolean isGpsDisabled;
|
||||
switch (state) {
|
||||
case DISABLED:
|
||||
messageId = R.string.status_need_to_enable_gps;
|
||||
messageId = R.string.gps_need_to_enable;
|
||||
isGpsDisabled = true;
|
||||
break;
|
||||
case NO_FIX:
|
||||
case BAD_FIX:
|
||||
messageId = R.string.status_wait_for_gps_fix;
|
||||
messageId = R.string.gps_wait_for_fix;
|
||||
isGpsDisabled = false;
|
||||
break;
|
||||
case GOOD_FIX:
|
||||
@@ -531,7 +531,7 @@ public class MapActivity extends com.google.android.maps.MapActivity
|
||||
if (isGpsDisabled) {
|
||||
// Give a warning about this state.
|
||||
Toast.makeText(MapActivity.this,
|
||||
R.string.error_no_gps,
|
||||
R.string.gps_not_found,
|
||||
Toast.LENGTH_LONG).show();
|
||||
|
||||
// Make clicking take the user to the location settings.
|
||||
|
||||
@@ -369,13 +369,11 @@ public class MyTracks extends TabActivity implements OnTouchListener {
|
||||
try {
|
||||
long waypointId = trackRecordingService.insertWaypoint(request);
|
||||
if (waypointId >= 0) {
|
||||
Toast.makeText(this, R.string.status_marker_inserted,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.marker_insert_success, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return waypointId;
|
||||
} catch (RemoteException e) {
|
||||
Toast.makeText(this, R.string.error_unable_to_insert_marker,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.marker_insert_error, Toast.LENGTH_LONG).show();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -392,7 +390,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
|
||||
// all exceptions it may throw are no longer wrapped in a RemoteException.
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this,
|
||||
getString(R.string.error_unable_to_start_recording),
|
||||
getString(R.string.track_unable_to_start_recording),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
Log.w(TAG, "Unable to start recording.", e);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class WaypointsList extends ListActivity
|
||||
new OnCreateContextMenuListener() {
|
||||
public void onCreateContextMenu(ContextMenu menu, View v,
|
||||
ContextMenuInfo menuInfo) {
|
||||
menu.setHeaderTitle(R.string.waypointslist_this_waypoint);
|
||||
menu.setHeaderTitle(R.string.marker_list_this_marker);
|
||||
AdapterView.AdapterContextMenuInfo info =
|
||||
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
||||
contextPosition = info.position;
|
||||
@@ -83,11 +83,11 @@ public class WaypointsList extends ListActivity
|
||||
if (waypoint != null) {
|
||||
int type = waypoint.getType();
|
||||
menu.add(0, Constants.MENU_SHOW, 0,
|
||||
R.string.waypointslist_show_waypoint);
|
||||
R.string.marker_list_show_on_map);
|
||||
menu.add(0, Constants.MENU_EDIT, 0,
|
||||
R.string.waypointslist_edit_waypoint);
|
||||
R.string.marker_list_edit_marker);
|
||||
menu.add(0, Constants.MENU_DELETE, 0,
|
||||
R.string.waypointslist_delete_waypoint).setEnabled(
|
||||
R.string.marker_list_delete_marker).setEnabled(
|
||||
recordingTrackId < 0 || type == Waypoint.TYPE_WAYPOINT ||
|
||||
info.id != providerUtils.getLastWaypointId(recordingTrackId));
|
||||
}
|
||||
@@ -211,8 +211,7 @@ public class WaypointsList extends ListActivity
|
||||
}
|
||||
long id = insertWaypoint(request);
|
||||
if (id < 0) {
|
||||
Toast.makeText(this, R.string.error_unable_to_insert_marker,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.marker_insert_error, Toast.LENGTH_LONG).show();
|
||||
Log.e(Constants.TAG, "Failed to insert marker.");
|
||||
return;
|
||||
}
|
||||
@@ -227,8 +226,7 @@ public class WaypointsList extends ListActivity
|
||||
if (trackRecordingService != null) {
|
||||
long waypointId = trackRecordingService.insertWaypoint(request);
|
||||
if (waypointId >= 0) {
|
||||
Toast.makeText(this, R.string.status_marker_inserted,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.marker_insert_success, Toast.LENGTH_LONG).show();
|
||||
return waypointId;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -339,7 +339,7 @@ public class SendToFusionTables implements Runnable {
|
||||
|
||||
if (totalLocationsRead == 0) {
|
||||
// Put a marker at the first point of the first valid segment:
|
||||
String name = track.getName() + " " + context.getString(R.string.start);
|
||||
String name = track.getName() + " " + context.getString(R.string.marker_label_start);
|
||||
createNewPoint(name, "", loc, MARKER_TYPE_START);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ public class SendToFusionTables implements Runnable {
|
||||
track.setDescription("<p>" + originalDescription + "</p><p>"
|
||||
+ stringUtils.generateTrackDescription(track, distances, elevations)
|
||||
+ "</p>");
|
||||
String name = track.getName() + " " + context.getString(R.string.end);
|
||||
String name = track.getName() + " " + context.getString(R.string.marker_label_end);
|
||||
return createNewPoint(name, track.getDescription(), lastLocation, MARKER_TYPE_END);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,8 +201,8 @@ public class MapsFacade {
|
||||
iconUrl = END_ICON_URL;
|
||||
}
|
||||
String title = trackName + " "
|
||||
+ (isStart ? context.getString(R.string.start)
|
||||
: context.getString(R.string.end));
|
||||
+ (isStart ? context.getString(R.string.marker_label_start)
|
||||
: context.getString(R.string.marker_label_end));
|
||||
String description = isStart ? "" : trackDescription;
|
||||
return buildMyMapsPlacemarkFeature(title, description, iconUrl, geoPoint);
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ public class TrackRecordingService extends Service {
|
||||
wpt.setIcon(request.getIconUrl());
|
||||
}
|
||||
if (request.getName() == null) {
|
||||
wpt.setName(getString(R.string.waypoint));
|
||||
wpt.setName(getString(R.string.marker_type_waypoint));
|
||||
} else {
|
||||
wpt.setName(request.getName());
|
||||
}
|
||||
@@ -990,7 +990,7 @@ public class TrackRecordingService extends Service {
|
||||
|
||||
// Set the rest of the waypoint data
|
||||
waypoint.setType(Waypoint.TYPE_STATISTICS);
|
||||
waypoint.setName(getString(R.string.statistics));
|
||||
waypoint.setName(getString(R.string.marker_type_statistics));
|
||||
waypoint.setStatistics(waypointStatsBuilder.getStatistics());
|
||||
waypoint.setDescription(utils.generateWaypointDescription(waypoint));
|
||||
waypoint.setIcon(getString(R.string.stats_icon_url));
|
||||
|
||||
Reference in New Issue
Block a user