Improve export all strings.

This commit is contained in:
Jimmy Shih
2013-06-06 17:33:48 -07:00
parent 3cc0e10031
commit 4efd2a3f5e
7 changed files with 59 additions and 57 deletions
+40 -42
View File
@@ -613,17 +613,50 @@ limitations under the License.
</string>
<!-- 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"
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
</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"
translation_description="When exporting a track to external storage, the option to export as a
certain file format.
translation_description="When exporting a track to the external storage, the option to export as
a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'.">
as %1$s file
</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&#8230;
</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"
translation_description="When exporting a track, the option to export to Google Drive.">
Google Drive
@@ -638,7 +671,7 @@ limitations under the License.
as new private table
</string>
<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.">
as new public table
</string>
@@ -652,7 +685,7 @@ limitations under the License.
as new public map
</string>
<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.">
as new unlisted map
</string>
@@ -660,7 +693,7 @@ limitations under the License.
translation_description="When exporting a track, the option to export to Google Spreadsheets.">
Google Spreadsheets
</string>
<string name="export_dialog_title"
<string name="export_title"
translation_description="The dialog title when exporting a track.">
Export to&#8230;
</string>
@@ -926,7 +959,7 @@ limitations under the License.
Deselect all
</string>
<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 selected
</string>
@@ -1247,41 +1280,6 @@ limitations under the License.
write data to Google My Tracks and start/stop Google My Tracks recording
</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&#8230;
</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 -->
<string name="search_global_description"
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;
case 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);
return true;
case R.id.track_list_delete_all:
@@ -159,7 +159,7 @@ public class ExportDialogFragment extends DialogFragment {
}
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) {
switch (id) {
case DIALOG_PROGRESS_ID:
progressDialog = DialogUtils.createHorizontalProgressDialog(
this, R.string.save_progress_message, new DialogInterface.OnCancelListener() {
progressDialog = DialogUtils.createHorizontalProgressDialog(this,
R.string.export_external_storage_progress_message,
new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
saveAsyncTask.cancel(true);
@@ -128,10 +129,11 @@ public class SaveActivity extends Activity {
.getQuantityString(R.plurals.tracks, totalCount, totalCount);
if (successCount == totalCount && totalCount > 0) {
success = true;
message = getString(R.string.save_success, totalTracks, directoryName);
message = getString(R.string.export_external_storage_success, totalTracks, directoryName);
} else {
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(
success ? android.R.drawable.ic_dialog_info : android.R.drawable.ic_dialog_alert)
@@ -73,13 +73,14 @@ public class DeleteTest extends ActivityInstrumentationTestCase2<TrackListActivi
// Export when there is no track.
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
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.getButtonOnScreen(
EndToEndTestUtils.activityMytracks.getString(R.string.generic_ok), true, true);
String totalTracks = activityMyTracks.getResources().getQuantityString(R.plurals.tracks, 0, 0);
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(
activityMyTracks.getString(R.string.external_storage_not_available), 1,
EndToEndTestUtils.SHORT_WAIT_TIME)
@@ -90,7 +90,7 @@ public class ExportAndImportTest extends ActivityInstrumentationTestCase2<TrackL
// Click to export tracks(At least one track) to Gpx files.
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
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.getButtonOnScreen(
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.
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
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.getButtonOnScreen(
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();
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_export_all), true);
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.getButtonOnScreen(
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) {
String tracks = activityMyTracks.getResources().getQuantityString(R.plurals.tracks, count,
count);
String tracks = activityMyTracks.getResources()
.getQuantityString(R.plurals.tracks, count, count);
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) {
@@ -133,7 +133,7 @@ public class SendToGoogleTest extends ActivityInstrumentationTestCase2<TrackList
*/
private boolean sendToGoogle() {
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();
ArrayList<CheckBox> checkBoxs = EndToEndTestUtils.SOLO.getCurrentCheckBoxes();
for (int i = 0; i < checkBoxs.size(); i++) {