Skip to content

Commit 102b2d7

Browse files
cypheropdomdomegg
authored andcommitted
Fix commons-app#2134: Remove formatting characters from upload_problem strings (commons-app#2135)
1 parent e09ce41 commit 102b2d7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app/src/main/java/fr/free/nrw/commons/utils/ImageUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,22 +236,22 @@ public static String getErrorMessageForResult(Context context, @Result int resul
236236
errorMessage.append(context.getResources().getString(R.string.upload_problem_exist));
237237

238238
if ((IMAGE_DARK & result) != 0 ) { // We are checking image dark bit to see if that bit is set or not
239-
errorMessage.append(context.getResources().getString(R.string.upload_problem_image_dark));
239+
errorMessage.append("\n - ").append(context.getResources().getString(R.string.upload_problem_image_dark));
240240
}
241241

242242
if ((IMAGE_BLURRY & result) != 0 ) {
243-
errorMessage.append(context.getResources().getString(R.string.upload_image_problem_blurry));
243+
errorMessage.append("\n - ").append(context.getResources().getString(R.string.upload_image_problem_blurry));
244244
}
245245

246246
if ((IMAGE_DUPLICATE & result) != 0 ) {
247-
errorMessage.append(context.getResources().getString(R.string.upload_problem_image_duplicate));
247+
errorMessage.append("\n - ").append(context.getResources().getString(R.string.upload_problem_image_duplicate));
248248
}
249249

250250
if ((IMAGE_GEOLOCATION_DIFFERENT & result) != 0 ) {
251-
errorMessage.append(context.getResources().getString(R.string.upload_problem_different_geolocation));
251+
errorMessage.append("\n - ").append(context.getResources().getString(R.string.upload_problem_different_geolocation));
252252
}
253253

254-
errorMessage.append(context.getResources().getString(R.string.upload_problem_do_you_continue));
254+
errorMessage.append("\n\n").append(context.getResources().getString(R.string.upload_problem_do_you_continue));
255255
}
256256

257257
return errorMessage.toString();

app/src/main/res/values/strings.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@
237237
<string name="upload_image_blurry">This picture is blurry, are you sure you want to upload it? Wikimedia Commons is only for pictures with encyclopedic value.</string>
238238

239239
<string name="upload_problem_exist">Potential problems with this image:</string>
240-
<string name="upload_problem_image_dark">\n - Image is too dark.</string>
241-
<string name="upload_problem_image_blurry">\n - Image is blurry.</string>
242-
<string name="upload_problem_image_duplicate">\n - Image is already on Commons.</string>
243-
<string name="upload_problem_different_geolocation">\n - This picture was taken at a different location.</string>
244-
<string name="upload_problem_do_you_continue">\n\nDo you still want to upload this picture?</string>
240+
<string name="upload_problem_image_dark">Image is too dark.</string>
241+
<string name="upload_problem_image_blurry">Image is blurry.</string>
242+
<string name="upload_problem_image_duplicate">Image is already on Commons.</string>
243+
<string name="upload_problem_different_geolocation">This picture was taken at a different location.</string>
244+
<string name="upload_problem_do_you_continue">Do you still want to upload this picture?</string>
245245

246246
<string name="give_permission">Give permission</string>
247247
<string name="use_external_storage">Use external storage</string>

0 commit comments

Comments
 (0)