spring-cleaning: remove unused resources, rename strings from camelCase to snake_case to follow standard practice
This commit is contained in:
@@ -63,7 +63,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
||||
|
||||
alert.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
alert.setTitle(R.string.warning);
|
||||
alert.setMessage(this.getString(R.string.fileDeleteConfirmation, deleteFile));
|
||||
alert.setMessage(this.getString(R.string.file_delete_confirmation, deleteFile));
|
||||
|
||||
alert.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
||||
intent.putExtra(KeychainIntentService.EXTRA_DATA, data);
|
||||
|
||||
ProgressDialogFragment deletingDialog = ProgressDialogFragment.newInstance(
|
||||
R.string.progress_deletingSecurely, ProgressDialog.STYLE_HORIZONTAL);
|
||||
R.string.progress_deleting_securely, ProgressDialog.STYLE_HORIZONTAL);
|
||||
|
||||
// Message is received after deleting is done in ApgService
|
||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(activity, deletingDialog) {
|
||||
@@ -91,7 +91,7 @@ public class DeleteFileDialogFragment extends DialogFragment {
|
||||
super.handleMessage(message);
|
||||
|
||||
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
|
||||
Toast.makeText(activity, R.string.fileDeleteSuccessful,
|
||||
Toast.makeText(activity, R.string.file_delete_successful,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ public class DeleteKeyDialogFragment extends DialogFragment {
|
||||
final int keyType = getArguments().getInt(ARG_KEY_TYPE);
|
||||
|
||||
// TODO: better way to do this?
|
||||
String userId = activity.getString(R.string.unknownUserId);
|
||||
String userId = activity.getString(R.string.unknown_user_id);
|
||||
|
||||
if (keyType == Id.type.public_key) {
|
||||
PGPPublicKeyRing keyRing = ProviderHelper.getPGPPublicKeyRingByRowId(activity,
|
||||
@@ -89,8 +89,8 @@ public class DeleteKeyDialogFragment extends DialogFragment {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(R.string.warning);
|
||||
builder.setMessage(getString(
|
||||
keyType == Id.type.public_key ? R.string.keyDeletionConfirmation
|
||||
: R.string.secretKeyDeletionConfirmation, userId));
|
||||
keyType == Id.type.public_key ? R.string.key_deletion_confirmation
|
||||
: R.string.secret_key_deletion_confirmation, userId));
|
||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
builder.setPositiveButton(R.string.btn_delete, new DialogInterface.OnClickListener() {
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ public class LookupUnknownKeyDialogFragment extends DialogFragment {
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
||||
|
||||
alert.setIcon(android.R.drawable.ic_dialog_alert);
|
||||
alert.setTitle(R.string.title_unknownSignatureKey);
|
||||
alert.setMessage(getString(R.string.lookupUnknownKey,
|
||||
alert.setTitle(R.string.title_unknown_signature_key);
|
||||
alert.setMessage(getString(R.string.lookup_unknown_key,
|
||||
PgpKeyHelper.convertKeyIdToHex(unknownKeyId)));
|
||||
|
||||
alert.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
|
||||
@@ -115,7 +115,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
|
||||
if (secretKeyId == Id.key.symmetric || secretKeyId == Id.key.none) {
|
||||
secretKey = null;
|
||||
alert.setMessage(R.string.passPhraseForSymmetricEncryption);
|
||||
alert.setMessage(R.string.passphrase_for_symmetric_encryption);
|
||||
} else {
|
||||
// TODO: by master key id???
|
||||
secretKey = PgpKeyHelper.getMasterKey(ProviderHelper.getPGPSecretKeyRingByKeyId(activity,
|
||||
@@ -123,8 +123,8 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
// secretKey = PGPHelper.getMasterKey(PGPMain.getSecretKeyRing(secretKeyId));
|
||||
|
||||
if (secretKey == null) {
|
||||
alert.setTitle(R.string.title_keyNotFound);
|
||||
alert.setMessage(getString(R.string.keyNotFound, secretKeyId));
|
||||
alert.setTitle(R.string.title_key_not_found);
|
||||
alert.setMessage(getString(R.string.key_not_found, secretKeyId));
|
||||
alert.setPositiveButton(android.R.string.ok, new OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dismiss();
|
||||
@@ -137,7 +137,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
String userId = PgpKeyHelper.getMainUserIdSafe(activity, secretKey);
|
||||
|
||||
Log.d(Constants.TAG, "User id: '" + userId + "'");
|
||||
alert.setMessage(getString(R.string.passPhraseFor, userId));
|
||||
alert.setMessage(getString(R.string.passphrase_for, userId));
|
||||
}
|
||||
|
||||
LayoutInflater inflater = activity.getLayoutInflater();
|
||||
@@ -169,7 +169,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
if (testKey == null) {
|
||||
if (!clickSecretKey.isMasterKey()) {
|
||||
Toast.makeText(activity,
|
||||
R.string.error_couldNotExtractPrivateKey,
|
||||
R.string.error_could_not_extract_private_key,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
|
||||
sendMessageToHandler(MESSAGE_CANCEL);
|
||||
@@ -185,14 +185,14 @@ public class PassphraseDialogFragment extends DialogFragment implements OnEditor
|
||||
keyOK = false;
|
||||
}
|
||||
} catch (PGPException e) {
|
||||
Toast.makeText(activity, R.string.wrongPassPhrase,
|
||||
Toast.makeText(activity, R.string.wrong_passphrase,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
|
||||
sendMessageToHandler(MESSAGE_CANCEL);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(activity, R.string.error_couldNotExtractPrivateKey,
|
||||
Toast.makeText(activity, R.string.error_could_not_extract_private_key,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
|
||||
sendMessageToHandler(MESSAGE_CANCEL);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
||||
|
||||
alert.setTitle(title);
|
||||
alert.setMessage(R.string.enterPassPhraseTwice);
|
||||
alert.setMessage(R.string.enter_passphrase_twice);
|
||||
|
||||
LayoutInflater inflater = activity.getLayoutInflater();
|
||||
View view = inflater.inflate(R.layout.passphrase_repeat, null);
|
||||
@@ -107,8 +107,8 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
|
||||
if (!passPhrase1.equals(passPhrase2)) {
|
||||
Toast.makeText(
|
||||
activity,
|
||||
getString(R.string.errorMessage,
|
||||
getString(R.string.passPhrasesDoNotMatch)), Toast.LENGTH_SHORT)
|
||||
getString(R.string.error_message,
|
||||
getString(R.string.passphrases_do_not_match)), Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
return;
|
||||
}
|
||||
@@ -116,8 +116,8 @@ public class SetPassphraseDialogFragment extends DialogFragment implements OnEdi
|
||||
if (passPhrase1.equals("")) {
|
||||
Toast.makeText(
|
||||
activity,
|
||||
getString(R.string.errorMessage,
|
||||
getString(R.string.passPhraseMustNotBeEmpty)),
|
||||
getString(R.string.error_message,
|
||||
getString(R.string.passphrase_must_not_be_empty)),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ShareQrCodeDialogFragment extends SherlockDialogFragment {
|
||||
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
||||
|
||||
alert.setTitle(R.string.menu_shareQrCode);
|
||||
alert.setTitle(R.string.menu_share_qr_code);
|
||||
|
||||
LayoutInflater inflater = activity.getLayoutInflater();
|
||||
View view = inflater.inflate(R.layout.share_qr_code_dialog, null);
|
||||
|
||||
Reference in New Issue
Block a user