Clean up do_not_translate.xml

Merge urls.xml into do_not_translate.xml
Move my_tracks_serviec_name to strings.xml
This commit is contained in:
Jimmy Shih
2011-11-11 18:55:55 -08:00
parent 0365ac5043
commit cf7be09396
23 changed files with 99 additions and 126 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ limitations under the License.
android:versionCode="33" android:versionCode="33"
android:versionName="1.1.10"> android:versionName="1.1.10">
<application android:icon="@drawable/arrow_icon" <application android:icon="@drawable/arrow_icon"
android:label="@string/app_name" android:label="@string/my_tracks_app_name"
android:name="com.google.android.apps.mytracks.MyTracksApplication" android:name="com.google.android.apps.mytracks.MyTracksApplication"
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgent"> android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgent">
<uses-library android:name="com.google.android.maps" /> <uses-library android:name="com.google.android.maps" />
@@ -162,7 +162,7 @@ limitations under the License.
android:exported="false" /> android:exported="false" />
<service android:name="com.google.android.apps.mytracks.services.TrackRecordingService" <service android:name="com.google.android.apps.mytracks.services.TrackRecordingService"
android:label="@string/track_recording_service_name" android:label="@string/my_tracks_service_name"
android:icon="@drawable/arrow_320" android:icon="@drawable/arrow_320"
android:enabled="true" android:enabled="true"
android:exported="true" android:exported="true"
+9 -4
View File
@@ -31,7 +31,7 @@ limitations under the License.
<TextView <TextView
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/app_name" android:text="@string/my_tracks_app_name"
android:textSize="30sp" /> android:textSize="30sp" />
<TextView <TextView
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -67,6 +67,11 @@ limitations under the License.
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/about_dylan" android:text="@string/about_dylan"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/about_jimmy"
android:textSize="20sp" />
<TextView <TextView
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -75,7 +80,7 @@ limitations under the License.
<TextView <TextView
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/about_rdamazio" android:text="@string/about_rodrigo"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView <TextView
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -100,7 +105,7 @@ limitations under the License.
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/about_version_register" android:id="@+id/about_version_register"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textSize="20sp" /> android:textSize="20sp" />
</TableRow> </TableRow>
@@ -138,7 +143,7 @@ limitations under the License.
android:autoLink="web" android:autoLink="web"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/about_privacy_weburl" android:text="@string/my_tracks_privacy_url"
android:textSize="18sp" /> android:textSize="18sp" />
</TableRow> </TableRow>
@@ -116,7 +116,7 @@ limitations under the License.
android:layout_column="1" android:layout_column="1"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -145,7 +145,7 @@ limitations under the License.
android:layout_column="4" android:layout_column="4"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<LinearLayout <LinearLayout
@@ -201,7 +201,7 @@ limitations under the License.
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:layout_span="2" android:layout_span="2"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -217,7 +217,7 @@ limitations under the License.
android:layout_column="4" android:layout_column="4"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<LinearLayout <LinearLayout
@@ -273,7 +273,7 @@ limitations under the License.
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_span="2" android:layout_span="2"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -289,7 +289,7 @@ limitations under the License.
android:layout_column="4" android:layout_column="4"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<LinearLayout <LinearLayout
@@ -342,7 +342,7 @@ limitations under the License.
android:layout_column="1" android:layout_column="1"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -366,7 +366,7 @@ limitations under the License.
android:layout_column="4" android:layout_column="4"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -400,7 +400,7 @@ limitations under the License.
android:layout_column="1" android:layout_column="1"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -424,7 +424,7 @@ limitations under the License.
android:layout_column="4" android:layout_column="4"
android:layout_marginBottom="-9dip" android:layout_marginBottom="-9dip"
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -461,7 +461,7 @@ limitations under the License.
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_span="2" android:layout_span="2"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
<TextView <TextView
@@ -480,7 +480,7 @@ limitations under the License.
android:layout_marginTop="-9dip" android:layout_marginTop="-9dip"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_span="2" android:layout_span="2"
android:text="@string/unknown" android:text="@string/value_unknown"
android:textColor="@color/stat_label_text" android:textColor="@color/stat_label_text"
android:textSize="40sp" /> android:textSize="40sp" />
</TableRow> </TableRow>
+1 -1
View File
@@ -143,7 +143,7 @@ limitations under the License.
<TextView <TextView
style="@style/StatsUnitSolo" style="@style/StatsUnitSolo"
android:layout_column="5" android:layout_column="5"
android:text="@string/percent" /> android:text="@string/unit_percent" />
</TableRow> </TableRow>
</TableLayout> </TableLayout>
@@ -92,9 +92,9 @@ limitations under the License.
</string-array> </string-array>
<string-array name="display_track_color_values"> <string-array name="display_track_color_values">
<item>@string/track_color_mode_value_none</item> <item>@string/display_track_color_value_none</item>
<item>@string/track_color_mode_value_fixed</item> <item>@string/display_track_color_value_fixed</item>
<item>@string/track_color_mode_value_dynamic</item> <item>@string/display_track_color_value_dynamic</item>
</string-array> </string-array>
<string-array name="file_types"> <string-array name="file_types">
+32 -49
View File
@@ -16,57 +16,40 @@ limitations under the License.
--> -->
<resources> <resources>
<!-- DO NOT TRANSLATE ANY STRINGS IN THIS FILE. --> <!-- DO NOT TRANSLATE ANY STRINGS IN THIS FILE. -->
<string name="about_bart">Bart Niechwiej</string>
<!-- Application Name -->
<string name="app_name">My Tracks</string>
<string name="track_recording_service_name">Track Recording Service</string>
<string name="my_tracks_web_url">mytracks.appspot.com</string>
<!-- About Dialog -->
<string name="about_googlegroups">mytracks@googlegroups.com</string>
<string name="about_privacy_weburl">m.google.com/privacy</string>
<string name="about_bart">Bartłomiej Niechwiej</string>
<string name="about_dylan">Dylan Casey</string> <string name="about_dylan">Dylan Casey</string>
<string name="about_leif">Leif Hendrik Wilden</string> <string name="about_jimmy">Jimmy Shih</string>
<string name="about_rdamazio">Rodrigo Damazio Bovendorp</string> <string name="about_leif">Leif Wilden</string>
<string name="about_rodrigo">Rodrigo Damazio</string>
<string name="about_sandor">Sandor Dornbush</string> <string name="about_sandor">Sandor Dornbush</string>
<string name="display_track_color_value_dynamic">DYNAMIC</string>
<!-- Sensor Type Values --> <string name="display_track_color_value_fixed">FIXED</string>
<string name="sensor_type_value_none">NONE</string> <string name="display_track_color_value_none">NONE</string>
<string name="sensor_type_value_ant">ANT</string> <string name="marker_statistics_icon_url">
<string name="sensor_type_value_srm_ant_bridge">SRM_ANT_BRIDGE</string> http://maps.google.com/mapfiles/ms/micons/ylw-pushpin.png
<string name="sensor_type_value_polar">POLAR</string>
<string name="sensor_type_value_zephyr">ZEPHYR</string>
<!-- Track Color Mode Values -->
<string name="track_color_mode_value_none">NONE</string>
<string name="track_color_mode_value_fixed">FIXED</string>
<string name="track_color_mode_value_dynamic">DYNAMIC</string>
<!-- When a value is unknown. E.g. when speed is unknown '- km/hr'. -->
<string name="unknown">-</string>
<!-- Send to Google URLs -->
<string name="send_google_fusion_tables_url">google.com/fusiontables</string>
<string name="send_google_my_maps_url">maps.google.com</string>
<string name="send_google_docs_url">docs.google.com</string>
<!-- Google Analytics ID -->
<string name="google_analytics_id">UA-7222692-2</string>
<!-- Symbols -->
<string name="percent">%</string>
<!-- Intent Actions -->
<string name="save_intent_action">android.intent.action.SAVE</string>
<string name="start_new_track_action">com.google.android.apps.mytracks.START_NEW_TRACK</string>
<string name="end_current_track_action">
com.google.android.apps.mytracks.END_CURRENT_TRACK
</string> </string>
<string name="marker_waypoint_icon_url">
<!--My Tracks Notifications Permission. --> http://maps.google.com/mapfiles/ms/micons/blue-pushpin.png
<string name="mytracks_notifications_permission"> </string>
<string name="my_tracks_analytics_id">UA-7222692-2</string>
<string name="my_tracks_app_name">My Tracks</string>
<string name="my_tracks_privacy_url">m.google.com/privacy</string>
<string name="my_tracks_web_url">mytracks.appspot.com</string>
<string name="permission_notification_value">
com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS
</string> </string>
</resources> <string name="send_google_docs_url">docs.google.com</string>
<string name="send_google_fusion_tables_url">google.com/fusiontables</string>
<string name="send_google_my_maps_url">maps.google.com</string>
<string name="sensor_type_value_ant">ANT</string>
<string name="sensor_type_value_none">NONE</string>
<string name="sensor_type_value_polar">POLAR</string>
<string name="sensor_type_value_srm_ant_bridge">SRM_ANT_BRIDGE</string>
<string name="sensor_type_value_zephyr">ZEPHYR</string>
<string name="track_action_end">com.google.android.apps.mytracks.END_CURRENT_TRACK</string>
<string name="track_action_save">android.intent.action.SAVE</string>
<string name="track_action_start">com.google.android.apps.mytracks.START_NEW_TRACK</string>
<string name="unit_percent">%</string>
<string name="value_unknown">-</string>
</resources>
+7
View File
@@ -645,6 +645,13 @@ limitations under the License.
Unlisted Unlisted
</string> </string>
<!-- My Tracks Service -->
<string name="my_tracks_service_name"
translation_description="When viewing the 'Running services' on Android, the name for the My
Tracks service.">
My Tracks Service
</string>
<!-- Permission --> <!-- Permission -->
<string name="permission_notification_description" <string name="permission_notification_description"
translation_description="When installing a third-party app that wants to receive My Tracks translation_description="When installing a third-party app that wants to receive My Tracks
+1 -1
View File
@@ -38,7 +38,7 @@ limitations under the License.
<item name="android:gravity">right</item> <item name="android:gravity">right</item>
<item name="android:layout_marginBottom">-9dip</item> <item name="android:layout_marginBottom">-9dip</item>
<item name="android:layout_marginTop">-9dip</item> <item name="android:layout_marginTop">-9dip</item>
<item name="android:text">@string/unknown</item> <item name="android:text">@string/value_unknown</item>
<item name="android:textColor">@color/stat_label_text</item> <item name="android:textColor">@color/stat_label_text</item>
<item name="android:textSize">40sp</item> <item name="android:textSize">40sp</item>
</style> </style>
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- DO NOT TRANSLATE -->
<string name="waypoint_icon_url">http://maps.google.com/mapfiles/ms/micons/blue-pushpin.png</string>
<string name="stats_icon_url">http://maps.google.com/mapfiles/ms/micons/ylw-pushpin.png</string>
</resources>
+1 -1
View File
@@ -38,7 +38,7 @@ limitations under the License.
android:summary="@string/settings_display_track_color_summary" android:summary="@string/settings_display_track_color_summary"
android:entries="@array/display_track_color_options" android:entries="@array/display_track_color_options"
android:entryValues="@array/display_track_color_values" android:entryValues="@array/display_track_color_values"
android:defaultValue="@string/track_color_mode_value_none"/> android:defaultValue="@string/display_track_color_value_none"/>
<PreferenceCategory android:title="@string/settings_display_track_color_fixed" <PreferenceCategory android:title="@string/settings_display_track_color_fixed"
android:key="@string/track_color_mode_fixed_speed_options_key"> android:key="@string/track_color_mode_fixed_speed_options_key">
@@ -139,7 +139,7 @@ public class MyTracks extends TabActivity implements OnTouchListener {
tracker = GoogleAnalyticsTracker.getInstance(); tracker = GoogleAnalyticsTracker.getInstance();
// Start the tracker in manual dispatch mode... // Start the tracker in manual dispatch mode...
tracker.start(getString(R.string.google_analytics_id), getApplicationContext()); tracker.start(getString(R.string.my_tracks_analytics_id), getApplicationContext());
tracker.setProductVersion("android-mytracks", SystemUtils.getMyTracksVersion(this)); tracker.setProductVersion("android-mytracks", SystemUtils.getMyTracksVersion(this));
tracker.trackPageView("/appstart"); tracker.trackPageView("/appstart");
tracker.dispatch(); tracker.dispatch();
@@ -395,10 +395,10 @@ public class SettingsActivity extends PreferenceActivity {
} }
private void updateTrackColorModeSettings(String trackColorMode) { private void updateTrackColorModeSettings(String trackColorMode) {
boolean usesFixedSpeed = trackColorMode.equals( boolean usesFixedSpeed =
getString(R.string.track_color_mode_value_fixed)); trackColorMode.equals(getString(R.string.display_track_color_value_fixed));
boolean usesDynamicSpeed = trackColorMode.equals( boolean usesDynamicSpeed =
getString(R.string.track_color_mode_value_dynamic)); trackColorMode.equals(getString(R.string.display_track_color_value_dynamic));
findPreference(getString(R.string.track_color_mode_fixed_speed_slow_display_key)) findPreference(getString(R.string.track_color_mode_fixed_speed_slow_display_key))
.setEnabled(usesFixedSpeed); .setEnabled(usesFixedSpeed);
@@ -77,7 +77,7 @@ public class StatsUtilities {
} }
public void setUnknown(int id) { public void setUnknown(int id) {
((TextView) activity.findViewById(id)).setText(R.string.unknown); ((TextView) activity.findViewById(id)).setText(R.string.value_unknown);
} }
public void setText(int id, double d, NumberFormat format) { public void setText(int id, double d, NumberFormat format) {
@@ -74,9 +74,9 @@ public class SaveActivity extends Activity {
String action = intent.getAction(); String action = intent.getAction();
String type = intent.getType(); String type = intent.getType();
Uri data = intent.getData(); Uri data = intent.getData();
if (!getString(R.string.save_intent_action).equals(action) || if (!getString(R.string.track_action_save).equals(action)
!TracksColumns.CONTENT_ITEMTYPE.equals(type) || || !TracksColumns.CONTENT_ITEMTYPE.equals(type)
!UriUtils.matchesContentUri(data, TracksColumns.CONTENT_URI)) { || !UriUtils.matchesContentUri(data, TracksColumns.CONTENT_URI)) {
Log.e(TAG, "Got bad save intent: " + intent); Log.e(TAG, "Got bad save intent: " + intent);
finish(); finish();
return; return;
@@ -228,7 +228,7 @@ public class SaveActivity extends Activity {
Uri uri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, trackId); Uri uri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, trackId);
Intent intent = new Intent(ctx, SaveActivity.class); Intent intent = new Intent(ctx, SaveActivity.class);
intent.setAction(ctx.getString(R.string.save_intent_action)); intent.setAction(ctx.getString(R.string.track_action_save));
intent.setDataAndType(uri, TracksColumns.CONTENT_ITEMTYPE); intent.setDataAndType(uri, TracksColumns.CONTENT_ITEMTYPE);
intent.putExtra(EXTRA_FILE_FORMAT, exportFormat.ordinal()); intent.putExtra(EXTRA_FILE_FORMAT, exportFormat.ordinal());
intent.putExtra(EXTRA_SHARE_FILE, shareFile); intent.putExtra(EXTRA_SHARE_FILE, shareFile);
@@ -163,7 +163,7 @@ public class SendActivity extends Activity implements ProgressIndicator {
tracker = GoogleAnalyticsTracker.getInstance(); tracker = GoogleAnalyticsTracker.getInstance();
// Start the tracker in manual dispatch mode... // Start the tracker in manual dispatch mode...
tracker.start(getString(R.string.google_analytics_id), tracker.start(getString(R.string.my_tracks_analytics_id),
getApplicationContext()); getApplicationContext());
tracker.setProductVersion("android-mytracks", tracker.setProductVersion("android-mytracks",
SystemUtils.getMyTracksVersion(this)); SystemUtils.getMyTracksVersion(this));
@@ -49,12 +49,13 @@ public class TrackPathPainterFactory {
String colorMode = prefs.getString(context.getString(R.string.track_color_mode_key), null); String colorMode = prefs.getString(context.getString(R.string.track_color_mode_key), null);
Log.i(TAG, "Creating track path painter of type: " + colorMode); Log.i(TAG, "Creating track path painter of type: " + colorMode);
if (colorMode == null || colorMode.equals(context.getString(R.string.track_color_mode_value_none))) { if (colorMode == null
|| colorMode.equals(context.getString(R.string.display_track_color_value_none))) {
return new SingleColorTrackPathPainter(context); return new SingleColorTrackPathPainter(context);
} else if (colorMode.equals(context.getString(R.string.track_color_mode_value_fixed))) { } else if (colorMode.equals(context.getString(R.string.display_track_color_value_fixed))) {
return new DynamicSpeedTrackPathPainter(context, return new DynamicSpeedTrackPathPainter(context,
new FixedSpeedTrackPathDescriptor(context)); new FixedSpeedTrackPathDescriptor(context));
} else if (colorMode.equals(context.getString(R.string.track_color_mode_value_dynamic))) { } else if (colorMode.equals(context.getString(R.string.display_track_color_value_dynamic))) {
return new DynamicSpeedTrackPathPainter(context, return new DynamicSpeedTrackPathPainter(context,
new DynamicSpeedTrackPathDescriptor(context)); new DynamicSpeedTrackPathDescriptor(context));
} else { } else {
@@ -97,9 +97,9 @@ public class ControlRecordingService extends IntentService implements ServiceCon
String action = intent.getAction(); String action = intent.getAction();
if (action != null) { if (action != null) {
try { try {
if (action.equals(getString(R.string.start_new_track_action))) { if (action.equals(getString(R.string.track_action_start))) {
trackRecordingService.startNewTrack(); trackRecordingService.startNewTrack();
} else if (action.equals(getString(R.string.end_current_track_action))) { } else if (action.equals(getString(R.string.track_action_end))) {
trackRecordingService.endCurrentTrack(); trackRecordingService.endCurrentTrack();
} }
} catch (RemoteException e) { } catch (RemoteException e) {
@@ -494,7 +494,7 @@ public class TrackRecordingService extends Service {
PendingIntent contentIntent = PendingIntent.getActivity( PendingIntent contentIntent = PendingIntent.getActivity(
this, 0 /* requestCode */, new Intent(this, MyTracks.class), this, 0 /* requestCode */, new Intent(this, MyTracks.class),
0 /* flags */); 0 /* flags */);
notification.setLatestEventInfo(this, getString(R.string.app_name), notification.setLatestEventInfo(this, getString(R.string.my_tracks_app_name),
getString(R.string.track_record_notification), contentIntent); getString(R.string.track_record_notification), contentIntent);
notification.flags += Notification.FLAG_NO_CLEAR; notification.flags += Notification.FLAG_NO_CLEAR;
apiLevelAdapter.startForeground(this, notificationManager, 1, apiLevelAdapter.startForeground(this, notificationManager, 1,
@@ -963,7 +963,7 @@ public class TrackRecordingService extends Service {
private void buildMarker(Waypoint wpt, WaypointCreationRequest request) { private void buildMarker(Waypoint wpt, WaypointCreationRequest request) {
wpt.setType(Waypoint.TYPE_WAYPOINT); wpt.setType(Waypoint.TYPE_WAYPOINT);
if (request.getIconUrl() == null) { if (request.getIconUrl() == null) {
wpt.setIcon(getString(R.string.waypoint_icon_url)); wpt.setIcon(getString(R.string.marker_waypoint_icon_url));
} else { } else {
wpt.setIcon(request.getIconUrl()); wpt.setIcon(request.getIconUrl());
} }
@@ -999,7 +999,7 @@ public class TrackRecordingService extends Service {
waypoint.setName(getString(R.string.marker_type_statistics)); waypoint.setName(getString(R.string.marker_type_statistics));
waypoint.setStatistics(waypointStatsBuilder.getStatistics()); waypoint.setStatistics(waypointStatsBuilder.getStatistics());
waypoint.setDescription(utils.generateWaypointDescription(waypoint)); waypoint.setDescription(utils.generateWaypointDescription(waypoint));
waypoint.setIcon(getString(R.string.stats_icon_url)); waypoint.setIcon(getString(R.string.marker_statistics_icon_url));
waypoint.setStartId(providerUtils.getLastLocationId(recordingTrackId)); waypoint.setStartId(providerUtils.getLastLocationId(recordingTrackId));
@@ -1054,7 +1054,7 @@ public class TrackRecordingService extends Service {
Intent broadcastIntent = new Intent() Intent broadcastIntent = new Intent()
.setAction(getString(actionResId)) .setAction(getString(actionResId))
.putExtra(getString(R.string.track_id_broadcast_extra), trackId); .putExtra(getString(R.string.track_id_broadcast_extra), trackId);
sendBroadcast(broadcastIntent, getString(R.string.mytracks_notifications_permission)); sendBroadcast(broadcastIntent, getString(R.string.permission_notification_value));
SharedPreferences sharedPreferences = getSharedPreferences(Constants.SETTINGS_NAME, 0); SharedPreferences sharedPreferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
if (sharedPreferences.getBoolean(getString(R.string.allow_access_key), false)) { if (sharedPreferences.getBoolean(getString(R.string.allow_access_key), false)) {
@@ -188,7 +188,7 @@ public class StatusAnnouncerTask implements PeriodicTask {
String speed = null; String speed = null;
if ((s == 0) || Double.isNaN(s)) { if ((s == 0) || Double.isNaN(s)) {
speed = context.getString(R.string.unknown); speed = context.getString(R.string.value_unknown);
} else { } else {
if (reportSpeed) { if (reportSpeed) {
speed = String.format("%.1f", s); speed = String.format("%.1f", s);
@@ -264,7 +264,7 @@ public class StringUtils implements DescriptionGenerator {
minGrade = Math.round(trackMinGrade * 100); minGrade = Math.round(trackMinGrade * 100);
} }
String category = context.getString(R.string.unknown); String category = context.getString(R.string.value_unknown);
String trackCategory = track.getCategory(); String trackCategory = track.getCategory();
if (trackCategory != null && trackCategory.length() > 0) { if (trackCategory != null && trackCategory.length() > 0) {
category = trackCategory; category = trackCategory;
@@ -92,7 +92,7 @@ public class TrackWidgetProvider
this.context = aContext; this.context = aContext;
trackObserver = new TrackObserver(); trackObserver = new TrackObserver();
providerUtils = MyTracksProviderUtils.Factory.get(context); providerUtils = MyTracksProviderUtils.Factory.get(context);
unknown = context.getString(R.string.unknown); unknown = context.getString(R.string.value_unknown);
sharedPreferences = context.getSharedPreferences(SETTINGS_NAME, 0); sharedPreferences = context.getSharedPreferences(SETTINGS_NAME, 0);
sharedPreferences.registerOnSharedPreferenceChangeListener(this); sharedPreferences.registerOnSharedPreferenceChangeListener(this);
@@ -173,13 +173,11 @@ public class TrackWidgetProvider
if (TRACK_STARTED_ACTION.equals(action)) { if (TRACK_STARTED_ACTION.equals(action)) {
// If a new track is started by this appwidget or elsewhere, // If a new track is started by this appwidget or elsewhere,
// toggle the button to active and have it disable the track if pressed. // toggle the button to active and have it disable the track if pressed.
setButtonIntent( setButtonIntent(views, R.string.track_action_end, R.drawable.appwidget_button_enabled);
views, R.string.end_current_track_action, R.drawable.appwidget_button_enabled);
} else { } else {
// If a track is stopped by this appwidget or elsewhere, // If a track is stopped by this appwidget or elsewhere,
// toggle the button to inactive and have it start a new track if pressed. // toggle the button to inactive and have it start a new track if pressed.
setButtonIntent( setButtonIntent(views, R.string.track_action_start, R.drawable.appwidget_button_disabled);
views, R.string.start_new_track_action, R.drawable.appwidget_button_disabled);
} }
} }
@@ -46,11 +46,11 @@ public class TrackPathPainterFactoryTest extends TrackPathPainterTestCase {
return; return;
} }
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_none, testTrackPathPainterFactorySpecific(context, prefs, R.string.display_track_color_value_none,
SingleColorTrackPathPainter.class); SingleColorTrackPathPainter.class);
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_fixed, testTrackPathPainterFactorySpecific(context, prefs, R.string.display_track_color_value_fixed,
DynamicSpeedTrackPathPainter.class); DynamicSpeedTrackPathPainter.class);
testTrackPathPainterFactorySpecific(context, prefs, R.string.track_color_mode_value_dynamic, testTrackPathPainterFactorySpecific(context, prefs, R.string.display_track_color_value_dynamic,
DynamicSpeedTrackPathPainter.class); DynamicSpeedTrackPathPainter.class);
} }
@@ -491,7 +491,7 @@ public class TrackRecordingServiceTest
assertEquals(2, service.insertWaypoint(WaypointCreationRequest.DEFAULT_STATISTICS)); assertEquals(2, service.insertWaypoint(WaypointCreationRequest.DEFAULT_STATISTICS));
Waypoint wpt = providerUtils.getWaypoint(1); Waypoint wpt = providerUtils.getWaypoint(1);
assertEquals(getContext().getString(R.string.stats_icon_url), assertEquals(getContext().getString(R.string.marker_statistics_icon_url),
wpt.getIcon()); wpt.getIcon());
assertEquals(getContext().getString(R.string.marker_type_statistics), assertEquals(getContext().getString(R.string.marker_type_statistics),
wpt.getName()); wpt.getName());
@@ -527,7 +527,7 @@ public class TrackRecordingServiceTest
assertEquals(1, service.insertWaypoint(WaypointCreationRequest.DEFAULT_MARKER)); assertEquals(1, service.insertWaypoint(WaypointCreationRequest.DEFAULT_MARKER));
Waypoint wpt = providerUtils.getWaypoint(1); Waypoint wpt = providerUtils.getWaypoint(1);
assertEquals(getContext().getString(R.string.waypoint_icon_url), assertEquals(getContext().getString(R.string.marker_waypoint_icon_url),
wpt.getIcon()); wpt.getIcon());
assertEquals(getContext().getString(R.string.marker_type_waypoint), assertEquals(getContext().getString(R.string.marker_type_waypoint),
wpt.getName()); wpt.getName());