Skip to content

Commit b2260cf

Browse files
committed
Minor stylistic fixes.
1 parent 4e8e2b0 commit b2260cf

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

app/src/main/java/openscience/crowdsource/video/experiments/InfoActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void onClick(View v) {
126126
String email = AppConfigService.getEmail();
127127
edittext.setText(email);
128128
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(InfoActivity.this);
129-
clarifyDialogBuilder.setTitle("Please, enter email:")
129+
clarifyDialogBuilder.setTitle("Please enter your email:")
130130
.setCancelable(false)
131131
.setPositiveButton("Update",
132132
new DialogInterface.OnClickListener() {
@@ -136,7 +136,7 @@ public void onClick(DialogInterface dialog, int id) {
136136
AppConfigService.updateEmail(newEmail);
137137

138138
AlertDialog.Builder builder = new AlertDialog.Builder(InfoActivity.this);
139-
builder.setMessage("Email was successfully updated")
139+
builder.setMessage("Successfully updated the email.")
140140
.setCancelable(false)
141141
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
142142
public void onClick(DialogInterface dialog, int id) {
@@ -156,7 +156,7 @@ public void onClick(DialogInterface dialog, int id) {
156156
final AlertDialog clarifyDialog = clarifyDialogBuilder.create();
157157

158158
clarifyDialog.setTitle("");
159-
clarifyDialog.setMessage(Html.fromHtml("(OPTIONAL) Please enter your email if you would like to acknowledge your contributions (will be publicly visible):"));
159+
clarifyDialog.setMessage(Html.fromHtml("To acknowledge your contributions to the public repository (optional), please enter your email:"));
160160

161161
SpannableString spanString = new SpannableString(email.trim());
162162
spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0);
@@ -172,9 +172,9 @@ public void onClick(DialogInterface dialog, int id) {
172172
@Override
173173
public void onClick(View arg0) {
174174
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(InfoActivity.this);
175-
clarifyDialogBuilder.setTitle("Are you sure to reload scenarios:")
175+
clarifyDialogBuilder.setTitle("Please confirm you wish to reload scenarios?")
176176
.setCancelable(false)
177-
.setPositiveButton("yes",
177+
.setPositiveButton("Yes",
178178
new DialogInterface.OnClickListener() {
179179
public void onClick(DialogInterface dialog, int id) {
180180
dialog.cancel();
@@ -201,7 +201,7 @@ public void onClick(DialogInterface dialog, int id) {
201201
@Override
202202
public void onClick(View arg0) {
203203
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(InfoActivity.this);
204-
clarifyDialogBuilder.setTitle("Are you sure to clean up logs and tmp image files:")
204+
clarifyDialogBuilder.setTitle("Please confirm you wish to clean up temporary image files and logs?")
205205
.setCancelable(false)
206206
.setPositiveButton("yes",
207207
new DialogInterface.OnClickListener() {
@@ -211,7 +211,7 @@ public void onClick(DialogInterface dialog, int id) {
211211
AppLogger.cleanup();
212212

213213
AlertDialog.Builder builder = new AlertDialog.Builder(InfoActivity.this);
214-
builder.setMessage("Logs and tmp image files were successfully cleaned up ")
214+
builder.setMessage("Successfully cleaned up temporary image files and logs.")
215215
.setCancelable(false)
216216
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
217217
public void onClick(DialogInterface dialog, int id) {

app/src/main/java/openscience/crowdsource/video/experiments/LoadScenarioFilesAsyncTask.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public void println(String text) {
178178
copy_bin_file(targetFilePath, targetAppFilePath);
179179
finalTargetFileDir = fileAppDir;
180180
finalTargetFilePath = targetAppFilePath;
181-
publishProgress("\n * File " + targetFilePath + " sucessfully copied to " + targetAppFilePath + "\n\n");
181+
publishProgress("\n * File " + targetFilePath + " successfully copied to " + targetAppFilePath + "\n\n");
182182
} catch (IOException e) {
183183
e.printStackTrace();
184184
publishProgress("\nError copying file " + targetFilePath + " to " + targetAppFilePath + " ...\n\n");
@@ -196,14 +196,14 @@ public void println(String text) {
196196
if (executable != null && executable.equalsIgnoreCase("yes")) {
197197
String[] chmodResult = openme.openme_run_program(COMMAND_CHMOD_744 + " " + finalTargetFilePath, null, finalTargetFileDir);
198198
if (chmodResult[0].isEmpty() && chmodResult[1].isEmpty() && chmodResult[2].isEmpty()) {
199-
publishProgress(" * File " + finalTargetFilePath + " sucessfully set as executable ...\n");
199+
publishProgress(" * File " + finalTargetFilePath + " successfully set as executable ...\n");
200200
} else {
201-
publishProgress("\nError setting file " + targetFilePath + " as executable ...\n\n");
201+
publishProgress("\nError setting file " + targetFilePath + " as executable ...\n\n");
202202
return null;
203203
}
204204
}
205205
} else {
206-
publishProgress("\nError downloading file " + targetFilePath + " from URL " + url + ". Please, try later.");
206+
publishProgress("\nError downloading file " + targetFilePath + " from URL " + url + ". Please try again later.");
207207
recognitionScenario.setState(RecognitionScenario.State.NEW);
208208
recognitionScenario.setDownloadedTotalFileSizeBytes(new Long(0));
209209
AppConfigService.updateState(AppConfigService.AppConfig.State.READY);
@@ -229,4 +229,4 @@ public void println(String text) {
229229
publishProgress("Finished downloading files for scenario " + recognitionScenario.getTitle() + " \n\n");
230230
return null;
231231
}
232-
}
232+
}

app/src/main/java/openscience/crowdsource/video/experiments/MainActivity.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ public class MainActivity extends android.app.Activity implements GLSurfaceView.
9191

9292

9393
private static final String welcome = "This application let you participate in experiment crowdsourcing " +
94-
"to collaboratively solve complex problems! " +
95-
"Please, press 'Update' button to obtain shared scenarios such as " +
94+
"to collaboratively solve long-standing research problems in computer systems! " +
95+
"Please press the 'Update' button to obtain shared scenarios such as " +
9696
"collaborative benchmarking, optimization and tuning of a popular Caffe CNN image recognition library!\n" +
97-
"NOTE: you should have an unlimited Internet since some scenario may require to download 300Mb+ code and datasets! " +
98-
"Also some anonymized statistics will be collected about your platform and code execution " +
97+
"Please note that your should connect via WiFi since some scenarios may require you to download 250+ MB. " +
98+
"Also, some anonymized statistics will be collected about your platform and code execution " +
9999
"(performance, accuracy, power consumption, cost, etc) at cknowledge.org/repo " +
100-
"to let the community improve algorithms for diverse hardware!\n\n";
100+
"to allow the research community to improve image recognition software across diverse hardware platforms!\n\n";
101101

102102
private static final String s_line = "====================================\n";
103103

@@ -260,13 +260,13 @@ public void onClick(View v) {
260260
public void onClick(View v) {
261261
final RecognitionScenario recognitionScenario = RecognitionScenarioService.getSelectedRecognitionScenario();
262262
if (recognitionScenario == null) {
263-
AppLogger.logMessage(" Scenarios was not selected! Please select recognitions scenario first! \n");
263+
AppLogger.logMessage(" Please select an image recognition scenario first! \n");
264264
return;
265265
}
266266

267267
if (recognitionScenario.getState() == RecognitionScenario.State.NEW) {
268268
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(MainActivity.this);
269-
clarifyDialogBuilder.setMessage(Html.fromHtml("You should download scenario files first or select another one"))
269+
clarifyDialogBuilder.setMessage(Html.fromHtml("Please download this scenario first or select another one."))
270270
.setCancelable(false)
271271
.setPositiveButton("continue",
272272
new DialogInterface.OnClickListener() {
@@ -292,7 +292,7 @@ public void onClick(DialogInterface dialog, int id) {
292292

293293
if (recognitionScenario.getState() == RecognitionScenario.State.DOWNLOADING_IN_PROGRESS) {
294294
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(MainActivity.this);
295-
clarifyDialogBuilder.setMessage(Html.fromHtml("Downloading is progress now, please wait"))
295+
clarifyDialogBuilder.setMessage(Html.fromHtml("Download is in progress, please wait ..."))
296296
.setCancelable(false)
297297
.setPositiveButton("continue",
298298
new DialogInterface.OnClickListener() {
@@ -838,7 +838,7 @@ public void println(String text) {
838838
copy_bin_file(targetFilePath, targetAppFilePath);
839839
finalTargetFileDir = fileAppDir;
840840
finalTargetFilePath = targetAppFilePath;
841-
publishProgress("\n * File " + targetFilePath + " sucessfully copied to " + targetAppFilePath);
841+
publishProgress("\n * File " + targetFilePath + " successfully copied to " + targetAppFilePath);
842842
} catch (IOException e) {
843843
e.printStackTrace();
844844
publishProgress("\nError copying file " + targetFilePath + " to " + targetAppFilePath + " ...");
@@ -867,7 +867,7 @@ public void println(String text) {
867867
}
868868
String[] chmodResult = openme.openme_run_program(COMMAND_CHMOD_744 + " " + finalTargetFilePath, null, finalTargetFileDir);
869869
if (chmodResult[0].isEmpty() && chmodResult[1].isEmpty() && chmodResult[2].isEmpty()) {
870-
publishProgress(" * File " + finalTargetFilePath + " sucessfully set as executable ...\n");
870+
publishProgress(" * File " + finalTargetFilePath + " successfully set as executable ...\n");
871871
} else {
872872
publishProgress("\nError setting file " + targetFilePath + " as executable ...");
873873
return null;
@@ -896,12 +896,12 @@ public void println(String text) {
896896
}
897897

898898
if (actualImageFilePath == null) {
899-
publishProgress("\nError image file path was not initialized.");
899+
publishProgress("\nError: image file path was not initialized.");
900900
return null;
901901
}
902902

903903
if (libPath == null) {
904-
publishProgress("\nError lib path was not initialized.");
904+
publishProgress("\nError: lib path was not initialized.");
905905
return null;
906906
}
907907

@@ -922,7 +922,7 @@ public void println(String text) {
922922

923923
final ImageInfo imageInfo = getImageInfo(actualImageFilePath);
924924
if (imageInfo == null) {
925-
publishProgress("\n Error: Image was not found...");
925+
publishProgress("\n Error: image was not found...");
926926
return null;
927927
} else {
928928
publishProgress("\nProcessing image path: " + imageInfo.getPath() + "\n");

app/src/main/java/openscience/crowdsource/video/experiments/ScenariosActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ public void onClick(View v) {
115115
}
116116

117117
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(ScenariosActivity.this);
118-
clarifyDialogBuilder.setMessage(Html.fromHtml("This scenario is not downloaded yet please download it first or select another one"))
118+
clarifyDialogBuilder.setMessage(Html.fromHtml("This scenario has not been downloaded yet. Please download it first or select another one."))
119119
.setCancelable(false)
120-
.setPositiveButton("continue",
120+
.setPositiveButton("Continue",
121121
new DialogInterface.OnClickListener() {
122122
public void onClick(DialogInterface dialog, int id) {
123123
dialog.cancel();
@@ -126,7 +126,7 @@ public void onClick(DialogInterface dialog, int id) {
126126
startActivity(mainIntent);
127127
}
128128
})
129-
.setNegativeButton("Cancel downloading",
129+
.setNegativeButton("Cancel",
130130
new DialogInterface.OnClickListener() {
131131
public void onClick(DialogInterface dialog, int id) {
132132
dialog.cancel();
@@ -206,7 +206,7 @@ public void onClick(View v) {
206206
public void onClick(View v) {
207207
//are you sure to delete
208208
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(ScenariosActivity.this);
209-
clarifyDialogBuilder.setMessage(Html.fromHtml("Are you sure to delete <br> all scenario's downloaded files?"))
209+
clarifyDialogBuilder.setMessage(Html.fromHtml("Please confirm you wish to delete <br>the scenario's files?"))
210210
.setCancelable(false)
211211
.setPositiveButton("yes",
212212
new DialogInterface.OnClickListener() {
@@ -269,10 +269,10 @@ public void run() {
269269

270270
private void startScenarioDownloadingDialog(Activity activity, final RecognitionScenario recognitionScenario, final View downloadButton) {
271271
AlertDialog.Builder clarifyDialogBuilder = new AlertDialog.Builder(activity);
272-
clarifyDialogBuilder.setMessage(Html.fromHtml("Please confirm if you have <br>" +
273-
Utils.bytesIntoHumanReadable(recognitionScenario.getTotalFileSizeBytes()) + " free space <br>and turned on Wi-Fi?"))
272+
clarifyDialogBuilder.setMessage(Html.fromHtml("Please confirm that you have at least <br>" +
273+
Utils.bytesIntoHumanReadable(recognitionScenario.getTotalFileSizeBytes()) + " of free space <br>and turned on the WiFi?"))
274274
.setCancelable(false)
275-
.setPositiveButton("yes",
275+
.setPositiveButton("Yes",
276276
new DialogInterface.OnClickListener() {
277277
public void onClick(DialogInterface dialog, int id) {
278278
dialog.cancel();

0 commit comments

Comments
 (0)