mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add string resources
This commit is contained in:
parent
81503befb0
commit
dcecf607ef
2 changed files with 10 additions and 4 deletions
|
|
@ -15,6 +15,7 @@ import java.util.ArrayList;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import fr.free.nrw.commons.CommonsApplication;
|
import fr.free.nrw.commons.CommonsApplication;
|
||||||
|
import fr.free.nrw.commons.R;
|
||||||
import fr.free.nrw.commons.contributions.ContributionsActivity;
|
import fr.free.nrw.commons.contributions.ContributionsActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -79,16 +80,16 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
||||||
// Use soft warning for now (user able to choose to proceed) until have determined that implementation works without bugs
|
// Use soft warning for now (user able to choose to proceed) until have determined that implementation works without bugs
|
||||||
if (fileExists) {
|
if (fileExists) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||||
builder.setMessage("This file already exists in Commons. Are you sure you want to proceed?")
|
builder.setMessage(R.string.file_exists)
|
||||||
.setTitle("Warning");
|
.setTitle(R.string.warning);
|
||||||
builder.setPositiveButton("No", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
//Go back to ContributionsActivity
|
//Go back to ContributionsActivity
|
||||||
Intent intent = new Intent(context, ContributionsActivity.class);
|
Intent intent = new Intent(context, ContributionsActivity.class);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton("Yes", new DialogInterface.OnClickListener() {
|
builder.setNegativeButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
//No need to do anything, user remains on upload screen
|
//No need to do anything, user remains on upload screen
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -168,4 +168,9 @@
|
||||||
<string name="location_permission_rationale">Optional permission: Get current location for category suggestions</string>
|
<string name="location_permission_rationale">Optional permission: Get current location for category suggestions</string>
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
<string name="title_activity_nearby">Nearby Places</string>
|
<string name="title_activity_nearby">Nearby Places</string>
|
||||||
|
|
||||||
|
<string name="warning">Warning</string>
|
||||||
|
<string name="file_exists">This file already exists on Commons. Are you sure you want to proceed?</string>
|
||||||
|
<string name="yes">Yes</string>
|
||||||
|
<string name="no">No</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue