aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src
diff options
context:
space:
mode:
Diffstat (limited to 'OpenPGP-Keychain/src')
-rw-r--r--OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl29
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/FileHelper.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpHelper.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java10
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java26
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpOperation.java74
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java10
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java30
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java32
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java54
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java12
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java18
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListFragment.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java10
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesActivity.java12
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectSecretKeyFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareActivity.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SignKeyActivity.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/KeyListAdapter.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java12
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java6
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/LookupUnknownKeyDialogFragment.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java14
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java10
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/ShareQrCodeDialogFragment.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java14
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java4
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java2
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/AlgorithmNames.java8
48 files changed, 244 insertions, 241 deletions
diff --git a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
index 69a608dc6..7cbf96b56 100644
--- a/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
+++ b/OpenPGP-Keychain/src/org/openintents/openpgp/IOpenPgpService.aidl
@@ -25,12 +25,12 @@ import org.openintents.openpgp.IOpenPgpKeyIdsCallback;
* Results are returned to the callback, which has to be implemented on client side.
*/
interface IOpenPgpService {
-
+
/**
- * Encrypt
- *
- * After successful encryption, callback's onSuccess will contain the resulting output bytes.
+ * Sign
*
+ * After successful signing, callback's onSuccess will contain the resulting output.
+ *
* @param input
* OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
* @param output
@@ -45,18 +45,17 @@ interface IOpenPgpService {
* Writes output to given Uri
* new OpenPgpData(fileDescriptor)
* Writes output to given ParcelFileDescriptor
- * @param keyIds
- * Key Ids of recipients. Can be retrieved with getKeyIds()
* @param callback
* Callback where to return results
*/
- oneway void encrypt(in OpenPgpData input, in OpenPgpData output, in long[] keyIds, in IOpenPgpCallback callback);
+ oneway void sign(in OpenPgpData input, in OpenPgpData output, in IOpenPgpCallback callback);
+
/**
- * Sign
+ * Encrypt
+ *
+ * After successful encryption, callback's onSuccess will contain the resulting output.
*
- * After successful signing, callback's onSuccess will contain the resulting output bytes.
- *
* @param input
* OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
* @param output
@@ -71,15 +70,17 @@ interface IOpenPgpService {
* Writes output to given Uri
* new OpenPgpData(fileDescriptor)
* Writes output to given ParcelFileDescriptor
+ * @param keyIds
+ * Key Ids of recipients. Can be retrieved with getKeyIds()
* @param callback
* Callback where to return results
*/
- oneway void sign(in OpenPgpData input, in OpenPgpData output, in IOpenPgpCallback callback);
+ oneway void encrypt(in OpenPgpData input, in OpenPgpData output, in long[] keyIds, in IOpenPgpCallback callback);
/**
* Sign then encrypt
*
- * After successful signing and encryption, callback's onSuccess will contain the resulting output bytes.
+ * After successful signing and encryption, callback's onSuccess will contain the resulting output.
*
* @param input
* OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
@@ -104,9 +105,9 @@ interface IOpenPgpService {
/**
* Decrypts and verifies given input bytes. This methods handles encrypted-only, signed-and-encrypted,
- * and also signed-only inputBytes.
+ * and also signed-only input.
*
- * After successful decryption/verification, callback's onSuccess will contain the resulting output bytes.
+ * After successful decryption/verification, callback's onSuccess will contain the resulting output.
* The signatureResult in onSuccess is only non-null if signed-and-encrypted or signed-only inputBytes were given.
*
* @param input
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/FileHelper.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/FileHelper.java
index acb7f71f8..ec56fe912 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/FileHelper.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/FileHelper.java
@@ -69,7 +69,7 @@ public class FileHelper {
activity.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException e) {
// No compatible file manager was found.
- Toast.makeText(activity, R.string.noFilemanagerInstalled, Toast.LENGTH_SHORT).show();
+ Toast.makeText(activity, R.string.no_filemanager_installed, Toast.LENGTH_SHORT).show();
}
}
@@ -80,7 +80,7 @@ public class FileHelper {
fragment.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException e) {
// No compatible file manager was found.
- Toast.makeText(fragment.getActivity(), R.string.noFilemanagerInstalled,
+ Toast.makeText(fragment.getActivity(), R.string.no_filemanager_installed,
Toast.LENGTH_SHORT).show();
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpHelper.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpHelper.java
index c5f6c5891..7ac904d89 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpHelper.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpHelper.java
@@ -91,7 +91,7 @@ public class PgpHelper {
}
if (enc == null) {
- throw new PgpGeneralException(context.getString(R.string.error_invalidData));
+ throw new PgpGeneralException(context.getString(R.string.error_invalid_data));
}
// TODO: currently we always only look at the first known key
@@ -205,7 +205,7 @@ public class PgpHelper {
raf.getFilePointer();
byte[] data = new byte[1 << 16];
int pos = 0;
- String msg = context.getString(R.string.progress_deletingSecurely, file.getName());
+ String msg = context.getString(R.string.progress_deleting_securely, file.getName());
while (pos < length) {
if (progress != null)
progress.setProgress(msg, (int) (100 * pos / length), 100);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java
index eff8de224..2d112cc72 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java
@@ -117,7 +117,7 @@ public class PgpImportExport {
throws PgpGeneralException, FileNotFoundException, PGPException, IOException {
Bundle returnData = new Bundle();
- updateProgress(R.string.progress_importingSecretKeys, 0, 100);
+ updateProgress(R.string.progress_importing_secret_keys, 0, 100);
PositionAwareInputStream progressIn = new PositionAwareInputStream(data.getInputStream());
@@ -158,7 +158,7 @@ public class PgpImportExport {
if (status == Id.return_value.error) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_savingKeys));
+ mContext.getString(R.string.error_saving_keys));
}
// update the counts to display to the user at the end
@@ -195,14 +195,14 @@ public class PgpImportExport {
Bundle returnData = new Bundle();
if (keyRingMasterKeyIds.size() == 1) {
- updateProgress(R.string.progress_exportingKey, 0, 100);
+ updateProgress(R.string.progress_exporting_key, 0, 100);
} else {
- updateProgress(R.string.progress_exportingKeys, 0, 100);
+ updateProgress(R.string.progress_exporting_keys, 0, 100);
}
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_externalStorageNotReady));
+ mContext.getString(R.string.error_external_storage_not_ready));
}
// export public keyrings...
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java
index 37a3cb8e2..e2d89bfab 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyHelper.java
@@ -280,7 +280,7 @@ public class PgpKeyHelper {
public static String getMainUserIdSafe(Context context, PGPPublicKey key) {
String userId = getMainUserId(key);
if (userId == null || userId.equals("")) {
- userId = context.getString(R.string.unknownUserId);
+ userId = context.getString(R.string.unknown_user_id);
}
return userId;
}
@@ -288,7 +288,7 @@ public class PgpKeyHelper {
public static String getMainUserIdSafe(Context context, PGPSecretKey key) {
String userId = getMainUserId(key);
if (userId == null || userId.equals("")) {
- userId = context.getString(R.string.unknownUserId);
+ userId = context.getString(R.string.unknown_user_id);
}
return userId;
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
index 0a1227a59..2cbfed28b 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java
@@ -122,7 +122,7 @@ public class PgpKeyOperation {
NoSuchProviderException, PgpGeneralException, InvalidAlgorithmParameterException {
if (keySize < 512) {
- throw new PgpGeneralException(mContext.getString(R.string.error_keySizeMinimum512bit));
+ throw new PgpGeneralException(mContext.getString(R.string.error_key_size_minimum512bit));
}
if (passPhrase == null) {
@@ -143,7 +143,7 @@ public class PgpKeyOperation {
case Id.choice.algorithm.elgamal: {
if (masterSecretKey == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_masterKeyMustNotBeElGamal));
+ mContext.getString(R.string.error_master_key_must_not_be_el_gamal));
}
keyGen = KeyPairGenerator.getInstance("ElGamal", Constants.BOUNCY_CASTLE_PROVIDER_NAME);
BigInteger p = Primes.getBestPrime(keySize);
@@ -165,7 +165,7 @@ public class PgpKeyOperation {
}
default: {
- throw new PgpGeneralException(mContext.getString(R.string.error_unknownAlgorithmChoice));
+ throw new PgpGeneralException(mContext.getString(R.string.error_unknown_algorithm_choice));
}
}
@@ -216,7 +216,7 @@ public class PgpKeyOperation {
String newPassPhrase) throws IOException, PGPException, PGPException,
NoSuchProviderException {
- updateProgress(R.string.progress_buildingKey, 0, 100);
+ updateProgress(R.string.progress_building_key, 0, 100);
if (oldPassPhrase == null) {
oldPassPhrase = "";
}
@@ -232,7 +232,7 @@ public class PgpKeyOperation {
new JcePBESecretKeyEncryptorBuilder(keyRing.getSecretKey()
.getKeyEncryptionAlgorithm()).build(newPassPhrase.toCharArray()));
- updateProgress(R.string.progress_savingKeyRing, 50, 100);
+ updateProgress(R.string.progress_saving_key_ring, 50, 100);
ProviderHelper.saveKeyRing(mContext, newKeyRing);
@@ -247,7 +247,7 @@ public class PgpKeyOperation {
Log.d(Constants.TAG, "userIds: " + userIds.toString());
- updateProgress(R.string.progress_buildingKey, 0, 100);
+ updateProgress(R.string.progress_building_key, 0, 100);
if (oldPassPhrase == null) {
oldPassPhrase = "";
@@ -256,7 +256,7 @@ public class PgpKeyOperation {
newPassPhrase = "";
}
- updateProgress(R.string.progress_preparingMasterKey, 10, 100);
+ updateProgress(R.string.progress_preparing_master_key, 10, 100);
int usageId = keysUsages.get(0);
boolean canSign = (usageId == Id.choice.usage.sign_only || usageId == Id.choice.usage.sign_and_encrypt);
@@ -287,7 +287,7 @@ public class PgpKeyOperation {
Constants.BOUNCY_CASTLE_PROVIDER_NAME).build(oldPassPhrase.toCharArray());
PGPPrivateKey masterPrivateKey = masterKey.extractPrivateKey(keyDecryptor);
- updateProgress(R.string.progress_certifyingMasterKey, 20, 100);
+ updateProgress(R.string.progress_certifying_master_key, 20, 100);
for (String userId : userIds) {
PGPContentSignerBuilder signerBuilder = new JcaPGPContentSignerBuilder(
@@ -332,7 +332,7 @@ public class PgpKeyOperation {
// hashedPacketsGen.setKeyExpirationTime(true, numDays * 86400);
// }
- updateProgress(R.string.progress_buildingMasterKeyRing, 30, 100);
+ updateProgress(R.string.progress_building_master_key, 30, 100);
// define hashing and signing algos
PGPDigestCalculator sha1Calc = new JcaPGPDigestCalculatorProviderBuilder().build().get(
@@ -350,7 +350,7 @@ public class PgpKeyOperation {
masterKeyPair, mainUserId, sha1Calc, hashedPacketsGen.generate(),
unhashedPacketsGen.generate(), certificationSignerBuilder, keyEncryptor);
- updateProgress(R.string.progress_addingSubKeys, 40, 100);
+ updateProgress(R.string.progress_adding_sub_keys, 40, 100);
for (int i = 1; i < keys.size(); ++i) {
updateProgress(40 + 50 * (i - 1) / (keys.size() - 1), 100);
@@ -401,7 +401,7 @@ public class PgpKeyOperation {
PGPSecretKeyRing secretKeyRing = keyGen.generateSecretKeyRing();
PGPPublicKeyRing publicKeyRing = keyGen.generatePublicKeyRing();
- updateProgress(R.string.progress_savingKeyRing, 90, 100);
+ updateProgress(R.string.progress_saving_key_ring, 90, 100);
ProviderHelper.saveKeyRing(mContext, secretKeyRing);
ProviderHelper.saveKeyRing(mContext, publicKeyRing);
@@ -420,7 +420,7 @@ public class PgpKeyOperation {
PGPSecretKey signingKey = PgpKeyHelper.getCertificationKey(mContext, masterKeyId);
if (signingKey == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_signatureFailed));
+ throw new PgpGeneralException(mContext.getString(R.string.error_signature_failed));
}
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder().setProvider(
@@ -428,7 +428,7 @@ public class PgpKeyOperation {
PGPPrivateKey signaturePrivateKey = signingKey.extractPrivateKey(keyDecryptor);
if (signaturePrivateKey == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_couldNotExtractPrivateKey));
+ mContext.getString(R.string.error_could_not_extract_private_key));
}
// TODO: SHA256 fixed?
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpOperation.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpOperation.java
index d79ccdf3b..755537012 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpOperation.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpOperation.java
@@ -137,32 +137,32 @@ public class PgpOperation {
if (encryptionKeyIds.length == 0 && encryptionPassphrase == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_noEncryptionKeysOrPassPhrase));
+ mContext.getString(R.string.error_no_encryption_keys_or_passphrase));
}
if (signatureKeyId != Id.key.none) {
signingKeyRing = ProviderHelper.getPGPSecretKeyRingByKeyId(mContext, signatureKeyId);
signingKey = PgpKeyHelper.getSigningKey(mContext, signatureKeyId);
if (signingKey == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_signatureFailed));
+ throw new PgpGeneralException(mContext.getString(R.string.error_signature_failed));
}
if (signaturePassphrase == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_noSignaturePassPhrase));
+ mContext.getString(R.string.error_no_signature_passphrase));
}
- updateProgress(R.string.progress_extractingSignatureKey, 0, 100);
+ updateProgress(R.string.progress_extracting_signature_key, 0, 100);
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder().setProvider(
Constants.BOUNCY_CASTLE_PROVIDER_NAME).build(signaturePassphrase.toCharArray());
signaturePrivateKey = signingKey.extractPrivateKey(keyDecryptor);
if (signaturePrivateKey == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_couldNotExtractPrivateKey));
+ mContext.getString(R.string.error_could_not_extract_private_key));
}
}
- updateProgress(R.string.progress_preparingStreams, 5, 100);
+ updateProgress(R.string.progress_preparing_streams, 5, 100);
// encrypt and compress input file content
JcePGPDataEncryptorBuilder encryptorBuilder = new JcePGPDataEncryptorBuilder(
@@ -196,7 +196,7 @@ public class PgpOperation {
PGPV3SignatureGenerator signatureV3Generator = null;
if (signatureKeyId != Id.key.none) {
- updateProgress(R.string.progress_preparingSignature, 10, 100);
+ updateProgress(R.string.progress_preparing_signature, 10, 100);
// content signer based on signing key algorithm and choosen hash algorithm
JcaPGPContentSignerBuilder contentSignerBuilder = new JcaPGPContentSignerBuilder(
@@ -262,7 +262,7 @@ public class PgpOperation {
literalGen.close();
if (signatureKeyId != Id.key.none) {
- updateProgress(R.string.progress_generatingSignature, 95, 100);
+ updateProgress(R.string.progress_generating_signature, 95, 100);
if (signatureForceV3) {
signatureV3Generator.generate().encode(pOut);
} else {
@@ -293,19 +293,19 @@ public class PgpOperation {
if (signatureKeyId == 0) {
armorOut.close();
- throw new PgpGeneralException(mContext.getString(R.string.error_noSignatureKey));
+ throw new PgpGeneralException(mContext.getString(R.string.error_no_signature_key));
}
signingKeyRing = ProviderHelper.getPGPSecretKeyRingByKeyId(mContext, signatureKeyId);
signingKey = PgpKeyHelper.getSigningKey(mContext, signatureKeyId);
if (signingKey == null) {
armorOut.close();
- throw new PgpGeneralException(mContext.getString(R.string.error_signatureFailed));
+ throw new PgpGeneralException(mContext.getString(R.string.error_signature_failed));
}
if (signaturePassphrase == null) {
armorOut.close();
- throw new PgpGeneralException(mContext.getString(R.string.error_noSignaturePassPhrase));
+ throw new PgpGeneralException(mContext.getString(R.string.error_no_signature_passphrase));
}
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder().setProvider(
Constants.BOUNCY_CASTLE_PROVIDER_NAME).build(signaturePassphrase.toCharArray());
@@ -313,11 +313,11 @@ public class PgpOperation {
if (signaturePrivateKey == null) {
armorOut.close();
throw new PgpGeneralException(
- mContext.getString(R.string.error_couldNotExtractPrivateKey));
+ mContext.getString(R.string.error_could_not_extract_private_key));
}
- updateProgress(R.string.progress_preparingStreams, 0, 100);
+ updateProgress(R.string.progress_preparing_streams, 0, 100);
- updateProgress(R.string.progress_preparingSignature, 30, 100);
+ updateProgress(R.string.progress_preparing_signature, 30, 100);
PGPSignatureGenerator signatureGenerator = null;
PGPV3SignatureGenerator signatureV3Generator = null;
@@ -408,17 +408,17 @@ public class PgpOperation {
PGPPrivateKey signaturePrivateKey = null;
if (signatureKeyId == 0) {
- throw new PgpGeneralException(mContext.getString(R.string.error_noSignatureKey));
+ throw new PgpGeneralException(mContext.getString(R.string.error_no_signature_key));
}
signingKeyRing = ProviderHelper.getPGPSecretKeyRingByKeyId(mContext, signatureKeyId);
signingKey = PgpKeyHelper.getSigningKey(mContext, signatureKeyId);
if (signingKey == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_signatureFailed));
+ throw new PgpGeneralException(mContext.getString(R.string.error_signature_failed));
}
if (signaturePassPhrase == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_noSignaturePassPhrase));
+ throw new PgpGeneralException(mContext.getString(R.string.error_no_signature_passphrase));
}
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder().setProvider(
@@ -426,11 +426,11 @@ public class PgpOperation {
signaturePrivateKey = signingKey.extractPrivateKey(keyDecryptor);
if (signaturePrivateKey == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_couldNotExtractPrivateKey));
+ mContext.getString(R.string.error_could_not_extract_private_key));
}
- updateProgress(R.string.progress_preparingStreams, 0, 100);
+ updateProgress(R.string.progress_preparing_streams, 0, 100);
- updateProgress(R.string.progress_preparingSignature, 30, 100);
+ updateProgress(R.string.progress_preparing_signature, 30, 100);
PGPSignatureGenerator signatureGenerator = null;
PGPV3SignatureGenerator signatureV3Generator = null;
@@ -520,7 +520,7 @@ public class PgpOperation {
}
if (enc == null) {
- throw new PgpGeneralException(context.getString(R.string.error_invalidData));
+ throw new PgpGeneralException(context.getString(R.string.error_invalid_data));
}
Iterator<?> it = enc.getEncryptedDataObjects();
@@ -548,7 +548,7 @@ public class PgpOperation {
long signatureKeyId = 0;
int currentProgress = 0;
- updateProgress(R.string.progress_readingData, currentProgress, 100);
+ updateProgress(R.string.progress_reading_data, currentProgress, 100);
if (o instanceof PGPEncryptedDataList) {
enc = (PGPEncryptedDataList) o;
@@ -557,7 +557,7 @@ public class PgpOperation {
}
if (enc == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_invalidData));
+ throw new PgpGeneralException(mContext.getString(R.string.error_invalid_data));
}
InputStream clear = null;
@@ -581,10 +581,10 @@ public class PgpOperation {
if (pbe == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_noSymmetricEncryptionPacket));
+ mContext.getString(R.string.error_no_symmetric_encryption_packet));
}
- updateProgress(R.string.progress_preparingStreams, currentProgress, 100);
+ updateProgress(R.string.progress_preparing_streams, currentProgress, 100);
PGPDigestCalculatorProvider digestCalcProvider = new JcaPGPDigestCalculatorProviderBuilder()
.setProvider(Constants.BOUNCY_CASTLE_PROVIDER_NAME).build();
@@ -597,7 +597,7 @@ public class PgpOperation {
encryptedData = pbe;
currentProgress += 5;
} else {
- updateProgress(R.string.progress_findingKey, currentProgress, 100);
+ updateProgress(R.string.progress_finding_key, currentProgress, 100);
PGPPublicKeyEncryptedData pbe = null;
PGPSecretKey secretKey = null;
@@ -616,11 +616,11 @@ public class PgpOperation {
}
if (secretKey == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_noSecretKeyFound));
+ throw new PgpGeneralException(mContext.getString(R.string.error_no_secret_key_found));
}
currentProgress += 5;
- updateProgress(R.string.progress_extractingKey, currentProgress, 100);
+ updateProgress(R.string.progress_extracting_key, currentProgress, 100);
PGPPrivateKey privateKey = null;
try {
PBESecretKeyDecryptor keyDecryptor = new JcePBESecretKeyDecryptorBuilder()
@@ -628,14 +628,14 @@ public class PgpOperation {
passphrase.toCharArray());
privateKey = secretKey.extractPrivateKey(keyDecryptor);
} catch (PGPException e) {
- throw new PGPException(mContext.getString(R.string.error_wrongPassPhrase));
+ throw new PGPException(mContext.getString(R.string.error_wrong_passphrase));
}
if (privateKey == null) {
throw new PgpGeneralException(
- mContext.getString(R.string.error_couldNotExtractPrivateKey));
+ mContext.getString(R.string.error_could_not_extract_private_key));
}
currentProgress += 5;
- updateProgress(R.string.progress_preparingStreams, currentProgress, 100);
+ updateProgress(R.string.progress_preparing_streams, currentProgress, 100);
PublicKeyDataDecryptorFactory decryptorFactory = new JcePublicKeyDataDecryptorFactoryBuilder()
.setProvider(Constants.BOUNCY_CASTLE_PROVIDER_NAME).build(privateKey);
@@ -653,7 +653,7 @@ public class PgpOperation {
int signatureIndex = -1;
if (dataChunk instanceof PGPCompressedData) {
- updateProgress(R.string.progress_decompressingData, currentProgress, 100);
+ updateProgress(R.string.progress_decompressing_data, currentProgress, 100);
PGPObjectFactory fact = new PGPObjectFactory(
((PGPCompressedData) dataChunk).getDataStream());
@@ -663,7 +663,7 @@ public class PgpOperation {
}
if (dataChunk instanceof PGPOnePassSignatureList) {
- updateProgress(R.string.progress_processingSignature, currentProgress, 100);
+ updateProgress(R.string.progress_processing_signature, currentProgress, 100);
returnData.putBoolean(KeychainIntentService.RESULT_SIGNATURE, true);
PGPOnePassSignatureList sigList = (PGPOnePassSignatureList) dataChunk;
@@ -753,7 +753,7 @@ public class PgpOperation {
}
if (signature != null) {
- updateProgress(R.string.progress_verifyingSignature, 90, 100);
+ updateProgress(R.string.progress_verifying_signature, 90, 100);
PGPSignatureList signatureList = (PGPSignatureList) plainFact.nextObject();
PGPSignature messageSignature = signatureList.get(signatureIndex);
@@ -767,7 +767,7 @@ public class PgpOperation {
// TODO: add integrity somewhere
if (encryptedData.isIntegrityProtected()) {
- updateProgress(R.string.progress_verifyingIntegrity, 95, 100);
+ updateProgress(R.string.progress_verifying_integrity, 95, 100);
if (encryptedData.verify()) {
// passed
@@ -814,12 +814,12 @@ public class PgpOperation {
returnData.putBoolean(KeychainIntentService.RESULT_SIGNATURE, true);
- updateProgress(R.string.progress_processingSignature, 60, 100);
+ updateProgress(R.string.progress_processing_signature, 60, 100);
PGPObjectFactory pgpFact = new PGPObjectFactory(aIn);
PGPSignatureList sigList = (PGPSignatureList) pgpFact.nextObject();
if (sigList == null) {
- throw new PgpGeneralException(mContext.getString(R.string.error_corruptData));
+ throw new PgpGeneralException(mContext.getString(R.string.error_corrupt_data));
}
PGPSignature signature = null;
long signatureKeyId = 0;
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java
index 8f8f1bdca..ba3169b18 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentService.java
@@ -277,7 +277,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial
if (!FileHelper.isStorageMounted(inputFile)
|| !FileHelper.isStorageMounted(outputFile)) {
throw new PgpGeneralException(
- getString(R.string.error_externalStorageNotReady));
+ getString(R.string.error_external_storage_not_ready));
}
inStream = new FileInputStream(inputFile);
@@ -421,7 +421,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial
if (!FileHelper.isStorageMounted(inputFile)
|| !FileHelper.isStorageMounted(outputFile)) {
throw new PgpGeneralException(
- getString(R.string.error_externalStorageNotReady));
+ getString(R.string.error_external_storage_not_ready));
}
// InputStream
@@ -616,9 +616,9 @@ public class KeychainIntentService extends IntentService implements ProgressDial
PgpHelper.deleteFileSecurely(this, this, new File(deleteFile));
} catch (FileNotFoundException e) {
throw new PgpGeneralException(
- getString(R.string.error_fileNotFound, deleteFile));
+ getString(R.string.error_file_not_found, deleteFile));
} catch (IOException e) {
- throw new PgpGeneralException(getString(R.string.error_fileDeleteFailed,
+ throw new PgpGeneralException(getString(R.string.error_file_delete_failed,
deleteFile));
}
@@ -694,7 +694,7 @@ public class KeychainIntentService extends IntentService implements ProgressDial
// check if storage is ready
if (!FileHelper.isStorageMounted(outputFile)) {
- throw new PgpGeneralException(getString(R.string.error_externalStorageNotReady));
+ throw new PgpGeneralException(getString(R.string.error_external_storage_not_ready));
}
// OutputStream
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java
index f3efbf8f1..170b946d2 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/KeychainIntentServiceHandler.java
@@ -79,7 +79,7 @@ public class KeychainIntentServiceHandler extends Handler {
// show error from service
if (data.containsKey(DATA_ERROR)) {
Toast.makeText(mActivity,
- mActivity.getString(R.string.errorMessage, data.getString(DATA_ERROR)),
+ mActivity.getString(R.string.error_message, data.getString(DATA_ERROR)),
Toast.LENGTH_SHORT).show();
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java
index 30804ee90..942f8eba8 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/AppSettingsFragment.java
@@ -227,7 +227,7 @@ public class AppSettingsFragment extends Fragment {
mKeyUserId.setText(R.string.api_settings_no_key);
mKeyUserIdRest.setText("");
} else {
- String uid = getResources().getString(R.string.unknownUserId);
+ String uid = getResources().getString(R.string.unknown_user_id);
String uidExtra = "";
PGPSecretKeyRing keyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(
getActivity(), secretKeyId);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
index 9f302459c..575f76a22 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/OpenPgpService.java
@@ -387,7 +387,7 @@ public class OpenPgpService extends RemoteService {
}
secretKeyId = PgpHelper.getDecryptionKeyId(this, inputStream2);
if (secretKeyId == Id.key.none) {
- throw new PgpGeneralException(getString(R.string.error_noSecretKeyFound));
+ throw new PgpGeneralException(getString(R.string.error_no_secret_key_found));
}
} catch (NoAsymmetricEncryptionException e) {
if (inputStream2.markSupported()) {
@@ -396,7 +396,7 @@ public class OpenPgpService extends RemoteService {
secretKeyId = Id.key.symmetric;
if (!PgpOperation.hasSymmetricEncryption(this, inputStream2)) {
throw new PgpGeneralException(
- getString(R.string.error_noKnownEncryptionFound));
+ getString(R.string.error_no_known_encryption_found));
}
// we do not support symmetric decryption from the API!
throw new Exception("Symmetric decryption is not supported!");
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java
index 5bf0684b1..2c4bb4e97 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/service/remote/RemoteServiceActivity.java
@@ -225,7 +225,7 @@ public class RemoteServiceActivity extends SherlockFragmentActivity {
finishHandled = true;
finish();
}
- }, R.string.btn_doNotSave, new View.OnClickListener() {
+ }, R.string.btn_do_not_save, new View.OnClickListener() {
@Override
public void onClick(View v) {
// cancel
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
index 2aab7ac22..78ad4c9be 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/DecryptActivity.java
@@ -262,7 +262,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
if (matcher.matches()) {
data = matcher.group(1);
mMessage.setText(data);
- Toast.makeText(this, R.string.usingClipboardContent, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.using_clipboard_content, Toast.LENGTH_SHORT).show();
}
}
}
@@ -399,7 +399,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
} else {
Log.e(Constants.TAG,
"Direct binary data without actual file in filesystem is not supported. Please use the Remote Service API!");
- Toast.makeText(this, R.string.error_onlyFilesAreSupported, Toast.LENGTH_LONG)
+ Toast.makeText(this, R.string.error_only_files_are_supported, Toast.LENGTH_LONG)
.show();
// end activity
finish();
@@ -463,7 +463,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
}
if (mInputFilename.equals("")) {
- Toast.makeText(this, R.string.noFileSelected, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.no_file_selected, Toast.LENGTH_SHORT).show();
return;
}
@@ -472,7 +472,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
if (!file.exists() || !file.isFile()) {
Toast.makeText(
this,
- getString(R.string.errorMessage, getString(R.string.error_fileNotFound)),
+ getString(R.string.error_message, getString(R.string.error_file_not_found)),
Toast.LENGTH_SHORT).show();
return;
}
@@ -552,13 +552,13 @@ public class DecryptActivity extends SherlockFragmentActivity {
inStream = getContentResolver().openInputStream(mContentUri);
} catch (FileNotFoundException e) {
Log.e(Constants.TAG, "File not found!", e);
- Toast.makeText(this, getString(R.string.error_fileNotFound, e.getMessage()),
+ Toast.makeText(this, getString(R.string.error_file_not_found, e.getMessage()),
Toast.LENGTH_SHORT).show();
}
} else if (mDecryptTarget == Id.target.file) {
// check if storage is ready
if (!FileHelper.isStorageMounted(mInputFilename)) {
- Toast.makeText(this, getString(R.string.error_externalStorageNotReady),
+ Toast.makeText(this, getString(R.string.error_external_storage_not_ready),
Toast.LENGTH_SHORT).show();
return;
}
@@ -567,7 +567,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
inStream = new BufferedInputStream(new FileInputStream(mInputFilename));
} catch (FileNotFoundException e) {
Log.e(Constants.TAG, "File not found!", e);
- Toast.makeText(this, getString(R.string.error_fileNotFound, e.getMessage()),
+ Toast.makeText(this, getString(R.string.error_file_not_found, e.getMessage()),
Toast.LENGTH_SHORT).show();
}
} else {
@@ -583,7 +583,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
}
mSecretKeyId = PgpHelper.getDecryptionKeyId(this, inStream);
if (mSecretKeyId == Id.key.none) {
- throw new PgpGeneralException(getString(R.string.error_noSecretKeyFound));
+ throw new PgpGeneralException(getString(R.string.error_no_secret_key_found));
}
mAssumeSymmetricEncryption = false;
} catch (NoAsymmetricEncryptionException e) {
@@ -592,12 +592,12 @@ public class DecryptActivity extends SherlockFragmentActivity {
}
mSecretKeyId = Id.key.symmetric;
if (!PgpOperation.hasSymmetricEncryption(this, inStream)) {
- throw new PgpGeneralException(getString(R.string.error_noKnownEncryptionFound));
+ throw new PgpGeneralException(getString(R.string.error_no_known_encryption_found));
}
mAssumeSymmetricEncryption = true;
}
} catch (Exception e) {
- Toast.makeText(this, getString(R.string.errorMessage, e.getMessage()),
+ Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
Toast.LENGTH_SHORT).show();
}
}
@@ -631,8 +631,8 @@ public class DecryptActivity extends SherlockFragmentActivity {
Messenger messenger = new Messenger(returnHandler);
mFileDialog = FileDialogFragment.newInstance(messenger,
- getString(R.string.title_decryptToFile),
- getString(R.string.specifyFileToDecryptTo), mOutputFilename, null,
+ getString(R.string.title_decrypt_to_file),
+ getString(R.string.specify_file_to_decrypt_to), mOutputFilename, null,
Id.request.output_filename);
mFileDialog.show(getSupportFragmentManager(), "fileDialog");
@@ -730,7 +730,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
// build new action bar
invalidateOptionsMenu();
- Toast.makeText(DecryptActivity.this, R.string.decryptionSuccessful,
+ Toast.makeText(DecryptActivity.this, R.string.decryption_successful,
Toast.LENGTH_SHORT).show();
if (mReturnResult) {
Intent intent = new Intent();
@@ -775,7 +775,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
mUserIdRest.setText("id: "
+ PgpKeyHelper.convertKeyIdToHex(mSignatureKeyId));
if (userId == null) {
- userId = getResources().getString(R.string.unknownUserId);
+ userId = getResources().getString(R.string.unknown_user_id);
}
String chunks[] = userId.split(" <", 2);
userId = chunks[0];
@@ -790,7 +790,7 @@ public class DecryptActivity extends SherlockFragmentActivity {
.getBoolean(KeychainIntentService.RESULT_SIGNATURE_UNKNOWN)) {
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
Toast.makeText(DecryptActivity.this,
- R.string.unknownSignatureKeyTouchToLookUp, Toast.LENGTH_LONG)
+ R.string.unknown_signature_key_touch_to_look_up, Toast.LENGTH_LONG)
.show();
} else {
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
index 0c7b90e16..1e62d06e3 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
@@ -124,7 +124,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
}
});
((TextView) customActionBarView.findViewById(R.id.actionbar_cancel_text))
- .setText(R.string.btn_doNotSave);
+ .setText(R.string.btn_do_not_save);
customActionBarView.findViewById(R.id.actionbar_cancel).setOnClickListener(
new View.OnClickListener() {
@Override
@@ -201,7 +201,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
private void handleActionCreateKey(Intent intent) {
Bundle extras = intent.getExtras();
- mActionBar.setTitle(R.string.title_createKey);
+ mActionBar.setTitle(R.string.title_create_key);
mCurrentPassPhrase = "";
@@ -330,7 +330,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
private void handleActionEditKey(Intent intent) {
Bundle extras = intent.getExtras();
- mActionBar.setTitle(R.string.title_editKey);
+ mActionBar.setTitle(R.string.title_edit_key);
if (extras != null) {
if (extras.containsKey(EXTRA_MASTER_CAN_SIGN)) {
@@ -379,7 +379,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
}
} else {
Log.e(Constants.TAG, "Keyring not found with masterKeyId: " + masterKeyId);
- Toast.makeText(this, R.string.error_noSecretKeyFound, Toast.LENGTH_LONG).show();
+ Toast.makeText(this, R.string.error_no_secret_key_found, Toast.LENGTH_LONG).show();
}
if (masterKey != null) {
for (String userId : new IterableIterator<String>(masterKey.getUserIDs())) {
@@ -418,9 +418,9 @@ public class EditKeyActivity extends SherlockFragmentActivity {
// set title based on isPassphraseSet()
int title = -1;
if (isPassphraseSet()) {
- title = R.string.title_changePassPhrase;
+ title = R.string.title_change_pass_phrase;
} else {
- title = R.string.title_setPassPhrase;
+ title = R.string.title_set_passphrase;
}
SetPassphraseDialogFragment setPassphraseDialog = SetPassphraseDialogFragment.newInstance(
@@ -473,7 +473,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
private void saveClicked() {
try {
if (!isPassphraseSet()) {
- throw new PgpGeneralException(this.getString(R.string.setAPassPhrase));
+ throw new PgpGeneralException(this.getString(R.string.set_a_passphrase));
}
// Send all information needed to service to edit key in other thread
@@ -530,7 +530,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
// start service with intent
startService(intent);
} catch (PgpGeneralException e) {
- Toast.makeText(this, getString(R.string.errorMessage, e.getMessage()),
+ Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
Toast.LENGTH_SHORT).show();
}
}
@@ -558,10 +558,10 @@ public class EditKeyActivity extends SherlockFragmentActivity {
try {
userId = editor.getValue();
} catch (UserIdEditor.NoNameException e) {
- throw new PgpGeneralException(this.getString(R.string.error_userIdNeedsAName));
+ throw new PgpGeneralException(this.getString(R.string.error_user_id_needs_a_name));
} catch (UserIdEditor.NoEmailException e) {
throw new PgpGeneralException(
- this.getString(R.string.error_userIdNeedsAnEmailAddress));
+ this.getString(R.string.error_user_id_needs_an_email_address));
} catch (UserIdEditor.InvalidEmailException e) {
throw new PgpGeneralException(e.getMessage());
}
@@ -579,11 +579,11 @@ public class EditKeyActivity extends SherlockFragmentActivity {
}
if (userIds.size() == 0) {
- throw new PgpGeneralException(getString(R.string.error_keyNeedsAUserId));
+ throw new PgpGeneralException(getString(R.string.error_key_needs_a_user_id));
}
if (!gotMainUserId) {
- throw new PgpGeneralException(getString(R.string.error_mainUserIdMustNotBeEmpty));
+ throw new PgpGeneralException(getString(R.string.error_main_user_id_must_not_be_empty));
}
return userIds;
@@ -601,7 +601,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
ViewGroup keyEditors = keysView.getEditors();
if (keyEditors.getChildCount() == 0) {
- throw new PgpGeneralException(getString(R.string.error_keyNeedsMasterKey));
+ throw new PgpGeneralException(getString(R.string.error_key_needs_master_key));
}
for (int i = 0; i < keyEditors.getChildCount(); ++i) {
@@ -624,7 +624,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
ViewGroup keyEditors = keysView.getEditors();
if (keyEditors.getChildCount() == 0) {
- throw new PgpGeneralException(getString(R.string.error_keyNeedsMasterKey));
+ throw new PgpGeneralException(getString(R.string.error_key_needs_master_key));
}
for (int i = 0; i < keyEditors.getChildCount(); ++i) {
@@ -636,7 +636,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
}
private void updatePassPhraseButtonText() {
- mChangePassPhrase.setText(isPassphraseSet() ? R.string.btn_changePassPhrase
- : R.string.btn_setPassPhrase);
+ mChangePassPhrase.setText(isPassphraseSet() ? R.string.btn_change_passphrase
+ : R.string.btn_set_passphrase);
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
index b9a58a210..2dfdf254e 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
@@ -279,7 +279,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
} else {
Log.e(Constants.TAG,
"Direct binary data without actual file in filesystem is not supported by Intents. Please use the Remote Service API!");
- Toast.makeText(this, R.string.error_onlyFilesAreSupported, Toast.LENGTH_LONG)
+ Toast.makeText(this, R.string.error_only_files_are_supported, Toast.LENGTH_LONG)
.show();
// end activity
finish();
@@ -404,7 +404,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
private void updateActionBarButtons() {
switch (mSource.getCurrentView().getId()) {
case R.id.sourceFile: {
- setActionbarButtons(true, R.string.btn_encryptFile, false, 0);
+ setActionbarButtons(true, R.string.btn_encrypt_file, false, 0);
break;
}
@@ -413,19 +413,19 @@ public class EncryptActivity extends SherlockFragmentActivity {
mSourceLabel.setText(R.string.label_message);
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
- setActionbarButtons(true, R.string.btn_encryptAndSend, true,
- R.string.btn_encryptToClipboard);
+ setActionbarButtons(true, R.string.btn_encrypt_and_send, true,
+ R.string.btn_encrypt_to_clipboard);
} else {
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
if (mSecretKeyId == 0) {
setActionbarButtons(false, 0, false, 0);
} else {
- setActionbarButtons(true, R.string.btn_signAndSend, true,
- R.string.btn_signToClipboard);
+ setActionbarButtons(true, R.string.btn_sign_and_send, true,
+ R.string.btn_sign_to_clipboard);
}
} else {
- setActionbarButtons(true, R.string.btn_encryptAndSend, true,
- R.string.btn_encryptToClipboard);
+ setActionbarButtons(true, R.string.btn_encrypt_and_send, true,
+ R.string.btn_encrypt_to_clipboard);
}
}
break;
@@ -483,7 +483,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
mOutputFilename = guessOutputFilename(mInputFilename);
if (mInputFilename.equals("")) {
- Toast.makeText(this, R.string.noFileSelected, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.no_file_selected, Toast.LENGTH_SHORT).show();
return;
}
@@ -492,7 +492,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
if (!file.exists() || !file.isFile()) {
Toast.makeText(
this,
- getString(R.string.errorMessage, getString(R.string.error_fileNotFound)),
+ getString(R.string.error_message, getString(R.string.error_file_not_found)),
Toast.LENGTH_SHORT).show();
return;
}
@@ -505,25 +505,25 @@ public class EncryptActivity extends SherlockFragmentActivity {
String passPhrase = mPassPhrase.getText().toString();
String passPhraseAgain = mPassPhraseAgain.getText().toString();
if (!passPhrase.equals(passPhraseAgain)) {
- Toast.makeText(this, R.string.passPhrasesDoNotMatch, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.passphrases_do_not_match, Toast.LENGTH_SHORT).show();
return;
}
gotPassPhrase = (passPhrase.length() != 0);
if (!gotPassPhrase) {
- Toast.makeText(this, R.string.passPhraseMustNotBeEmpty, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.passphrase_must_not_be_empty, Toast.LENGTH_SHORT).show();
return;
}
} else {
boolean encryptIt = (mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0);
// for now require at least one form of encryption for files
if (!encryptIt && mEncryptTarget == Id.target.file) {
- Toast.makeText(this, R.string.selectEncryptionKey, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.select_encryption_key, Toast.LENGTH_SHORT).show();
return;
}
if (!encryptIt && mSecretKeyId == 0) {
- Toast.makeText(this, R.string.selectEncryptionOrSignatureKey, Toast.LENGTH_SHORT)
+ Toast.makeText(this, R.string.select_encryption_or_signature_key, Toast.LENGTH_SHORT)
.show();
return;
}
@@ -594,8 +594,8 @@ public class EncryptActivity extends SherlockFragmentActivity {
Messenger messenger = new Messenger(returnHandler);
mFileDialog = FileDialogFragment.newInstance(messenger,
- getString(R.string.title_encryptToFile),
- getString(R.string.specifyFileToEncryptTo), mOutputFilename, null,
+ getString(R.string.title_encrypt_to_file),
+ getString(R.string.specify_file_to_encrypt_to), mOutputFilename, null,
Id.request.output_filename);
mFileDialog.show(getSupportFragmentManager(), "fileDialog");
@@ -686,7 +686,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
Log.d(Constants.TAG, "output: " + output);
ClipboardReflection.copyToClipboard(EncryptActivity.this, output);
Toast.makeText(EncryptActivity.this,
- R.string.encryptionToClipboardSuccessful, Toast.LENGTH_SHORT)
+ R.string.encryption_to_clipboard_successful, Toast.LENGTH_SHORT)
.show();
break;
@@ -703,11 +703,11 @@ public class EncryptActivity extends SherlockFragmentActivity {
sendIntent.putExtra(Intent.EXTRA_TEXT, output);
startActivity(Intent.createChooser(sendIntent,
- getString(R.string.title_sendEmail)));
+ getString(R.string.title_send_email)));
break;
case Id.target.file:
- Toast.makeText(EncryptActivity.this, R.string.encryptionSuccessful,
+ Toast.makeText(EncryptActivity.this, R.string.encryption_successful,
Toast.LENGTH_SHORT).show();
if (mDeleteAfter.isChecked()) {
@@ -852,10 +852,10 @@ public class EncryptActivity extends SherlockFragmentActivity {
mFileCompression = (Spinner) findViewById(R.id.fileCompression);
Choice[] choices = new Choice[] {
new Choice(Id.choice.compression.none, getString(R.string.choice_none) + " ("
- + getString(R.string.fast) + ")"),
- new Choice(Id.choice.compression.zip, "ZIP (" + getString(R.string.fast) + ")"),
- new Choice(Id.choice.compression.zlib, "ZLIB (" + getString(R.string.fast) + ")"),
- new Choice(Id.choice.compression.bzip2, "BZIP2 (" + getString(R.string.very_slow)
+ + getString(R.string.compression_fast) + ")"),
+ new Choice(Id.choice.compression.zip, "ZIP (" + getString(R.string.compression_fast) + ")"),
+ new Choice(Id.choice.compression.zlib, "ZLIB (" + getString(R.string.compression_fast) + ")"),
+ new Choice(Id.choice.compression.bzip2, "BZIP2 (" + getString(R.string.compression_very_slow)
+ ")"), };
ArrayAdapter<Choice> adapter = new ArrayAdapter<Choice>(this,
android.R.layout.simple_spinner_item, choices);
@@ -896,12 +896,12 @@ public class EncryptActivity extends SherlockFragmentActivity {
private void updateView() {
if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) {
- mSelectKeysButton.setText(R.string.noKeysSelected);
+ mSelectKeysButton.setText(R.string.no_keys_selected);
} else if (mEncryptionKeyIds.length == 1) {
- mSelectKeysButton.setText(R.string.oneKeySelected);
+ mSelectKeysButton.setText(R.string.one_key_selected);
} else {
mSelectKeysButton.setText("" + mEncryptionKeyIds.length + " "
- + getResources().getString(R.string.nKeysSelected));
+ + getResources().getString(R.string.n_keys_selected));
}
if (mSecretKeyId == Id.key.none) {
@@ -909,7 +909,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
mMainUserId.setText("");
mMainUserIdRest.setText("");
} else {
- String uid = getResources().getString(R.string.unknownUserId);
+ String uid = getResources().getString(R.string.unknown_user_id);
String uidExtra = "";
PGPSecretKeyRing keyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(this,
mSecretKeyId);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
index 1cc09c882..13350b6c6 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/HelpActivity.java
@@ -65,6 +65,8 @@ public class HelpActivity extends SherlockFragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.help_activity);
mViewPager = new ViewPager(this);
mViewPager.setId(R.id.pager);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
index b9348cdaf..37edc8f49 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
@@ -345,13 +345,13 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
int bad = returnData.getInt(KeychainIntentService.RESULT_IMPORT_BAD);
String toastMessage;
if (added > 0 && updated > 0) {
- toastMessage = getString(R.string.keysAddedAndUpdated, added, updated);
+ toastMessage = getString(R.string.keys_added_and_updated, added, updated);
} else if (added > 0) {
- toastMessage = getString(R.string.keysAdded, added);
+ toastMessage = getString(R.string.keys_added, added);
} else if (updated > 0) {
- toastMessage = getString(R.string.keysUpdated, updated);
+ toastMessage = getString(R.string.keys_updated, updated);
} else {
- toastMessage = getString(R.string.noKeysAddedOrUpdated);
+ toastMessage = getString(R.string.no_keys_added_or_updated);
}
Toast.makeText(ImportKeysActivity.this, toastMessage, Toast.LENGTH_SHORT)
.show();
@@ -362,7 +362,7 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
alert.setIcon(android.R.drawable.ic_dialog_alert);
alert.setTitle(R.string.warning);
alert.setMessage(ImportKeysActivity.this.getString(
- R.string.badKeysEncountered, bad));
+ R.string.bad_keys_encountered, bad));
alert.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@@ -392,7 +392,7 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
// start service with intent
startService(intent);
} else {
- Toast.makeText(this, R.string.error_nothingImport, Toast.LENGTH_LONG).show();
+ Toast.makeText(this, R.string.error_nothing_import, Toast.LENGTH_LONG).show();
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
index fcd79a9be..18d9dc2ec 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ImportKeysListFragment.java
@@ -93,7 +93,7 @@ public class ImportKeysListFragment extends SherlockListFragment implements
// Give some text to display if there is no data. In a real
// application this would come from a resource.
- setEmptyText(mActivity.getString(R.string.error_nothingImport));
+ setEmptyText(mActivity.getString(R.string.error_nothing_import));
// Create an empty adapter we will use to display the loaded data.
mAdapter = new ImportKeysAdapter(mActivity);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java
index b76945811..7b844fe08 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListActivity.java
@@ -133,9 +133,9 @@ public class KeyListActivity extends SherlockFragmentActivity {
// TODO: reimplement!
// menu.add(3, Id.menu.option.search, 0, R.string.menu_search)
// .setIcon(R.drawable.ic_menu_search).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
- menu.add(0, Id.menu.option.import_from_file, 5, R.string.menu_importFromFile)
+ menu.add(0, Id.menu.option.import_from_file, 5, R.string.menu_import_from_file)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
- menu.add(0, Id.menu.option.export_keys, 6, R.string.menu_exportKeys).setShowAsAction(
+ menu.add(0, Id.menu.option.export_keys, 6, R.string.menu_export_keys).setShowAsAction(
MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
@@ -202,16 +202,16 @@ public class KeyListActivity extends SherlockFragmentActivity {
String title = null;
if (keyRingMasterKeyId != -1) {
// single key export
- title = getString(R.string.title_exportKey);
+ title = getString(R.string.title_export_key);
} else {
- title = getString(R.string.title_exportKeys);
+ title = getString(R.string.title_export_keys);
}
String message = null;
if (mKeyType == Id.type.public_key) {
- message = getString(R.string.specifyFileToExportTo);
+ message = getString(R.string.specify_file_to_export_to);
} else {
- message = getString(R.string.specifyFileToExportSecretKeysTo);
+ message = getString(R.string.specify_file_to_export_secret_keys_to);
}
mFileDialog = FileDialogFragment.newInstance(messenger, title, message,
@@ -289,11 +289,11 @@ public class KeyListActivity extends SherlockFragmentActivity {
int exported = returnData.getInt(KeychainIntentService.RESULT_EXPORT);
String toastMessage;
if (exported == 1) {
- toastMessage = getString(R.string.keyExported);
+ toastMessage = getString(R.string.key_exported);
} else if (exported > 0) {
- toastMessage = getString(R.string.keysExported, exported);
+ toastMessage = getString(R.string.keys_exported, exported);
} else {
- toastMessage = getString(R.string.noKeysExported);
+ toastMessage = getString(R.string.no_keys_exported);
}
Toast.makeText(KeyListActivity.this, toastMessage, Toast.LENGTH_SHORT).show();
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListFragment.java
index 60898848e..0d61b1108 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListFragment.java
@@ -43,7 +43,7 @@ public class KeyListFragment extends ExpandableListFragment {
// Give some text to display if there is no data. In a real
// application this would come from a resource.
- setEmptyText(getString(R.string.listEmpty));
+ setEmptyText(getString(R.string.list_empty));
}
/**
@@ -52,8 +52,8 @@ public class KeyListFragment extends ExpandableListFragment {
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
- menu.add(0, Id.menu.export, 5, R.string.menu_exportKey);
- menu.add(0, Id.menu.delete, 111, R.string.menu_deleteKey);
+ menu.add(0, Id.menu.export, 5, R.string.menu_export_key);
+ menu.add(0, Id.menu.delete, 111, R.string.menu_delete_key);
}
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java
index 275842019..95a3dd3b1 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicActivity.java
@@ -43,14 +43,14 @@ public class KeyListPublicActivity extends KeyListActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
- menu.add(1, Id.menu.option.key_server, 1, R.string.menu_keyServer)
+ menu.add(1, Id.menu.option.key_server, 1, R.string.menu_key_server)
.setIcon(R.drawable.ic_menu_search_list)
.setShowAsAction(
MenuItem.SHOW_AS_ACTION_ALWAYS);
- menu.add(1, Id.menu.option.import_from_qr_code, 2, R.string.menu_importFromQrCode)
+ menu.add(1, Id.menu.option.import_from_qr_code, 2, R.string.menu_import_from_qr_code)
.setShowAsAction(
MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
- menu.add(1, Id.menu.option.import_from_nfc, 3, R.string.menu_importFromNfc)
+ menu.add(1, Id.menu.option.import_from_nfc, 3, R.string.menu_import_from_nfc)
.setShowAsAction(
MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
index f6f8e24ef..0fdcea809 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListPublicFragment.java
@@ -73,12 +73,12 @@ public class KeyListPublicFragment extends KeyListFragment implements
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
- menu.add(0, Id.menu.update, 1, R.string.menu_updateKey);
- menu.add(0, Id.menu.signKey, 2, R.string.menu_signKey);
- menu.add(0, Id.menu.exportToServer, 3, R.string.menu_exportKeyToServer);
+ menu.add(0, Id.menu.update, 1, R.string.menu_update_key);
+ menu.add(0, Id.menu.signKey, 2, R.string.menu_sign_key);
+ menu.add(0, Id.menu.exportToServer, 3, R.string.menu_export_key_to_server);
menu.add(0, Id.menu.share, 6, R.string.menu_share);
- menu.add(0, Id.menu.share_qr_code, 7, R.string.menu_shareQrCode);
- menu.add(0, Id.menu.share_nfc, 8, R.string.menu_shareNfc);
+ menu.add(0, Id.menu.share_qr_code, 7, R.string.menu_share_qr_code);
+ menu.add(0, Id.menu.share_nfc, 8, R.string.menu_share_nfc);
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java
index 68e3be5df..822c73872 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java
@@ -43,9 +43,9 @@ public class KeyListSecretActivity extends KeyListActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
- menu.add(1, Id.menu.option.create, 1, R.string.menu_createKey).setShowAsAction(
+ menu.add(1, Id.menu.option.create, 1, R.string.menu_create_key).setShowAsAction(
MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
- menu.add(1, Id.menu.option.createExpert, 2, R.string.menu_createKeyExpert).setShowAsAction(
+ menu.add(1, Id.menu.option.createExpert, 2, R.string.menu_create_key_expert).setShowAsAction(
MenuItem.SHOW_AS_ACTION_NEVER);
return true;
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
index 7f44429f2..4bbf3d6ef 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretFragment.java
@@ -70,7 +70,7 @@ public class KeyListSecretFragment extends KeyListFragment implements
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
- menu.add(0, Id.menu.edit, 0, R.string.menu_editKey);
+ menu.add(0, Id.menu.edit, 0, R.string.menu_edit_key);
}
@Override
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java
index b6c766bf5..b4679f9d5 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerQueryActivity.java
@@ -235,7 +235,7 @@ public class KeyServerQueryActivity extends SherlockFragmentActivity {
if (mQueryType == Id.keyserver.search) {
if (mSearchResult != null) {
Toast.makeText(KeyServerQueryActivity.this,
- getString(R.string.keysFound, mSearchResult.size()),
+ getString(R.string.keys_found, mSearchResult.size()),
Toast.LENGTH_SHORT).show();
mAdapter.setKeys(mSearchResult);
}
@@ -322,11 +322,11 @@ public class KeyServerQueryActivity extends SherlockFragmentActivity {
View view = mInflater.inflate(R.layout.key_server_query_result_item, null);
TextView mainUserId = (TextView)view.findViewById(R.id.mainUserId);
- mainUserId.setText(R.string.unknownUserId);
+ mainUserId.setText(R.string.unknown_user_id);
TextView mainUserIdRest = (TextView)view.findViewById(R.id.mainUserIdRest);
mainUserIdRest.setText("");
TextView keyId = (TextView)view.findViewById(R.id.keyId);
- keyId.setText(R.string.noKey);
+ keyId.setText(R.string.no_key);
TextView algorithm = (TextView)view.findViewById(R.id.algorithm);
algorithm.setText("");
TextView status = (TextView)view.findViewById(R.id.status);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
index 8c68ef0b2..996637c7a 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyServerUploadActivity.java
@@ -126,7 +126,7 @@ public class KeyServerUploadActivity extends SherlockFragmentActivity {
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
- Toast.makeText(KeyServerUploadActivity.this, R.string.keySendSuccess,
+ Toast.makeText(KeyServerUploadActivity.this, R.string.key_send_success,
Toast.LENGTH_SHORT).show();
finish();
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java
index ab6d851c9..9a270e60b 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/MainActivity.java
@@ -81,7 +81,7 @@ public class MainActivity extends SherlockActivity {
menu.add(0, Id.menu.option.preferences, 0, R.string.menu_preferences)
.setIcon(R.drawable.ic_menu_settings)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- menu.add(0, Id.menu.option.crypto_consumers, 0, R.string.menu_apiAppSettings)
+ menu.add(0, Id.menu.option.crypto_consumers, 0, R.string.menu_api_app_settings)
.setIcon(R.drawable.ic_menu_settings)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesActivity.java
index 3c070c6db..6607ab4d5 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesActivity.java
@@ -123,10 +123,10 @@ public class PreferencesActivity extends SherlockPreferenceActivity {
valueIds = new int[] { Id.choice.compression.none, Id.choice.compression.zip,
Id.choice.compression.zlib, Id.choice.compression.bzip2, };
entries = new String[] {
- getString(R.string.choice_none) + " (" + getString(R.string.fast) + ")",
- "ZIP (" + getString(R.string.fast) + ")",
- "ZLIB (" + getString(R.string.fast) + ")",
- "BZIP2 (" + getString(R.string.very_slow) + ")", };
+ getString(R.string.choice_none) + " (" + getString(R.string.compression_fast) + ")",
+ "ZIP (" + getString(R.string.compression_fast) + ")",
+ "ZLIB (" + getString(R.string.compression_fast) + ")",
+ "BZIP2 (" + getString(R.string.compression_very_slow) + ")", };
values = new String[valueIds.length];
for (int i = 0; i < values.length; ++i) {
values[i] = "" + valueIds[i];
@@ -183,7 +183,7 @@ public class PreferencesActivity extends SherlockPreferenceActivity {
mKeyServerPreference = (PreferenceScreen) findPreference(Constants.pref.KEY_SERVERS);
String servers[] = mPreferences.getKeyServers();
- mKeyServerPreference.setSummary(getResources().getString(R.string.nKeyServers,
+ mKeyServerPreference.setSummary(getResources().getString(R.string.n_key_servers,
servers.length));
mKeyServerPreference
.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@@ -208,7 +208,7 @@ public class PreferencesActivity extends SherlockPreferenceActivity {
String servers[] = data
.getStringArrayExtra(PreferencesKeyServerActivity.EXTRA_KEY_SERVERS);
mPreferences.setKeyServers(servers);
- mKeyServerPreference.setSummary(getResources().getString(R.string.nKeyServers,
+ mKeyServerPreference.setSummary(getResources().getString(R.string.n_key_servers,
servers.length));
break;
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java
index 4bef5416e..674510550 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/PreferencesKeyServerActivity.java
@@ -58,7 +58,7 @@ public class PreferencesKeyServerActivity extends SherlockActivity implements On
// ok
okClicked();
}
- }, R.string.btn_doNotSave, new View.OnClickListener() {
+ }, R.string.btn_do_not_save, new View.OnClickListener() {
@Override
public void onClick(View v) {
// cancel
@@ -73,7 +73,7 @@ public class PreferencesKeyServerActivity extends SherlockActivity implements On
mTitle = (TextView) findViewById(R.id.title);
mSummary = (TextView) findViewById(R.id.summary);
- mTitle.setText(R.string.label_keyServers);
+ mTitle.setText(R.string.label_key_servers);
mEditors = (ViewGroup) findViewById(R.id.editors);
mAdd = findViewById(R.id.add);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java
index 97d64434e..e1dfed12a 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyActivity.java
@@ -54,7 +54,7 @@ public class SelectPublicKeyActivity extends SherlockFragmentActivity {
// ok
okClicked();
}
- }, R.string.btn_doNotSave, new View.OnClickListener() {
+ }, R.string.btn_do_not_save, new View.OnClickListener() {
@Override
public void onClick(View v) {
// cancel
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
index 65bcc0fab..6bbab09b2 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
@@ -85,7 +85,7 @@ public class SelectPublicKeyFragment extends ListFragmentWorkaround implements
// Give some text to display if there is no data. In a real
// application this would come from a resource.
- setEmptyText(getString(R.string.listEmpty));
+ setEmptyText(getString(R.string.list_empty));
mAdapter = new SelectKeyCursorAdapter(mActivity, null, 0, mListView, Id.type.public_key);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectSecretKeyFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectSecretKeyFragment.java
index 00f85bdd0..6083ba00d 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectSecretKeyFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SelectSecretKeyFragment.java
@@ -96,7 +96,7 @@ public class SelectSecretKeyFragment extends SherlockListFragment implements
// Give some text to display if there is no data. In a real
// application this would come from a resource.
- setEmptyText(getString(R.string.listEmpty));
+ setEmptyText(getString(R.string.list_empty));
mAdapter = new SelectKeyCursorAdapter(mActivity, null, 0, mListView, Id.type.secret_key);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareActivity.java
index 3af1569c2..159b2b63a 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareActivity.java
@@ -64,7 +64,7 @@ public class ShareActivity extends SherlockFragmentActivity {
sendIntent.putExtra(Intent.EXTRA_TEXT, keyringArmored.get(0));
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent,
- getResources().getText(R.string.shareKeyringWith)));
+ getResources().getText(R.string.action_share_key_with)));
} else if (ACTION_SHARE_KEYRING_WITH_QR_CODE.equals(action)) {
ShareQrCodeDialogFragment dialog = ShareQrCodeDialogFragment.newInstance(keyringArmored
.get(0));
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java
index ded5455d4..db6a156c7 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/ShareNfcBeamActivity.java
@@ -64,7 +64,7 @@ public class ShareNfcBeamActivity extends SherlockFragmentActivity implements
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
Toast.makeText(this,
- getString(R.string.error) + ": " + getString(R.string.error_jellyBeanNeeded),
+ getString(R.string.error) + ": " + getString(R.string.error_jelly_bean_needed),
Toast.LENGTH_LONG).show();
finish();
} else {
@@ -72,7 +72,7 @@ public class ShareNfcBeamActivity extends SherlockFragmentActivity implements
mNfcAdapter = NfcAdapter.getDefaultAdapter(this);
if (mNfcAdapter == null) {
Toast.makeText(this,
- getString(R.string.error) + ": " + getString(R.string.error_nfcNeeded),
+ getString(R.string.error) + ": " + getString(R.string.error_nfc_needed),
Toast.LENGTH_LONG).show();
finish();
} else {
@@ -170,7 +170,7 @@ public class ShareNfcBeamActivity extends SherlockFragmentActivity implements
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_SENT:
- Toast.makeText(getApplicationContext(), R.string.nfcSuccessfull, Toast.LENGTH_LONG)
+ Toast.makeText(getApplicationContext(), R.string.nfc_successfull, Toast.LENGTH_LONG)
.show();
break;
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SignKeyActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SignKeyActivity.java
index 83dcce14b..c2fe1315b 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SignKeyActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/SignKeyActivity.java
@@ -217,7 +217,7 @@ public class SignKeyActivity extends SherlockFragmentActivity {
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
- Toast.makeText(SignKeyActivity.this, R.string.keySignSuccess,
+ Toast.makeText(SignKeyActivity.this, R.string.key_sign_success,
Toast.LENGTH_SHORT).show();
// check if we need to send the key to the server or not
@@ -271,7 +271,7 @@ public class SignKeyActivity extends SherlockFragmentActivity {
if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
- Toast.makeText(SignKeyActivity.this, R.string.keySendSuccess,
+ Toast.makeText(SignKeyActivity.this, R.string.key_send_success,
Toast.LENGTH_SHORT).show();
finish();
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
index 3d6435cf3..2f55f4fe7 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
@@ -79,11 +79,11 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
View view = mInflater.inflate(R.layout.import_keys_list_entry, null);
TextView mainUserId = (TextView) view.findViewById(R.id.mainUserId);
- mainUserId.setText(R.string.unknownUserId);
+ mainUserId.setText(R.string.unknown_user_id);
TextView mainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
mainUserIdRest.setText("");
TextView keyId = (TextView) view.findViewById(R.id.keyId);
- keyId.setText(R.string.noKey);
+ keyId.setText(R.string.no_key);
TextView fingerprint = (TextView) view.findViewById(R.id.fingerprint);
TextView algorithm = (TextView) view.findViewById(R.id.algorithm);
algorithm.setText("");
@@ -98,7 +98,7 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
mainUserIdRest.setText("<" + chunks[1]);
}
if (entry.secretKey) {
- userId = mActivity.getString(R.string.secretKey) + " " + userId;
+ userId = mActivity.getString(R.string.secret_key) + " " + userId;
mainUserId.setTextColor(Color.RED);
}
mainUserId.setText(userId);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/KeyListAdapter.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/KeyListAdapter.java
index 4f06a2014..e94934008 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/KeyListAdapter.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/KeyListAdapter.java
@@ -72,7 +72,7 @@ public class KeyListAdapter extends CursorTreeAdapter {
int userIdIndex = cursor.getColumnIndex(UserIds.USER_ID);
TextView mainUserId = (TextView) view.findViewById(R.id.mainUserId);
- mainUserId.setText(R.string.unknownUserId);
+ mainUserId.setText(R.string.unknown_user_id);
TextView mainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
mainUserIdRest.setText("");
@@ -87,7 +87,7 @@ public class KeyListAdapter extends CursorTreeAdapter {
}
if (mainUserId.getText().length() == 0) {
- mainUserId.setText(R.string.unknownUserId);
+ mainUserId.setText(R.string.unknown_user_id);
}
if (mainUserIdRest.getText().length() == 0) {
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
index b1e226384..ebb7261be 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
@@ -68,13 +68,13 @@ public class SelectKeyCursorAdapter extends CursorAdapter {
boolean valid = cursor.getInt(cursor.getColumnIndex(PROJECTION_ROW_VALID)) > 0;
TextView mainUserId = (TextView) view.findViewById(R.id.mainUserId);
- mainUserId.setText(R.string.unknownUserId);
+ mainUserId.setText(R.string.unknown_user_id);
TextView mainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
mainUserIdRest.setText("");
TextView keyId = (TextView) view.findViewById(R.id.keyId);
- keyId.setText(R.string.noKey);
+ keyId.setText(R.string.no_key);
TextView status = (TextView) view.findViewById(R.id.status);
- status.setText(R.string.unknownStatus);
+ status.setText(R.string.unknown_status);
String userId = cursor.getString(cursor.getColumnIndex(UserIds.USER_ID));
if (userId != null) {
@@ -95,9 +95,9 @@ public class SelectKeyCursorAdapter extends CursorAdapter {
if (valid) {
if (mKeyType == Id.type.public_key) {
- status.setText(R.string.canEncrypt);
+ status.setText(R.string.can_encrypt);
} else {
- status.setText(R.string.canSign);
+ status.setText(R.string.can_sign);
}
} else {
if (cursor.getInt(cursor.getColumnIndex(PROJECTION_ROW_AVAILABLE)) > 0) {
@@ -105,7 +105,7 @@ public class SelectKeyCursorAdapter extends CursorAdapter {
// expired
status.setText(R.string.expired);
} else {
- status.setText(R.string.noKey);
+ status.setText(R.string.no_key);
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java
index 3389c9f97..402066ad3 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteFileDialogFragment.java
@@ -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();
}
};
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java
index 87a08a68f..638702b57 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/DeleteKeyDialogFragment.java
@@ -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() {
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/LookupUnknownKeyDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/LookupUnknownKeyDialogFragment.java
index 802453f63..b8f2a6327 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/LookupUnknownKeyDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/LookupUnknownKeyDialogFragment.java
@@ -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() {
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java
index 61a9a4366..aba7e974e 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java
@@ -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);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
index 4fdb745fc..797b28829 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/SetPassphraseDialogFragment.java
@@ -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;
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/ShareQrCodeDialogFragment.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/ShareQrCodeDialogFragment.java
index a0e3cb9b4..d11f0d323 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/ShareQrCodeDialogFragment.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/dialog/ShareQrCodeDialogFragment.java
@@ -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);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
index 53a1bc38f..5748839bc 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/KeyEditor.java
@@ -91,11 +91,11 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
mUsage = (Spinner) findViewById(R.id.usage);
Choice choices[] = {
new Choice(Id.choice.usage.sign_only, getResources().getString(
- R.string.choice_signOnly)),
+ R.string.choice_sign_only)),
new Choice(Id.choice.usage.encrypt_only, getResources().getString(
- R.string.choice_encryptOnly)),
+ R.string.choice_encrypt_only)),
new Choice(Id.choice.usage.sign_and_encrypt, getResources().getString(
- R.string.choice_signAndEncrypt)), };
+ R.string.choice_sign_and_encrypt)), };
ArrayAdapter<Choice> adapter = new ArrayAdapter<Choice>(getContext(),
android.R.layout.simple_spinner_item, choices);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
@@ -119,7 +119,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
mDatePickerResultCount = 0;
dialog.setCancelable(true);
dialog.setButton(Dialog.BUTTON_NEGATIVE, getContext()
- .getString(R.string.btn_noDate), new DialogInterface.OnClickListener() {
+ .getString(R.string.btn_no_date), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (mDatePickerResultCount++ == 0) // Note: Ignore results after the first
// one - android sends multiples.
@@ -161,15 +161,15 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
boolean isDSAKey = (key.getPublicKey().getAlgorithm() == PGPPublicKey.DSA);
if (!isElGamalKey) {
choices.add(new Choice(Id.choice.usage.sign_only, getResources().getString(
- R.string.choice_signOnly)));
+ R.string.choice_sign_only)));
}
if (!mIsMasterKey && !isDSAKey) {
choices.add(new Choice(Id.choice.usage.encrypt_only, getResources().getString(
- R.string.choice_encryptOnly)));
+ R.string.choice_encrypt_only)));
}
if (!isElGamalKey && !isDSAKey) {
choices.add(new Choice(Id.choice.usage.sign_and_encrypt, getResources().getString(
- R.string.choice_signAndEncrypt)));
+ R.string.choice_sign_and_encrypt)));
}
ArrayAdapter<Choice> adapter = new ArrayAdapter<Choice>(getContext(),
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
index d201780f2..99190e9c7 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/SectionView.java
@@ -86,7 +86,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
mType = type;
switch (type) {
case Id.type.user_id: {
- mTitle.setText(R.string.section_userIds);
+ mTitle.setText(R.string.section_user_ids);
break;
}
@@ -157,7 +157,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
View view = mInflater.inflate(R.layout.create_key, null);
dialog.setView(view);
- dialog.setTitle(R.string.title_createKey);
+ dialog.setTitle(R.string.title_create_key);
boolean wouldBeMasterKey = (mEditors.getChildCount() == 0);
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
index 5b43ebbd9..6c65e840c 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/widget/UserIdEditor.java
@@ -138,7 +138,7 @@ public class UserIdEditor extends LinearLayout implements Editor, OnClickListene
if (email.length() > 0) {
Matcher emailMatcher = EMAIL_PATTERN.matcher(email);
if (!emailMatcher.matches()) {
- throw new InvalidEmailException(getContext().getString(R.string.error_invalidEmail,
+ throw new InvalidEmailException(getContext().getString(R.string.error_invalid_email,
email));
}
}
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/AlgorithmNames.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/AlgorithmNames.java
index 8ccc63ae7..d3c37edc6 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/AlgorithmNames.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/util/AlgorithmNames.java
@@ -56,13 +56,13 @@ public class AlgorithmNames {
mHashNames.put(HashAlgorithmTags.SHA512, "SHA-512");
mCompressionNames.put(Id.choice.compression.none, mActivity.getString(R.string.choice_none)
- + " (" + mActivity.getString(R.string.fast) + ")");
+ + " (" + mActivity.getString(R.string.compression_fast) + ")");
mCompressionNames.put(Id.choice.compression.zip,
- "ZIP (" + mActivity.getString(R.string.fast) + ")");
+ "ZIP (" + mActivity.getString(R.string.compression_fast) + ")");
mCompressionNames.put(Id.choice.compression.zlib,
- "ZLIB (" + mActivity.getString(R.string.fast) + ")");
+ "ZLIB (" + mActivity.getString(R.string.compression_fast) + ")");
mCompressionNames.put(Id.choice.compression.bzip2,
- "BZIP2 (" + mActivity.getString(R.string.very_slow) + ")");
+ "BZIP2 (" + mActivity.getString(R.string.compression_very_slow) + ")");
}
public HashMap<Integer, String> getEncryptionNames() {