From f38556cab1215f1e49f2e6c2e90627a4c00b02d5 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Tue, 10 Jun 2014 16:24:04 +0200 Subject: [PATCH] import-log: switch to flags instead of statuses for result int --- .../keychain/pgp/PgpImportExport.java | 46 +++++----- .../keychain/provider/ProviderHelper.java | 24 +++-- .../service/OperationResultParcel.java | 9 +- .../keychain/service/OperationResults.java | 55 +++++++++--- .../keychain/ui/ImportKeysActivity.java | 87 +++++++++---------- .../src/main/res/values-de/strings.xml | 10 +-- .../src/main/res/values-es/strings.xml | 10 +-- .../src/main/res/values-fr/strings.xml | 10 +-- .../src/main/res/values-it/strings.xml | 10 +-- .../src/main/res/values-ja/strings.xml | 10 +-- .../src/main/res/values-nl/strings.xml | 10 +-- .../src/main/res/values-pl/strings.xml | 10 +-- .../src/main/res/values-ru/strings.xml | 10 +-- .../src/main/res/values-sl/strings.xml | 10 +-- .../src/main/res/values-uk/strings.xml | 10 +-- OpenKeychain/src/main/res/values/strings.xml | 42 ++++----- 16 files changed, 204 insertions(+), 159 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java index 4cb41708d..bafb086d0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java @@ -33,9 +33,9 @@ import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException; import org.sufficientlysecure.keychain.provider.KeychainContract; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.service.KeychainIntentService; -import org.sufficientlysecure.keychain.service.OperationResultParcel; import org.sufficientlysecure.keychain.service.OperationResultParcel.OperationLog; import org.sufficientlysecure.keychain.service.OperationResults.ImportResult; +import org.sufficientlysecure.keychain.service.OperationResults.SaveKeyringResult; import org.sufficientlysecure.keychain.util.Log; import java.io.ByteArrayOutputStream; @@ -152,9 +152,12 @@ public class PgpImportExport { } } - OperationResultParcel result = mProviderHelper.savePublicKeyRing(key); - - newKeys += 1; + SaveKeyringResult result = mProviderHelper.savePublicKeyRing(key); + if (result.updated()) { + newKeys += 1; + } else { + oldKeys += 1; + } } catch (PgpGeneralException e) { Log.e(Constants.TAG, "Encountered bad key on import!", e); @@ -166,23 +169,26 @@ public class PgpImportExport { } OperationLog log = mProviderHelper.getLog(); - int resultType; - // Any key imported - overall success - if (newKeys > 0 || oldKeys > 0) { - if (badKeys > 0) { - resultType = ImportResult.RESULT_PARTIAL_WITH_ERRORS; - } else if (newKeys > 0 && oldKeys > 0) { - resultType = ImportResult.RESULT_OK_BOTHKEYS; - } else if (newKeys > 0) { - resultType = ImportResult.RESULT_OK_NEWKEYS; - } else { - resultType = ImportResult.RESULT_OK_UPDATED; - } - // No keys imported, overall failure - } else if (badKeys > 0) { - resultType = ImportResult.RESULT_FAIL_ERROR; - } else { + int resultType = 0; + // special return case: no new keys at all + if (badKeys == 0 && newKeys == 0 && oldKeys == 0) { resultType = ImportResult.RESULT_FAIL_NOTHING; + } else { + if (newKeys > 0) { + resultType |= ImportResult.RESULT_OK_NEWKEYS; + } + if (oldKeys > 0) { + resultType |= ImportResult.RESULT_OK_UPDATED; + } + if (badKeys > 0) { + resultType |= ImportResult.RESULT_WITH_ERRORS; + if (newKeys == 0 && oldKeys == 0) { + resultType |= ImportResult.RESULT_ERROR; + } + } + if (log.containsWarnings()) { + resultType |= ImportResult.RESULT_WITH_WARNINGS; + } } return new ImportResult(resultType, log, newKeys, oldKeys, badKeys); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java index cbaf72270..00db473b3 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java @@ -49,6 +49,7 @@ import org.sufficientlysecure.keychain.provider.KeychainContract.Keys; import org.sufficientlysecure.keychain.provider.KeychainContract.UserIds; import org.sufficientlysecure.keychain.remote.AccountSettings; import org.sufficientlysecure.keychain.remote.AppSettings; +import org.sufficientlysecure.keychain.service.OperationResults.SaveKeyringResult; import org.sufficientlysecure.keychain.util.IterableIterator; import org.sufficientlysecure.keychain.util.Log; @@ -267,12 +268,15 @@ public class ProviderHelper { * Saves PGPPublicKeyRing with its keys and userIds in DB */ @SuppressWarnings("unchecked") - public OperationResultParcel savePublicKeyRing(UncachedKeyRing keyRing) { + public SaveKeyringResult savePublicKeyRing(UncachedKeyRing keyRing) { if (keyRing.isSecret()) { log(LogLevel.ERROR, LogType.MSG_IP_BAD_TYPE_SECRET); - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } + // start with ok result + int result = SaveKeyringResult.SAVED_PUBLIC; + long masterKeyId = keyRing.getMasterKeyId(); log(LogLevel.START, LogType.MSG_IP, new String[]{ PgpKeyHelper.convertKeyIdToHex(masterKeyId) }); @@ -296,6 +300,7 @@ public class ProviderHelper { try { mContentResolver.delete(KeyRingData.buildPublicKeyRingUri(Long.toString(masterKeyId)), null, null); log(LogLevel.DEBUG, LogType.MSG_IP_DELETE_OLD_OK); + result |= SaveKeyringResult.UPDATED; } catch (UnsupportedOperationException e) { Log.e(Constants.TAG, "Key could not be deleted! Maybe we are creating a new one!", e); log(LogLevel.DEBUG, LogType.MSG_IP_DELETE_OLD_FAIL); @@ -315,7 +320,7 @@ public class ProviderHelper { values.put(KeyRingData.KEY_RING_DATA, keyRing.getEncoded()); } catch (IOException e) { log(LogLevel.ERROR, LogType.MSG_IP_ENCODE_FAIL); - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } Uri uri = KeyRingData.buildPublicKeyRingUri(Long.toString(masterKeyId)); @@ -371,7 +376,7 @@ public class ProviderHelper { log(LogLevel.ERROR, LogType.MSG_IP_SUBKEY_FUTURE, new String[] { creation.toString() }); - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } Date expiryDate = key.getExpiryTime(); if (expiryDate != null) { @@ -436,7 +441,7 @@ public class ProviderHelper { if (!cert.verifySignature(masterKey, userId)) { // Bad self certification? That's kinda bad... log(LogLevel.ERROR, LogType.MSG_IP_UID_SELF_BAD); - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } // if we already have a cert.. @@ -526,17 +531,17 @@ public class ProviderHelper { log(LogLevel.ERROR, LogType.MSG_IP_FAIL_IO_EXC); Log.e(Constants.TAG, "IOException during import", e); mIndent -= 1; - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } catch (RemoteException e) { log(LogLevel.ERROR, LogType.MSG_IP_FAIL_REMOTE_EX); Log.e(Constants.TAG, "RemoteException during import", e); mIndent -= 1; - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } catch (OperationApplicationException e) { log(LogLevel.ERROR, LogType.MSG_IP_FAIL_OP_EX); Log.e(Constants.TAG, "OperationApplicationException during import", e); mIndent -= 1; - return new OperationResultParcel(1, mLog); + return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog); } // Save the saved keyring (if any) @@ -544,12 +549,13 @@ public class ProviderHelper { log(LogLevel.DEBUG, LogType.MSG_IP_REINSERT_SECRET); mIndent += 1; saveSecretKeyRing(secretRing); + result |= SaveKeyringResult.SAVED_SECRET; mIndent -= 1; } log(LogLevel.OK, LogType.MSG_IP_SUCCESS); mIndent -= 1; - return new OperationResultParcel(0, mLog); + return new SaveKeyringResult(result, mLog); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java index 85b7c456f..8a3b06f67 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java @@ -18,12 +18,13 @@ import java.util.ArrayList; * */ public class OperationResultParcel implements Parcelable { - /** Holds the overall result, the number specifying varying degrees of success. - * Values smaller than 100 are considered an overall success. */ + /** Holds the overall result, the number specifying varying degrees of success. The first bit + * is 0 on overall success, 1 on overall failure. All other bits may be used for more specific + * conditions. */ final int mResult; public static final int RESULT_OK = 0; - public static final int RESULT_ERROR = 100; + public static final int RESULT_ERROR = 1; /// A list of log entries tied to the operation result. final OperationLog mLog; @@ -44,7 +45,7 @@ public class OperationResultParcel implements Parcelable { } public boolean isSuccessful() { - return mResult < 100; + return (mResult & 1) == 1; } public OperationLog getLog() { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResults.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResults.java index bee6917be..342d07953 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResults.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResults.java @@ -8,20 +8,31 @@ public abstract class OperationResults { public final int mNewKeys, mUpdatedKeys, mBadKeys; - // Operation ok, at least one new key (no warnings) - public static final int RESULT_OK_NEWKEYS = 1; - // Operation ok, at least one new and one updated key (no warnings) - public static final int RESULT_OK_BOTHKEYS = 2; - // Operation ok, no new keys but upated ones (no warnings) - public static final int RESULT_OK_UPDATED = 3; + // At least one new key + public static final int RESULT_OK_NEWKEYS = 2; + // At least one updated key + public static final int RESULT_OK_UPDATED = 4; + // At least one key failed (might still be an overall success) + public static final int RESULT_WITH_ERRORS = 8; + // There are warnings in the log + public static final int RESULT_WITH_WARNINGS = 16; - // Operation partially ok, but at least one key failed! - public static final int RESULT_PARTIAL_WITH_ERRORS = 50; + // No keys to import... + public static final int RESULT_FAIL_NOTHING = 32 +1; - // Operation failed, errors thrown and no new keys imported - public static final int RESULT_FAIL_ERROR = 100; - // Operation failed, no keys to import... - public static final int RESULT_FAIL_NOTHING = 101; + public boolean isOkBoth() { + return (mResult & (RESULT_OK_NEWKEYS | RESULT_OK_UPDATED)) + == (RESULT_OK_NEWKEYS | RESULT_OK_UPDATED); + } + public boolean isOkNew() { + return (mResult & RESULT_OK_NEWKEYS) > 0; + } + public boolean isOkUpdated() { + return (mResult & RESULT_OK_UPDATED) > 0; + } + public boolean isFailNothing() { + return (mResult & RESULT_FAIL_NOTHING) > 0; + } public ImportResult(Parcel source) { super(source); @@ -58,4 +69,24 @@ public abstract class OperationResults { } + public static class SaveKeyringResult extends OperationResultParcel { + + public SaveKeyringResult(int result, OperationLog log) { + super(result, log); + } + + // Some old key was updated + public static final int UPDATED = 2; + + // Public key was saved + public static final int SAVED_PUBLIC = 8; + // Secret key was saved (not exclusive with public!) + public static final int SAVED_SECRET = 16; + + public boolean updated() { + return (mResult & UPDATED) == UPDATED; + } + + } + } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index 61d7e7949..3ff4f9887 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -378,55 +378,54 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O final ImportResult result = returnData.getParcelable(KeychainIntentService.RESULT); - String str = ""; - boolean hasWarnings = result.getLog().containsWarnings(); - int duration = 0, color = hasWarnings ? Style.ORANGE : Style.GREEN; - String withWarnings = hasWarnings - ? getResources().getString(R.string.with_warnings) : ""; + int resultType = result.getResult(); - switch(result.getResult()) { - case ImportResult.RESULT_OK_NEWKEYS: - if (!hasWarnings) { - duration = SuperToast.Duration.LONG; - } - str = getResources().getQuantityString( - R.plurals.keys_added, result.mNewKeys, result.mNewKeys, withWarnings); - break; + String str; + int duration, color; - case ImportResult.RESULT_OK_UPDATED: - if (!hasWarnings) { - duration = SuperToast.Duration.LONG; - } - str = getResources().getQuantityString( - R.plurals.keys_updated, result.mNewKeys, result.mNewKeys, withWarnings); - break; + // Not an overall failure + if ((resultType & ImportResult.RESULT_ERROR) == 0) { + String withWarnings; - case ImportResult.RESULT_OK_BOTHKEYS: - if (!hasWarnings) { - duration = SuperToast.Duration.LONG; - } - str = getResources().getQuantityString( - R.plurals.keys_added_and_updated_1, result.mNewKeys, result.mNewKeys); - str += getResources().getQuantityString( - R.plurals.keys_added_and_updated_2, result.mUpdatedKeys, result.mUpdatedKeys, withWarnings); - break; - - case ImportResult.RESULT_PARTIAL_WITH_ERRORS: - str = "partial with errors"; + // Any warnings? + if ((resultType & ImportResult.RESULT_WITH_WARNINGS) > 0) { + duration = 0; color = Style.ORANGE; - break; + withWarnings = getResources().getString(R.string.import_with_warnings); + } else { + duration = SuperToast.Duration.LONG; + color = Style.GREEN; + withWarnings = ""; + } - case ImportResult.RESULT_FAIL_ERROR: - str = "fail error"; + // New and updated keys + if (result.isOkBoth()) { + str = getResources().getQuantityString( + R.plurals.import_keys_added_and_updated_1, result.mNewKeys, result.mNewKeys); + str += getResources().getQuantityString( + R.plurals.import_keys_added_and_updated_2, result.mUpdatedKeys, result.mUpdatedKeys, withWarnings); + } else if (result.isOkNew()) { + str = getResources().getQuantityString( + R.plurals.import_keys_added, result.mNewKeys, result.mNewKeys, withWarnings); + } else if (result.isOkUpdated()) { + str = getResources().getQuantityString( + R.plurals.import_keys_updated, result.mUpdatedKeys, result.mUpdatedKeys, withWarnings); + } else { + duration = 0; color = Style.RED; - break; - - case ImportResult.RESULT_FAIL_NOTHING: - str = getString(R.string.no_keys_added_or_updated); - color = Style.RED; - break; + str = "internal error"; + } + } else { + duration = 0; + color = Style.RED; + if (result.isFailNothing()) { + str = getString(R.string.import_error_nothing); + } else { + str = getString(R.string.import_error); + } } + SuperCardToast toast = new SuperCardToast(ImportKeysActivity.this, SuperToast.Type.BUTTON, Style.getStyle(color, SuperToast.Animations.POPUP)); toast.setText(str); @@ -434,9 +433,9 @@ public class ImportKeysActivity extends ActionBarActivity implements ActionBar.O toast.setIndeterminate(duration == 0); toast.setSwipeToDismiss(true); toast.setButtonIcon(R.drawable.ic_action_view_as_list, - getResources().getString(R.string.view_log)); - toast.setButtonTextColor(R.color.emphasis_dark); - toast.setTextColor(R.color.emphasis_dark); + getResources().getString(R.string.import_view_log)); + toast.setButtonTextColor(getResources().getColor(R.color.black)); + toast.setTextColor(getResources().getColor(R.color.black)); toast.setOnClickWrapper(new OnClickWrapper("supercardtoast", new SuperToast.OnClickListener() { @Override diff --git a/OpenKeychain/src/main/res/values-de/strings.xml b/OpenKeychain/src/main/res/values-de/strings.xml index e2dfa196b..3485846ad 100644 --- a/OpenKeychain/src/main/res/values-de/strings.xml +++ b/OpenKeychain/src/main/res/values-de/strings.xml @@ -206,23 +206,23 @@ Es wurde eine leere Identität hinzugefügt. Wirklich fortfahren? Soll der öffentliche Schlüssel \'%s\' wirklich gelöscht werden?\nDies kann nicht rückgängig gemacht werden! Private Schlüssel auch exportieren - + %d Schlüssel erfolgreich hinzugefügt %d Schlüssel erfolgreich hinzugefügt - + und %d Schlüssel erfolgreich aktualisiert. und %d Schlüssel erfolgreich aktualisiert. - + %d Schlüssel erfolgreich hinzugefügt. %d Schlüssel erfolgreich hinzugefügt. - + %d Schlüssel erfolgreich aktualisiert. %d Schlüssel erfolgreich aktualisiert. - Keine Schlüssel hinzugefügt oder aktualisiert. + Keine Schlüssel hinzugefügt oder aktualisiert. 1 Schlüssel erfolgreich exportiert. %d Schlüssel erfolgreich exportiert. Keine Schlüssel exportiert. diff --git a/OpenKeychain/src/main/res/values-es/strings.xml b/OpenKeychain/src/main/res/values-es/strings.xml index 45d3d565b..f1e4e347d 100644 --- a/OpenKeychain/src/main/res/values-es/strings.xml +++ b/OpenKeychain/src/main/res/values-es/strings.xml @@ -206,23 +206,23 @@ Ha añadido una identidad vacía, ¿está seguro de que quiere continuar? ¿De veras quiere borrar la clave pública \'%s\'?\n¡No puede deshacer esto! ¿Exportar también las claves secretas? - + %d clave añadida satisfactoriamente %d claves añadidas satisfactoriamente - + y actualizada %d clave. y actualizadas %d claves. - + %d clave añadida satisfactoriamente. %d claves añadidas satisfactoriamente. - + %d clave actualizada satisfactoriamente. %d claves actualizadas satisfactoriamente. - No se han añadido o actualizado claves. + No se han añadido o actualizado claves. Se ha exportado 1 clave satisfactoriamente. %d claves exportadas satisfactoriamente. No se han exportado claves. diff --git a/OpenKeychain/src/main/res/values-fr/strings.xml b/OpenKeychain/src/main/res/values-fr/strings.xml index f49127b6f..55a85fb9b 100644 --- a/OpenKeychain/src/main/res/values-fr/strings.xml +++ b/OpenKeychain/src/main/res/values-fr/strings.xml @@ -206,23 +206,23 @@ Vous avez ajouté une identité vide, êtes-vous certain de vouloir continuer ? Voulez-vous vraiment supprimer la clef publique %s ?\nCeci est irréversible ! Exporter aussi les clefs secrètes ? - + %d clef ajoutée avec succès %d clefs ajoutées avec succès - + et %d clef mise à jour. et %d clefs mises à jour. - + %d clef ajoutée avec succès. %d clefs ajoutées avec succès. - + %d clef mise à jour avec succès. %d clefs mises à jour avec succès. - Aucune clef ajoutée ou mise à jour. + Aucune clef ajoutée ou mise à jour. 1 clef exportée avec succès. %d clefs exportées avec succès. Aucune clef exportée. diff --git a/OpenKeychain/src/main/res/values-it/strings.xml b/OpenKeychain/src/main/res/values-it/strings.xml index eae4dd4af..300627fa7 100644 --- a/OpenKeychain/src/main/res/values-it/strings.xml +++ b/OpenKeychain/src/main/res/values-it/strings.xml @@ -206,23 +206,23 @@ Hai aggiunto una identità vuota, sei sicuro di voler continuare? Vuoi veramente eliminare la chiave pubblica \'%s\'?\nNon potrai annullare! Esportare anche le chiavi segrete? - + %d chiave aggiunta correttamente %d chiavi aggiunte correttamente - + e %d chiave aggiornata. e %d chiavi aggiornate. - + %d chiave aggiunta correttamente. %d chiavi aggiunte correttamente. - + %d chiave aggiornata correttamente. %d chiavi aggiornate correttamente. - Nessuna chiave aggiunta o aggiornata. + Nessuna chiave aggiunta o aggiornata. 1 chiave esportata correttamente. %d chiavi esportate correttamente. Nessuna chiave esportata. diff --git a/OpenKeychain/src/main/res/values-ja/strings.xml b/OpenKeychain/src/main/res/values-ja/strings.xml index c40e9dbdc..63fef2af2 100644 --- a/OpenKeychain/src/main/res/values-ja/strings.xml +++ b/OpenKeychain/src/main/res/values-ja/strings.xml @@ -203,19 +203,19 @@ あなたは空のユーザIDを追加しました、このまま続けますか? 公開鍵\'%s\'を本当に削除してもよいですか?\nこれは元に戻せません! 秘密鍵もエクスポートしますか? - + %d の鍵を追加しました - + そして %d の鍵をアップロードしました。 - + %d の鍵を追加しました。 - + %d の鍵をアップロードしました。 - 鍵の追加もしくは更新はありませんでした。 + 鍵の追加もしくは更新はありませんでした。 1つの鍵をエクスポートしました。 %d の鍵をエクスポートしました。 鍵をエクスポートしていません。 diff --git a/OpenKeychain/src/main/res/values-nl/strings.xml b/OpenKeychain/src/main/res/values-nl/strings.xml index d35d83517..f75d7a166 100644 --- a/OpenKeychain/src/main/res/values-nl/strings.xml +++ b/OpenKeychain/src/main/res/values-nl/strings.xml @@ -206,23 +206,23 @@ U heeft een lege identiteit toegevoegd, weet u zeker dat u wilt doorgaan? Wilt u echt de publieke sleutel \'%s\' verwijderen?\nDit kunt u niet ongedaan maken! Ook geheime sleutels exporteren? - + Succesvol %d sleutel toegevoegd Succesvol %d sleutels toegevoegd - + en %d sleutel bijgewerkt. en %d sleutels bijgewerkt. - + Succesvol %d sleutel toegevoegd. Succesvol %d sleutels toegevoegd. - + Succesvol %d sleutel bijgewerkt. Succesvol %d sleutels bijgewerkt. - Geen sleutels toegevoegd of bijgewerkt. + Geen sleutels toegevoegd of bijgewerkt. 1 sleutel succesvol geëxporteerd. Succesvol %d sleutels geëxporteerd. Geen sleutels geëxporteerd. diff --git a/OpenKeychain/src/main/res/values-pl/strings.xml b/OpenKeychain/src/main/res/values-pl/strings.xml index d1b7de393..851e77c3a 100644 --- a/OpenKeychain/src/main/res/values-pl/strings.xml +++ b/OpenKeychain/src/main/res/values-pl/strings.xml @@ -191,27 +191,27 @@ Zostały dokonane zmiany w pęku kluczy, czy chcesz je zachować? Czy na pewno chcesz usunąć klucz publiczny \'%s\'?\nNie można cofnąć tej operacji! Czy wyeksportować również klucze prywatne? - + Pomyślnie dodano %d klucz Pomyślnie dodano %d kluczy Pomyślnie dodano %d kluczy - + i zaktualizowano %d klucz. i zaktualizowano %d kluczy. i zaktualizowano %d kluczy. - + Pomyślnie dodano %d klucz. Pomyślnie dodano %d kluczy. Pomyślnie dodano %d kluczy. - + Pomyślnie zaktualizowano %d klucz. Pomyślnie zaktualizowano %d kluczy. Pomyślnie zaktualizowano %d kluczy. - Nie dodano ani zaktualizowano żadnych kluczy. + Nie dodano ani zaktualizowano żadnych kluczy. Pomyślnie wyeksportowano 1 klucz. Pomyślnie wyeksportowano %d kluczy. Nie wyeksportowano żadnych kluczy. diff --git a/OpenKeychain/src/main/res/values-ru/strings.xml b/OpenKeychain/src/main/res/values-ru/strings.xml index 0becea0bc..b108324d1 100644 --- a/OpenKeychain/src/main/res/values-ru/strings.xml +++ b/OpenKeychain/src/main/res/values-ru/strings.xml @@ -206,27 +206,27 @@ Вы добавили пустой идентификатор. Вы уверены, что хотите продолжить? Вы правда хотите удалить публичный ключ \'%s\'?\nЭто действие нельзя отменить! Экспортировать секретные ключи? - + Успешно добавлено %d ключ Успешно добавлено %d ключей Успешно добавлено %d ключей - + и обновлен %d ключ. и обновлено %d ключей. и обновлено %d ключей. - + Добавлен %d ключ Добавлено %d ключей Добавлено %d ключей - + Обновлен %d ключ. Обновлено %d ключей. Обновлено %d ключей. - Нет обновленных или добавленных ключей + Нет обновленных или добавленных ключей Успешный экспорт 1 ключа. Экспортировано %d ключей. Ключи не были экспортированы. diff --git a/OpenKeychain/src/main/res/values-sl/strings.xml b/OpenKeychain/src/main/res/values-sl/strings.xml index 8b12cdebe..0fe44725b 100644 --- a/OpenKeychain/src/main/res/values-sl/strings.xml +++ b/OpenKeychain/src/main/res/values-sl/strings.xml @@ -212,31 +212,31 @@ Dodali ste prazno identiteto, ali res želite nadaljevati? Ali res želite izbrisati javni ključ \'%s\'?\nTega koraka ne boste mogli preklicati! Želite izvoziti tudi zasebne ključe? - + Uspešno dodan %d ključ Uspešno dodana %d ključa Uspešno dodani %d ključi Uspešno dodanih %d ključev - + in posodbljen %d. in posodobljena %d. in posodobljeni %d. in posodobljenih %d. - + Uspešno dodan %d ključ. Uspešno dodana %d ključa. Uspešno dodani %d ključi. Uspešno dodanih %d ključev. - + Uspešno posodobljen %d ključ. Uspešno posodobljena %d ključa. Uspešno posodobljeni %d ključi. Uspešno posodobljenih %d ključev. - Noben ključ ni bil dodan ali posodobljen. + Noben ključ ni bil dodan ali posodobljen. Uspešno izvožen 1 ključ. Uspešno izvoženih ključev: %d Noben ključ ni bil izvožen. diff --git a/OpenKeychain/src/main/res/values-uk/strings.xml b/OpenKeychain/src/main/res/values-uk/strings.xml index b27b6ffd3..2951d13f8 100644 --- a/OpenKeychain/src/main/res/values-uk/strings.xml +++ b/OpenKeychain/src/main/res/values-uk/strings.xml @@ -209,27 +209,27 @@ Ви вже додали порожню сутність. Ви справді хочете продовжити? Ви справді хочете вилучити відкритий ключ \'%s\'?\nВи не зможете це відмінити! Також експортувати секретні ключі? - + Успішно додано %d ключ Успішно додано %d ключі Успішно додано %d ключів - + і оновлено %d ключ. і оновлено %d ключі. і оновлено %d ключів. - + Успішно додано %d ключ. Успішно додано %d ключі. Успішно додано %d ключів. - + Успішно оновлено %d ключ. Успішно оновлено %d ключі. Успішно оновлено %d ключів. - Жодного ключа не додано та не оновлено. + Жодного ключа не додано та не оновлено. Успішно експортовано 1 ключ. Успішно експортовано %d ключів. Жодного ключа не експортовано. diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index b60e281ee..8ef93551b 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -221,25 +221,6 @@ Do you really want to delete the public key \'%s\'?\nYou can\'t undo this! Also export secret keys? - - Successfully added %1$d key - Successfully added %1$d keys - - - and updated %1$d key%2$s. - and updated %1$d keys%2$s. - - - Successfully added %1$d key%2$s. - Successfully added %1$d keys%2$s. - - - Successfully updated %1$d key%2$s. - Successfully updated %1$d keys%2$s. - - - No keys added or updated. - , with warnings Successfully exported 1 key. Successfully exported %d keys. No keys exported. @@ -408,6 +389,28 @@ Get key from clipboard Get key from Keybase.io + + + Successfully added %1$d key + Successfully added %1$d keys + + + and updated %1$d key%2$s. + and updated %1$d keys%2$s. + + + Successfully added %1$d key%2$s. + Successfully added %1$d keys%2$s. + + + Successfully updated %1$d key%2$s. + Successfully updated %1$d keys%2$s. + + View Log + Nothing to import. + Error importing keys! + , with warnings + Decrypt File with OpenKeychain Import Key with OpenKeychain @@ -579,6 +582,5 @@ cannot sign Encoding error No encryption subkey available! - View Log