forked from upstream-mirrors/OpenTracks
Add generic_yes and generic_no strings and use them in confirmation dialogs.
This commit is contained in:
@@ -708,6 +708,10 @@ limitations under the License.
|
|||||||
%1$s name. E.g., 'Track 1'.">
|
%1$s name. E.g., 'Track 1'.">
|
||||||
Name: %1$s
|
Name: %1$s
|
||||||
</string>
|
</string>
|
||||||
|
<string name="generic_no"
|
||||||
|
translation_description="The text on a button to say no.">
|
||||||
|
No
|
||||||
|
</string>
|
||||||
<string name="generic_ok"
|
<string name="generic_ok"
|
||||||
translation_description="The text on a button to say ok.">
|
translation_description="The text on a button to say ok.">
|
||||||
OK
|
OK
|
||||||
@@ -732,7 +736,11 @@ limitations under the License.
|
|||||||
translation_description="The title on an alert dialog indicating success.">
|
translation_description="The title on an alert dialog indicating success.">
|
||||||
Success
|
Success
|
||||||
</string>
|
</string>
|
||||||
|
<string name="generic_yes"
|
||||||
|
translation_description="The text on a button to say yes.">
|
||||||
|
Yes
|
||||||
|
</string>
|
||||||
|
|
||||||
<!-- Gps -->
|
<!-- Gps -->
|
||||||
<string name="gps_google_location_settings"
|
<string name="gps_google_location_settings"
|
||||||
translation_description="In Android, the Google location settings to modify location settings
|
translation_description="In Android, the Google location settings to modify location settings
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ public class ConfirmDialogFragment extends DialogFragment {
|
|||||||
checkBox = (CheckBox) view.findViewById(R.id.confirm_dialog_check_box);
|
checkBox = (CheckBox) view.findViewById(R.id.confirm_dialog_check_box);
|
||||||
|
|
||||||
return new AlertDialog.Builder(fragmentActivity).setNegativeButton(
|
return new AlertDialog.Builder(fragmentActivity).setNegativeButton(
|
||||||
android.R.string.cancel, null)
|
R.string.generic_no, null)
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.generic_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
int confirmId = getArguments().getInt(KEY_CONFIRM_ID);
|
int confirmId = getArguments().getInt(KEY_CONFIRM_ID);
|
||||||
|
|||||||
+2
-2
@@ -79,12 +79,12 @@ public class EnableSyncDialogFragment extends DialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
return new AlertDialog.Builder(fragmentActivity).setMessage(R.string.enable_sync_message)
|
return new AlertDialog.Builder(fragmentActivity).setMessage(R.string.enable_sync_message)
|
||||||
.setNegativeButton(R.string.generic_cancel, new OnClickListener() {
|
.setNegativeButton(R.string.generic_no, new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
caller.onEnableSyncDone(false);
|
caller.onEnableSyncDone(false);
|
||||||
}
|
}
|
||||||
}).setPositiveButton(R.string.generic_ok, new OnClickListener() {
|
}).setPositiveButton(R.string.generic_yes, new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
caller.onEnableSyncDone(true);
|
caller.onEnableSyncDone(true);
|
||||||
|
|||||||
+3
-2
@@ -46,8 +46,8 @@ public class InstallEarthDialogFragment extends DialogFragment {
|
|||||||
fragmentActivity = getActivity();
|
fragmentActivity = getActivity();
|
||||||
return new AlertDialog.Builder(fragmentActivity)
|
return new AlertDialog.Builder(fragmentActivity)
|
||||||
.setMessage(R.string.track_detail_install_earth_message)
|
.setMessage(R.string.track_detail_install_earth_message)
|
||||||
.setNegativeButton(android.R.string.cancel, null)
|
.setNegativeButton(R.string.generic_no, null)
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.generic_yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
Intent intent = new Intent().setData(Uri.parse(SaveActivity.GOOGLE_EARTH_MARKET_URL));
|
Intent intent = new Intent().setData(Uri.parse(SaveActivity.GOOGLE_EARTH_MARKET_URL));
|
||||||
@@ -60,6 +60,7 @@ public class InstallEarthDialogFragment extends DialogFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.setTitle(R.string.generic_confirm_title)
|
||||||
.create();
|
.create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity {
|
|||||||
final String newValue = bundle.getString(ACCOUNT_NAME_KEY);
|
final String newValue = bundle.getString(ACCOUNT_NAME_KEY);
|
||||||
alertDialog.setMessage(
|
alertDialog.setMessage(
|
||||||
getString(R.string.settings_google_account_confirm_message, googleAccount));
|
getString(R.string.settings_google_account_confirm_message, googleAccount));
|
||||||
alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(android.R.string.ok),
|
alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(R.string.generic_yes),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface d, int button) {
|
public void onClick(DialogInterface d, int button) {
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public class DialogUtils {
|
|||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context)
|
AlertDialog.Builder builder = new AlertDialog.Builder(context)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
.setNegativeButton(android.R.string.cancel, cancelListener)
|
.setNegativeButton(R.string.generic_no, cancelListener)
|
||||||
.setPositiveButton(android.R.string.ok, okListener)
|
.setPositiveButton(R.string.generic_yes, okListener)
|
||||||
.setTitle(R.string.generic_confirm_title);
|
.setTitle(R.string.generic_confirm_title);
|
||||||
if (messageId != -1) {
|
if (messageId != -1) {
|
||||||
builder.setMessage(messageId);
|
builder.setMessage(messageId);
|
||||||
|
|||||||
Reference in New Issue
Block a user