Removed hardcoded strings in DeleteHelper (#3047)

* Removed hardcoded strings in DeleteHelper

* Revert "Removed hardcoded strings in DeleteHelper"

This reverts commit 4bc55fc3af.
This commit is contained in:
PavelAplevich 2019-07-02 14:20:34 +03:00 committed by neslihanturan
parent cc92773d46
commit 6fb3331178
2 changed files with 17 additions and 8 deletions

View file

@ -17,6 +17,7 @@ import javax.inject.Singleton;
import fr.free.nrw.commons.BuildConfig;
import fr.free.nrw.commons.Media;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.auth.SessionManager;
import fr.free.nrw.commons.mwapi.MediaWikiApi;
import fr.free.nrw.commons.notification.NotificationHelper;
@ -161,15 +162,15 @@ public class DeleteHelper {
if (problem == ReviewController.DeleteReason.SPAM) {
reasonList[0] = "A selfie";
reasonList[1] = "Blurry";
reasonList[2] = "Nonsense";
reasonList[3] = "Other";
reasonList[0] = context.getResources().getString(R.string.delete_reason_spam_selfie);
reasonList[1] = context.getResources().getString(R.string.delete_reason_spam_blurry);
reasonList[2] = context.getResources().getString(R.string.delete_reason_spam_nonsense);
reasonList[3] = context.getResources().getString(R.string.delete_reason_spam_other);
} else if (problem == ReviewController.DeleteReason.COPYRIGHT_VIOLATION) {
reasonList[0] = "Press photo";
reasonList[1] = "Random photo from internet";
reasonList[2] = "Logo";
reasonList[3] = "Other";
reasonList[0] = context.getResources().getString(R.string.delete_reason_copyright_pressphoto);
reasonList[1] = context.getResources().getString(R.string.delete_reason_copyright_internetphoto);
reasonList[2] = context.getResources().getString(R.string.delete_reason_copyright_logo);
reasonList[3] = context.getResources().getString(R.string.delete_reason_copyright_other);
}
alert.setMultiChoiceItems(reasonList, checkedItems, (dialogInterface, position, isChecked) -> {