diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-04-07 08:00:59 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-04-07 08:00:59 -0700 |
commit | 4f5d1c274e531ce4b035998f965bfc06d50015d1 (patch) | |
tree | 8689802fd1a5ed9885e692c20faeebc120c4190d /subsonic-android | |
parent | 881615e22e10220766ed840526fe1b5c8896a034 (diff) | |
download | dsub-4f5d1c274e531ce4b035998f965bfc06d50015d1.tar.gz dsub-4f5d1c274e531ce4b035998f965bfc06d50015d1.tar.bz2 dsub-4f5d1c274e531ce4b035998f965bfc06d50015d1.zip |
Updated dialogs to use strings.xml instead of hard coded
Diffstat (limited to 'subsonic-android')
4 files changed, 14 insertions, 11 deletions
diff --git a/subsonic-android/res/values/strings.xml b/subsonic-android/res/values/strings.xml index 3ab94f24..839a3e49 100644 --- a/subsonic-android/res/values/strings.xml +++ b/subsonic-android/res/values/strings.xml @@ -21,6 +21,7 @@ <string name="common.webview">Play Web View (Flash)</string>
<string name="common.play_external">Play External Player</string>
<string name="common.stream_external">Stream External Player</string>
+ <string name="common.confirm">Confirm</string>
<string name="button_bar.home">Home</string>
<string name="button_bar.browse">Library</string>
@@ -65,6 +66,7 @@ <string name="menu.deleted_playlist">Deleted playlist %s</string>
<string name="menu.deleted_playlist_error">Failed to delete playlist %s</string>
<string name="menu.log">Send Log</string>
+ <string name="menu.set_timer">Set Timer</string>
<string name="playlist.label">Playlists</string>
<string name="playlist.update_info">Update Information</string>
@@ -160,6 +162,7 @@ <string name="updated_playlist">Added %1$s songs to \"%2$s\"</string>
<string name="updated_playlist_error">Failed to update \"%s\", please try later.</string>
<string name="removed_playlist">Removed %1$s songs from \"%2$s\"</string>
+ <string name="delete_playlist">Do you want to delete %1$s</string>
<string name="song_details.all">%1$s %2$s</string>
<string name="song_details.kbps">%d kbps</string>
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index f90a1832..3d4ef34b 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -859,9 +859,9 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi lengthBox.setText(prefs.getString(Constants.PREFERENCES_KEY_SLEEP_TIMER_DURATION, "")); AlertDialog.Builder builder = new AlertDialog.Builder(DownloadActivity.this); - builder.setTitle("Set Timer") + builder.setTitle(R.string.menu_set_timer) .setView(dialogView) - .setPositiveButton("OK", new DialogInterface.OnClickListener() { + .setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { String length = lengthBox.getText().toString(); @@ -875,7 +875,7 @@ public class DownloadActivity extends SubsonicTabActivity implements OnGestureLi invalidateOptionsMenu(); } }) - .setNegativeButton("Cancel", null); + .setNegativeButton(R.string.common_cancel, null); AlertDialog dialog = builder.create(); dialog.show(); } diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java index 5870f286..855f4502 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectPlaylistActivity.java @@ -192,9 +192,9 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt private void deletePlaylist(final Playlist playlist) { new AlertDialog.Builder(this) .setIcon(android.R.drawable.ic_dialog_alert) - .setTitle("Confirm") - .setMessage("Do you want to delete " + playlist.getName()) - .setPositiveButton("Ok", new DialogInterface.OnClickListener() { + .setTitle(R.string.common_confirm) + .setMessage(getResources().getString(R.string.delete_playlist, playlist.getName())) + .setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new LoadingTask<Void>(SelectPlaylistActivity.this, false) { @@ -227,7 +227,7 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt } }) - .setNegativeButton("Cancel", null) + .setNegativeButton(R.string.common_cancel, null) .show(); } @@ -263,7 +263,7 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(R.string.playlist_update_info) .setView(dialogView) - .setPositiveButton("Ok", new DialogInterface.OnClickListener() { + .setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new LoadingTask<Void>(SelectPlaylistActivity.this, false) { @@ -295,7 +295,7 @@ public class SelectPlaylistActivity extends SubsonicTabActivity implements Adapt } }) - .setNegativeButton("Cancel", null) + .setNegativeButton(R.string.common_cancel, null) .show(); } }
\ No newline at end of file diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java index 938bf624..a27ad1a5 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicTabActivity.java @@ -481,7 +481,7 @@ public class SubsonicTabActivity extends SherlockActivity { AlertDialog.Builder builder = new AlertDialog.Builder(SubsonicTabActivity.this);
builder.setTitle("Shuffle By")
.setView(dialogView)
- .setPositiveButton("OK", new DialogInterface.OnClickListener() {
+ .setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
Intent intent = new Intent(SubsonicTabActivity.this, DownloadActivity.class);
@@ -499,7 +499,7 @@ public class SubsonicTabActivity extends SherlockActivity { Util.startActivityWithoutTransition(SubsonicTabActivity.this, intent);
}
})
- .setNegativeButton("Cancel", null);
+ .setNegativeButton(R.string.common_cancel, null);
AlertDialog dialog = builder.create();
dialog.show();
}
|