use android's build-in OK and Cancel strings

This commit is contained in:
Eric House 2015-05-27 07:05:59 -07:00
parent 101da00761
commit dd24f86eb8
21 changed files with 410 additions and 430 deletions

File diff suppressed because it is too large Load diff

View file

@ -1470,8 +1470,6 @@
<!-- Text for buttons at the bottom of dialogs. These first are
in many places.-->
<string name="button_ok">OK</string>
<string name="button_cancel">Cancel</string>
<string name="button_yes">Yes</string>
<string name="button_no">No</string>

View file

@ -1261,8 +1261,6 @@
-->
<!-- Text for buttons at the bottom of dialogs. These first are
in many places.-->
<string name="button_ok">KO</string>
<string name="button_cancel">Lecnac</string>
<string name="button_yes">Sey</string>
<string name="button_no">On</string>
<!-- Used in Game config dialog to confirm saving changes that reset a game -->

View file

@ -24,8 +24,6 @@
<string name="title_dicts_list">Diccionaris del Crosswords</string>
<string name="title_game_config_fmt">Configura el %1$s</string>
<string name="title_prefs">Configuració del Crosswords</string>
<string name="button_ok">D\'acord</string>
<string name="button_cancel">Cancel·la</string>
<string name="button_yes"></string>
<string name="button_no">No</string>
<string name="button_save">Desa</string>

View file

@ -1261,8 +1261,6 @@
-->
<!-- Text for buttons at the bottom of dialogs. These first are
in many places.-->
<string name="button_ok">OK</string>
<string name="button_cancel">CANCEL</string>
<string name="button_yes">YES</string>
<string name="button_no">NO</string>
<!-- Used in Game config dialog to confirm saving changes that reset a game -->

View file

@ -25,8 +25,6 @@
<string name="title_dicts_list">Slovníky Crosswords</string>
<string name="title_game_config_fmt">Konfigurovat %1$s</string>
<string name="title_prefs">Předvolby Crosswords</string>
<string name="button_ok">OK</string>
<string name="button_cancel">Zrušit</string>
<string name="button_yes">Ano</string>
<string name="button_no">Ne</string>
<string name="button_save">Uložit</string>

View file

@ -1777,10 +1777,6 @@ mots)</string>
<!-- Text for buttons at the bottom of dialogs. These first are
in many places.-->
<!--<string name="button_ok">OK</string> -->
<string name="button_ok">@android:string/ok</string>
<!--<string name="button_cancel">Cancel</string> -->
<string name="button_cancel">@android:string/cancel</string>
<!--<string name="button_yes">Yes</string> -->
<string name="button_yes">Oui</string>
<!--<string name="button_no">No</string> -->

View file

@ -1276,8 +1276,6 @@
-->
<!-- Text for buttons at the bottom of dialogs. These first are
in many places.-->
<string name="button_ok">OK</string>
<string name="button_cancel">Cancelar</string>
<string name="button_yes">Sim</string>
<string name="button_no">Não</string>
<!-- Used in Game config dialog to confirm saving changes that reset a game -->

View file

@ -74,8 +74,6 @@
<!-- text of first menu item. Will revert all preferences to
their default/original values -->
<string name="button_revert_all">XLATE ME: Restore all</string>
<string name="button_ok">OK</string>
<string name="button_cancel">Zrušiť</string>
<string name="button_yes">Áno</string>
<string name="button_no">Nie</string>
<string name="button_save">Uložiť</string>

View file

