forked from upstream-mirrors/OpenTracks
Improve export all strings.
This commit is contained in:
@@ -613,17 +613,50 @@ limitations under the License.
|
|||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Export -->
|
<!-- Export -->
|
||||||
|
<string name="export_all_option"
|
||||||
|
translation_description="When exporting all tracks to the external storage, the option to export
|
||||||
|
as a certain file format.
|
||||||
|
|
||||||
|
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
|
||||||
|
Export all as %1$s
|
||||||
|
</string>
|
||||||
|
<string name="export_all_title"
|
||||||
|
translation_description="The dialog title to export all tracks to the external storage.">
|
||||||
|
Export to external storage
|
||||||
|
</string>
|
||||||
<string name="export_external_storage"
|
<string name="export_external_storage"
|
||||||
translation_description="When exporting a track, the option to export to external storage.">
|
translation_description="When exporting a track, the option to export to the external storage.">
|
||||||
External storage
|
External storage
|
||||||
</string>
|
</string>
|
||||||
|
<string name="export_external_storage_error"
|
||||||
|
translation_description="When exporting tracks to the external storage, the error message
|
||||||
|
indicating that only some of the tracks are exported.
|
||||||
|
|
||||||
|
%1$d the number of tracks successfully exported. E.g., '1'.
|
||||||
|
%1$s the number of tracks to export. E.g., '2 tracks'.
|
||||||
|
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
||||||
|
Exported %1$d of %2$s to %3$s.
|
||||||
|
</string>
|
||||||
<string name="export_external_storage_option"
|
<string name="export_external_storage_option"
|
||||||
translation_description="When exporting a track to external storage, the option to export as a
|
translation_description="When exporting a track to the external storage, the option to export as
|
||||||
certain file format.
|
a certain file format.
|
||||||
|
|
||||||
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
|
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
|
||||||
as %1$s file
|
as %1$s file
|
||||||
</string>
|
</string>
|
||||||
|
<string name="export_external_storage_progress_message"
|
||||||
|
translation_description="When exporting tracks to the external storage, the progress message.
|
||||||
|
|
||||||
|
%1$s: the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
||||||
|
Exporting to %1$s…
|
||||||
|
</string>
|
||||||
|
<string name="export_external_storage_success"
|
||||||
|
translation_description="When exporting tracks to the external storage, the success message.
|
||||||
|
|
||||||
|
%1$s the number of tracks. E.g., '2 tracks'.
|
||||||
|
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
||||||
|
Exported %1$s to %2$s.
|
||||||
|
</string>
|
||||||
<string name="export_google_drive"
|
<string name="export_google_drive"
|
||||||
translation_description="When exporting a track, the option to export to Google Drive.">
|
translation_description="When exporting a track, the option to export to Google Drive.">
|
||||||
Google Drive
|
Google Drive
|
||||||
@@ -638,7 +671,7 @@ limitations under the License.
|
|||||||
as new private table
|
as new private table
|
||||||
</string>
|
</string>
|
||||||
<string name="export_google_fusion_tables_public"
|
<string name="export_google_fusion_tables_public"
|
||||||
translation_description="When exporting a trck to Google Fusion Tables, the option to export as
|
translation_description="When exporting a track to Google Fusion Tables, the option to export as
|
||||||
a new public table as opposed to a new private table.">
|
a new public table as opposed to a new private table.">
|
||||||
as new public table
|
as new public table
|
||||||
</string>
|
</string>
|
||||||
@@ -652,7 +685,7 @@ limitations under the License.
|
|||||||
as new public map
|
as new public map
|
||||||
</string>
|
</string>
|
||||||
<string name="export_google_maps_unlisted"
|
<string name="export_google_maps_unlisted"
|
||||||
translation_description="When sending a track to Google Maps, the option to export as a new
|
translation_description="When exporting a track to Google Maps, the option to export as a new
|
||||||
unlisted map as opposed to a new public map.">
|
unlisted map as opposed to a new public map.">
|
||||||
as new unlisted map
|
as new unlisted map
|
||||||
</string>
|
</string>
|
||||||
@@ -660,7 +693,7 @@ limitations under the License.
|
|||||||
translation_description="When exporting a track, the option to export to Google Spreadsheets.">
|
translation_description="When exporting a track, the option to export to Google Spreadsheets.">
|
||||||
Google Spreadsheets
|
Google Spreadsheets
|
||||||
</string>
|
</string>
|
||||||
<string name="export_dialog_title"
|
<string name="export_title"
|
||||||
translation_description="The dialog title when exporting a track.">
|
translation_description="The dialog title when exporting a track.">
|
||||||
Export to…
|
Export to…
|
||||||
</string>
|
</string>
|
||||||
@@ -926,7 +959,7 @@ limitations under the License.
|
|||||||
Deselect all
|
Deselect all
|
||||||
</string>
|
</string>
|
||||||
<string name="list_item_selected"
|
<string name="list_item_selected"
|
||||||
translation_description="Title indictating the number of items selected in a list.
|
translation_description="Title indicating the number of items selected in a list.
|
||||||
%1$d: an integer value. E.g., '2'.">
|
%1$d: an integer value. E.g., '2'.">
|
||||||
%1$d selected
|
%1$d selected
|
||||||
</string>
|
</string>
|
||||||
@@ -1247,41 +1280,6 @@ limitations under the License.
|
|||||||
write data to Google My Tracks and start/stop Google My Tracks recording
|
write data to Google My Tracks and start/stop Google My Tracks recording
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Save -->
|
|
||||||
<string name="save_all_selection_option"
|
|
||||||
translation_description="When saving to external storage, the option to save all the tracks as a
|
|
||||||
certain file format.
|
|
||||||
|
|
||||||
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
|
|
||||||
Save all as %1$s
|
|
||||||
</string>
|
|
||||||
<string name="save_error"
|
|
||||||
translation_description="When saving to the external storage, the error message indicating that
|
|
||||||
only some of the tracks are saved.
|
|
||||||
|
|
||||||
%1$d the number of tracks successfully saved. E.g., '1'.
|
|
||||||
%1$s the number of tracks to save. E.g., '2 tracks'.
|
|
||||||
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
|
||||||
Saved %1$d of %2$s to %3$s.
|
|
||||||
</string>
|
|
||||||
<string name="save_progress_message"
|
|
||||||
translation_description="When saving to the external storage, the progress message.
|
|
||||||
|
|
||||||
%1$s: the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
|
||||||
Saving to %1$s…
|
|
||||||
</string>
|
|
||||||
<string name="save_selection_title"
|
|
||||||
translation_description="The dialog title to save to external storage.">
|
|
||||||
Save to external storage
|
|
||||||
</string>
|
|
||||||
<string name="save_success"
|
|
||||||
translation_description="When saving to the external storage, the success message.
|
|
||||||
|
|
||||||
%1$s the number of tracks. E.g., '2 tracks'.
|
|
||||||
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'.">
|
|
||||||
Saved %1$s to %2$s.
|
|
||||||
</string>
|
|
||||||
|
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<string name="search_global_description"
|
<string name="search_global_description"
|
||||||
translation_description="Description of what is searched in My Tracks, to be displayed in the
|
translation_description="Description of what is searched in My Tracks, to be displayed in the
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
return true;
|
return true;
|
||||||
case R.id.track_list_export_all:
|
case R.id.track_list_export_all:
|
||||||
FileTypeDialogFragment.newInstance(R.id.track_list_export_all,
|
FileTypeDialogFragment.newInstance(R.id.track_list_export_all,
|
||||||
R.string.save_selection_title, R.string.save_all_selection_option, 4)
|
R.string.export_all_title, R.string.export_all_option, 4)
|
||||||
.show(getSupportFragmentManager(), FileTypeDialogFragment.FILE_TYPE_DIALOG_TAG);
|
.show(getSupportFragmentManager(), FileTypeDialogFragment.FILE_TYPE_DIALOG_TAG);
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_list_delete_all:
|
case R.id.track_list_delete_all:
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class ExportDialogFragment extends DialogFragment {
|
|||||||
}
|
}
|
||||||
caller.onExportDone(type, format);
|
caller.onExportDone(type, format);
|
||||||
}
|
}
|
||||||
}).setTitle(R.string.export_dialog_title).setView(view).create();
|
}).setTitle(R.string.export_title).setView(view).create();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -111,8 +111,9 @@ public class SaveActivity extends Activity {
|
|||||||
protected Dialog onCreateDialog(int id) {
|
protected Dialog onCreateDialog(int id) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case DIALOG_PROGRESS_ID:
|
case DIALOG_PROGRESS_ID:
|
||||||
progressDialog = DialogUtils.createHorizontalProgressDialog(
|
progressDialog = DialogUtils.createHorizontalProgressDialog(this,
|
||||||
this, R.string.save_progress_message, new DialogInterface.OnCancelListener() {
|
R.string.export_external_storage_progress_message,
|
||||||
|
new DialogInterface.OnCancelListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCancel(DialogInterface dialog) {
|
public void onCancel(DialogInterface dialog) {
|
||||||
saveAsyncTask.cancel(true);
|
saveAsyncTask.cancel(true);
|
||||||
@@ -128,10 +129,11 @@ public class SaveActivity extends Activity {
|
|||||||
.getQuantityString(R.plurals.tracks, totalCount, totalCount);
|
.getQuantityString(R.plurals.tracks, totalCount, totalCount);
|
||||||
if (successCount == totalCount && totalCount > 0) {
|
if (successCount == totalCount && totalCount > 0) {
|
||||||
success = true;
|
success = true;
|
||||||
message = getString(R.string.save_success, totalTracks, directoryName);
|
message = getString(R.string.export_external_storage_success, totalTracks, directoryName);
|
||||||
} else {
|
} else {
|
||||||
success = false;
|
success = false;
|
||||||
message = getString(R.string.save_error, successCount, totalTracks, directoryName);
|
message = getString(
|
||||||
|
R.string.export_external_storage_error, successCount, totalTracks, directoryName);
|
||||||
}
|
}
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this).setCancelable(true).setIcon(
|
AlertDialog.Builder builder = new AlertDialog.Builder(this).setCancelable(true).setIcon(
|
||||||
success ? android.R.drawable.ic_dialog_info : android.R.drawable.ic_dialog_alert)
|
success ? android.R.drawable.ic_dialog_info : android.R.drawable.ic_dialog_alert)
|
||||||
|
|||||||
+3
-2
@@ -73,13 +73,14 @@ public class DeleteTest extends ActivityInstrumentationTestCase2<TrackListActivi
|
|||||||
// Export when there is no track.
|
// Export when there is no track.
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
||||||
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
||||||
activityMyTracks.getString(R.string.save_all_selection_option),
|
activityMyTracks.getString(R.string.export_external_storage_option),
|
||||||
EndToEndTestUtils.GPX.toUpperCase()));
|
EndToEndTestUtils.GPX.toUpperCase()));
|
||||||
EndToEndTestUtils.getButtonOnScreen(
|
EndToEndTestUtils.getButtonOnScreen(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
||||||
String totalTracks = activityMyTracks.getResources().getQuantityString(R.plurals.tracks, 0, 0);
|
String totalTracks = activityMyTracks.getResources().getQuantityString(R.plurals.tracks, 0, 0);
|
||||||
String directoryName = FileUtils.buildExternalDirectoryPath(EndToEndTestUtils.GPX);
|
String directoryName = FileUtils.buildExternalDirectoryPath(EndToEndTestUtils.GPX);
|
||||||
String message = activityMyTracks.getString(R.string.save_error, 0, totalTracks, directoryName);
|
String message = activityMyTracks.getString(
|
||||||
|
R.string.export_external_storage_error, 0, totalTracks, directoryName);
|
||||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
||||||
activityMyTracks.getString(R.string.external_storage_not_available), 1,
|
activityMyTracks.getString(R.string.external_storage_not_available), 1,
|
||||||
EndToEndTestUtils.SHORT_WAIT_TIME)
|
EndToEndTestUtils.SHORT_WAIT_TIME)
|
||||||
|
|||||||
+7
-6
@@ -90,7 +90,7 @@ public class ExportAndImportTest extends ActivityInstrumentationTestCase2<TrackL
|
|||||||
// Click to export tracks(At least one track) to Gpx files.
|
// Click to export tracks(At least one track) to Gpx files.
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
||||||
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
||||||
activityMyTracks.getString(R.string.save_all_selection_option),
|
activityMyTracks.getString(R.string.export_external_storage_option),
|
||||||
EndToEndTestUtils.GPX.toUpperCase()));
|
EndToEndTestUtils.GPX.toUpperCase()));
|
||||||
EndToEndTestUtils.getButtonOnScreen(
|
EndToEndTestUtils.getButtonOnScreen(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
||||||
@@ -191,7 +191,7 @@ public class ExportAndImportTest extends ActivityInstrumentationTestCase2<TrackL
|
|||||||
// Click to export tracks(At least one track) to Gpx files.
|
// Click to export tracks(At least one track) to Gpx files.
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
||||||
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
||||||
activityMyTracks.getString(R.string.save_all_selection_option),
|
activityMyTracks.getString(R.string.export_external_storage_option),
|
||||||
EndToEndTestUtils.GPX.toUpperCase()));
|
EndToEndTestUtils.GPX.toUpperCase()));
|
||||||
EndToEndTestUtils.getButtonOnScreen(
|
EndToEndTestUtils.getButtonOnScreen(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
||||||
@@ -234,7 +234,7 @@ public class ExportAndImportTest extends ActivityInstrumentationTestCase2<TrackL
|
|||||||
trackNumber = EndToEndTestUtils.SOLO.getCurrentListViews().get(0).getCount();
|
trackNumber = EndToEndTestUtils.SOLO.getCurrentListViews().get(0).getCount();
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
|
||||||
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
EndToEndTestUtils.SOLO.clickOnText(String.format(
|
||||||
activityMyTracks.getString(R.string.save_all_selection_option),
|
activityMyTracks.getString(R.string.export_external_storage_option),
|
||||||
EndToEndTestUtils.KML.toUpperCase()));
|
EndToEndTestUtils.KML.toUpperCase()));
|
||||||
EndToEndTestUtils.getButtonOnScreen(
|
EndToEndTestUtils.getButtonOnScreen(
|
||||||
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
|
||||||
@@ -280,10 +280,11 @@ public class ExportAndImportTest extends ActivityInstrumentationTestCase2<TrackL
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getSaveSuccessMessage(int count, String type) {
|
private String getSaveSuccessMessage(int count, String type) {
|
||||||
String tracks = activityMyTracks.getResources().getQuantityString(R.plurals.tracks, count,
|
String tracks = activityMyTracks.getResources()
|
||||||
count);
|
.getQuantityString(R.plurals.tracks, count, count);
|
||||||
String directoryName = FileUtils.buildExternalDirectoryPath(type);
|
String directoryName = FileUtils.buildExternalDirectoryPath(type);
|
||||||
return activityMyTracks.getString(R.string.save_success, tracks, directoryName);
|
return activityMyTracks.getString(
|
||||||
|
R.string.export_external_storage_success, tracks, directoryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getImportSuccessMessage(int count, String type) {
|
private String getImportSuccessMessage(int count, String type) {
|
||||||
|
|||||||
+1
-1
@@ -133,7 +133,7 @@ public class SendToGoogleTest extends ActivityInstrumentationTestCase2<TrackList
|
|||||||
*/
|
*/
|
||||||
private boolean sendToGoogle() {
|
private boolean sendToGoogle() {
|
||||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export), true);
|
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export), true);
|
||||||
EndToEndTestUtils.SOLO.waitForText(activityMyTracks.getString(R.string.export_dialog_title));
|
EndToEndTestUtils.SOLO.waitForText(activityMyTracks.getString(R.string.export_title));
|
||||||
instrumentation.waitForIdleSync();
|
instrumentation.waitForIdleSync();
|
||||||
ArrayList<CheckBox> checkBoxs = EndToEndTestUtils.SOLO.getCurrentCheckBoxes();
|
ArrayList<CheckBox> checkBoxs = EndToEndTestUtils.SOLO.getCurrentCheckBoxes();
|
||||||
for (int i = 0; i < checkBoxs.size(); i++) {
|
for (int i = 0; i < checkBoxs.size(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user