@ -226,7 +226,7 @@ public class BoardDelegate extends DelegateBase
case DLG_CONNSTAT:
ab.setTitle( m_dlgTitle )
.setMessage( m_dlgBytes )
.setPositiveButton( R.string.button_ok, null );
.setPositiveButton( android.R.string.ok, null );
if ( DlgID.DLG_RETRY == dlgID ) {
lstnr = new OnClickListener() {
public void onClick( DialogInterface dlg,
@ -286,7 +286,7 @@ public class BoardDelegate extends DelegateBase
case DLG_DELETED:
ab = ab.setTitle( R.string.query_title )
.setMessage( R.string.msg_dev_deleted )
.setPositiveButton( R.string.button_ok, null );
.setPositiveButton( android.R.string.ok, null );
lstnr = new OnClickListener() {
public void onClick( DialogInterface dlg,
int whichButton ) {
@ -315,7 +315,7 @@ public class BoardDelegate extends DelegateBase
}
};
ab.setPositiveButton( DlgID.QUERY_REQUEST_BLK == dlgID ?
R.string.button_yes : R.string.button_ok,
R.string.button_yes : android.R.string.ok,
lstnr );
if ( DlgID.QUERY_REQUEST_BLK == dlgID ) {
lstnr = new OnClickListener() {
@ -404,7 +404,7 @@ public class BoardDelegate extends DelegateBase
m_passwdEdit.setText( "", TextView.BufferType.EDITABLE );
ab.setTitle( m_dlgTitleStr )
.setView( pwdLayout )
.setPositiveButton( R.string.button_ok,
.setPositiveButton( android.R.string.ok,
new OnClickListener() {
public void
onClick( DialogInterface dlg,

View file

@ -360,7 +360,7 @@ public class DictsDelegate extends ListDelegateBase
.setSingleChoiceItems( makeDictDirItems(), moveTo[0],
newSelLstnr )
.setPositiveButton( R.string.button_move, lstnr )
.setNegativeButton( R.string.button_cancel, null )
.setNegativeButton( android.R.string.cancel, null )
.create();
break;

View file

@ -329,17 +329,17 @@ public class DlgDelegate {
public void showConfirmThen( String msg, Action action )
{
showConfirmThen( null, msg, R.string.button_ok, action, null );
showConfirmThen( null, msg, android.R.string.ok, action, null );
}
public void showConfirmThen( int msgID, Action action )
{
showConfirmThen( null, getString( msgID ), R.string.button_ok, action, null );
showConfirmThen( null, getString( msgID ), android.R.string.ok, action, null );
}
public void showConfirmThen( Runnable onNA, String msg, Action action, Object[] params )
{
showConfirmThen( onNA, msg, R.string.button_ok, action, params );
showConfirmThen( onNA, msg, android.R.string.ok, action, params );
}
public void showConfirmThen( Runnable onNA, String msg, int posButton, Action action )
@ -355,14 +355,14 @@ public class DlgDelegate {
public void showConfirmThen( int msg, int posButton, Action action,
Object[] params )
{
showConfirmThen( null, getString(msg), posButton, R.string.button_cancel,
showConfirmThen( null, getString(msg), posButton, android.R.string.cancel,
action, params );
}
public void showConfirmThen( Runnable onNA, String msg, int posButton, Action action,
Object[] params )
{
showConfirmThen( onNA, msg, posButton, R.string.button_cancel, action,
showConfirmThen( onNA, msg, posButton, android.R.string.cancel, action,
params );
}
@ -523,7 +523,7 @@ public class DlgDelegate {
FirstRunDialog.show( m_activity );
}
} );
builder.setPositiveButton( R.string.button_ok, null );
builder.setPositiveButton( android.R.string.ok, null );
return builder.create();
}
@ -539,7 +539,7 @@ public class DlgDelegate {
AlertDialog.Builder builder = LocUtils.makeAlertBuilder( m_activity );
builder.setTitle( R.string.info_title );
builder.setMessage( state.m_msg );
builder.setPositiveButton( R.string.button_ok, null );
builder.setPositiveButton( android.R.string.ok, null );
Dialog dialog = builder.create();
dialog = setCallbackDismissListener( dialog, state, dlgID );
@ -556,7 +556,7 @@ public class DlgDelegate {
AlertDialog.Builder builder = LocUtils.makeAlertBuilder( m_activity )
.setTitle( R.string.newbie_title )
.setView( naView )
.setPositiveButton( R.string.button_ok, lstnr_p );
.setPositiveButton( android.R.string.ok, lstnr_p );
// Adding third button doesn't work for some reason. Either this
// feature goes away or the "do not show again" becomes a checkbox as
@ -647,8 +647,8 @@ public class DlgDelegate {
.setTitle( R.string.invite_choice_title )
.setSingleChoiceItems( items.toArray( new String[items.size()] ),
sel[0], selChanged )
.setPositiveButton( R.string.button_ok, okClicked )
.setNegativeButton( R.string.button_cancel, null );
.setPositiveButton( android.R.string.ok, okClicked )
.setNegativeButton( android.R.string.cancel, null );
return setCallbackDismissListener( builder.create(), state, dlgID );
}
@ -699,7 +699,7 @@ public class DlgDelegate {
Dialog dialog = LocUtils.makeAlertBuilder( m_activity )
.setTitle( R.string.confirm_sms_title )
.setView( layout )
.setPositiveButton( R.string.button_ok, lstnr )
.setPositiveButton( android.R.string.ok, lstnr )
.create();
Utils.setRemoveOnDismiss( m_activity, dialog, dlgID );
return dialog;

View file

@ -39,18 +39,18 @@ public class DlgState implements Parcelable {
public DlgState( DlgID dlgID, String msg, Action action )
{
this( dlgID, msg, R.string.button_ok, action, 0 );
this( dlgID, msg, android.R.string.ok, action, 0 );
}
public DlgState( DlgID dlgID, String msg, Action action, int prefsKey )
{
this( dlgID, msg, R.string.button_ok, action, prefsKey );
this( dlgID, msg, android.R.string.ok, action, prefsKey );
}
public DlgState( DlgID dlgID, String msg, int prefsKey, Action action,
ActionPair more, Object[] params )
{
this( dlgID, msg, R.string.button_ok, action, prefsKey );
this( dlgID, msg, android.R.string.ok, action, prefsKey );
m_params = params;
m_pair = more;
}
@ -64,7 +64,7 @@ public class DlgState implements Parcelable {
public DlgState( DlgID dlgID, String msg, int posButton,
Action action, int prefsKey, Object[] params )
{
this( dlgID, null, msg, posButton, R.string.button_cancel,
this( dlgID, null, msg, posButton, android.R.string.cancel,
action, prefsKey, params );
}

View file

@ -120,7 +120,7 @@ public class EditColorPreference extends DialogPreference {
setDialogTitle( newTitle );
}
setNegativeButtonText( LocUtils.getString( context, R.string.button_cancel ) );
setNegativeButtonText( LocUtils.getString( context, android.R.string.cancel ) );
}
@Override
@ -174,7 +174,7 @@ public class EditColorPreference extends DialogPreference {
}
};
String okText = LocUtils.getString( m_context, R.string.button_ok );
String okText = LocUtils.getString( m_context, android.R.string.ok );
builder.setPositiveButton( okText, lstnr );
super.onPrepareDialogBuilder( builder );
}

View file

@ -73,7 +73,7 @@ public class FirstRunDialog {
.setIcon(android.R.drawable.ic_menu_info_details)
.setTitle( R.string.changes_title )
.setView( view )
.setPositiveButton( R.string.button_ok, null)
.setPositiveButton( android.R.string.ok, null)
.create();
dialog.show();
}

View file

@ -180,7 +180,7 @@ public class GameConfigDelegate extends DelegateBase
dialog = makeAlertBuilder()
.setTitle(R.string.player_edit_title)
.setView(playerEditView)
.setPositiveButton( R.string.button_ok,
.setPositiveButton( android.R.string.ok,
new DialogInterface.OnClickListener() {
public void
onClick( DialogInterface dlg,
@ -189,7 +189,7 @@ public class GameConfigDelegate extends DelegateBase
loadPlayersList();
}
})
.setNegativeButton( R.string.button_cancel, null )
.setNegativeButton( android.R.string.cancel, null )
.create();
break;
// case ROLE_EDIT_RELAY:
@ -199,14 +199,14 @@ public class GameConfigDelegate extends DelegateBase
// .setTitle(titleForDlg(id))
// .setView( LayoutInflater.from(this)
// .inflate( layoutForDlg(id), null ))
// .setPositiveButton( R.string.button_ok,
// .setPositiveButton( android.R.string.ok,
// new DialogInterface.OnClickListener() {
// public void onClick( DialogInterface dlg,
// int whichButton ) {
// getRoleSettings();
// }
// })
// .setNegativeButton( R.string.button_cancel, null )
// .setNegativeButton( android.R.string.cancel, null )
// .create();
// break;
@ -220,7 +220,7 @@ public class GameConfigDelegate extends DelegateBase
dialog = makeAlertBuilder()
.setTitle( R.string.force_title )
.setView( inflate( layoutForDlg(dlgID) ) )
.setPositiveButton( R.string.button_ok, dlpos )
.setPositiveButton( android.R.string.ok, dlpos )
.create();
DialogInterface.OnDismissListener dismiss =
new DialogInterface.OnDismissListener() {
@ -276,7 +276,7 @@ public class GameConfigDelegate extends DelegateBase
String msg = getString( R.string.no_name_found_fmt,
m_gi.nPlayers, xlateLang( langName ) );
dialog = makeAlertBuilder()
.setPositiveButton( R.string.button_ok, null )
.setPositiveButton( android.R.string.ok, null )
// message added below since varies with language etc.
.setMessage( msg )
.create();
@ -301,8 +301,8 @@ public class GameConfigDelegate extends DelegateBase
dialog = makeAlertBuilder()
.setTitle( R.string.title_addrs_pref )
.setView( layout )
.setPositiveButton( R.string.button_ok, lstnr )
.setNegativeButton( R.string.button_cancel, null )
.setPositiveButton( android.R.string.ok, lstnr )
.setNegativeButton( android.R.string.cancel, null )
.create();
break;
}

View file

@ -641,7 +641,7 @@ public class GamesListDelegate extends ListDelegateBase
ab = makeAlertBuilder()
.setTitle( R.string.no_dict_title )
.setMessage( message )
.setPositiveButton( R.string.button_cancel, null )
.setPositiveButton( android.R.string.cancel, null )
.setNegativeButton( R.string.button_download, lstnr )
;
if ( DlgID.WARN_NODICT_SUBST == dlgID ) {
@ -676,7 +676,7 @@ public class GamesListDelegate extends ListDelegateBase
dialog = makeAlertBuilder()
.setTitle( R.string.subst_dict_title )
.setPositiveButton( R.string.button_substdict, lstnr )
.setNegativeButton( R.string.button_cancel, null )
.setNegativeButton( android.R.string.cancel, null )
.setSingleChoiceItems( m_sameLangDicts, 0, null )
.create();
// Force destruction so onCreateDialog() will get
@ -782,7 +782,7 @@ public class GamesListDelegate extends ListDelegateBase
.setSingleChoiceItems( groups, curGroupPos, lstnr )
.setPositiveButton( R.string.button_move, lstnr2 )
.setNeutralButton( R.string.button_newgroup, lstnr3 )
.setNegativeButton( R.string.button_cancel, null )
.setNegativeButton( android.R.string.cancel, null )
.create();
setRemoveOnDismiss( dialog, dlgID );
break;
@ -796,7 +796,7 @@ public class GamesListDelegate extends ListDelegateBase
dialog = makeAlertBuilder()
.setTitle( R.string.default_name_title )
.setMessage( R.string.default_name_message )
.setPositiveButton( R.string.button_ok, null )
.setPositiveButton( android.R.string.ok, null )
.setView( layout )
.create();
dialog.setOnDismissListener(new DialogInterface.
@ -1963,8 +1963,8 @@ public class GamesListDelegate extends ListDelegateBase
Dialog dialog = makeAlertBuilder()
.setTitle( titleID )
.setPositiveButton( R.string.button_ok, lstnr1 )
.setNegativeButton( R.string.button_cancel, lstnr2 )
.setPositiveButton( android.R.string.ok, lstnr1 )
.setNegativeButton( android.R.string.cancel, lstnr2 )
.setView( m_namer )
.create();
setRemoveOnDismiss( dialog, dlgID );

View file

@ -150,7 +150,7 @@ public class NFCUtils {
return LocUtils.makeAlertBuilder( activity )
.setTitle( R.string.info_title )
.setMessage( R.string.enable_nfc )
.setPositiveButton( R.string.button_cancel, null )
.setPositiveButton( android.R.string.cancel, null )
.setNegativeButton( R.string.button_go_settings, lstnr )
.create();
}

View file

@ -116,8 +116,8 @@ public class PrefsDelegate extends DelegateBase
dialog = makeAlertBuilder()
.setTitle( R.string.query_title )
.setMessage( confirmID )
.setPositiveButton( R.string.button_ok, lstnr )
.setNegativeButton( R.string.button_cancel, null )
.setPositiveButton( android.R.string.ok, lstnr )
.setNegativeButton( android.R.string.cancel, null )
.create();
}
}

View file

@ -152,8 +152,8 @@ public class SMSInviteDelegate extends InviteDelegate {
}
};
dialog = makeAlertBuilder()
.setNegativeButton( R.string.button_cancel, null )
.setPositiveButton( R.string.button_ok, lstnr )
.setNegativeButton( android.R.string.cancel, null )
.setPositiveButton( android.R.string.ok, lstnr )
.setView( namerView )
.create();
break;

View file

@ -44,7 +44,7 @@ public class XWConnAddrPreference extends DialogPreference {
setDialogLayoutResource( R.layout.conn_types_display );
setNegativeButtonText( LocUtils.getString( context, R.string.button_cancel ) );
setNegativeButtonText( LocUtils.getString( context, android.R.string.cancel ) );
CommsConnTypeSet curSet = XWPrefs.getAddrTypes( context );
setSummary( curSet.toString( context ) );