mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
Keyserver exception translateable
This commit is contained in:
parent
b052d5e89c
commit
80f9c769c0
@ -265,7 +265,7 @@ public class HkpKeyserver extends Keyserver {
|
||||
throw new QueryFailedException("Keyserver '" + mHost + "' not found. Error 404");
|
||||
} else {
|
||||
// NOTE: some keyserver do not provide a more detailed error response
|
||||
throw new QueryFailedException("Either no keys or too many have been found. Please improve your query!");
|
||||
throw new QueryTooShortOrTooManyResponsesException();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,13 @@ public abstract class Keyserver {
|
||||
private static final long serialVersionUID = 2703768928624654514L;
|
||||
}
|
||||
|
||||
/**
|
||||
* query too short _or_ too many responses
|
||||
*/
|
||||
public static class QueryTooShortOrTooManyResponsesException extends QueryNeedsRepairException {
|
||||
private static final long serialVersionUID = 2703768928624654514L;
|
||||
}
|
||||
|
||||
public static class AddKeyException extends Exception {
|
||||
private static final long serialVersionUID = -507574859137295530L;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public abstract class OperationResults {
|
||||
if (this.isOkBoth()) {
|
||||
str = activity.getResources().getQuantityString(
|
||||
R.plurals.import_keys_added_and_updated_1, mNewKeys, mNewKeys);
|
||||
str += activity.getResources().getQuantityString(
|
||||
str += " "+ activity.getResources().getQuantityString(
|
||||
R.plurals.import_keys_added_and_updated_2, mUpdatedKeys, mUpdatedKeys, withWarnings);
|
||||
} else if (isOkUpdated()) {
|
||||
str = activity.getResources().getQuantityString(
|
||||
|
@ -307,9 +307,11 @@ public class ImportKeysListFragment extends ListFragment implements
|
||||
if (error == null) {
|
||||
// No error
|
||||
} else if (error instanceof Keyserver.QueryTooShortException) {
|
||||
Notify.showNotify(getActivity(), R.string.error_keyserver_insufficient_query, Notify.Style.ERROR);
|
||||
Notify.showNotify(getActivity(), R.string.error_query_too_short, Notify.Style.ERROR);
|
||||
} else if (error instanceof Keyserver.TooManyResponsesException) {
|
||||
Notify.showNotify(getActivity(), R.string.error_keyserver_too_many_responses, Notify.Style.ERROR);
|
||||
Notify.showNotify(getActivity(), R.string.error_too_many_responses, Notify.Style.ERROR);
|
||||
} else if (error instanceof Keyserver.QueryTooShortOrTooManyResponsesException) {
|
||||
Notify.showNotify(getActivity(), R.string.error_too_short_or_too_many_responses, Notify.Style.ERROR);
|
||||
} else if (error instanceof Keyserver.QueryFailedException) {
|
||||
Log.d(Constants.TAG,
|
||||
"Unrecoverable keyserver query error: " + error.getLocalizedMessage());
|
||||
|
@ -247,8 +247,8 @@
|
||||
<string name="error_only_files_are_supported">Binäre Daten ohne ohne Datei im Dateisystem werden nicht unterstützt.</string>
|
||||
<string name="error_jelly_bean_needed">Android 4.1 wird benötigt um Androids NFC Beam nutzen zu können!</string>
|
||||
<string name="error_nfc_needed">NFC steht auf diesem Gerät nicht zur Verfügung!</string>
|
||||
<string name="error_keyserver_insufficient_query">zu kurze Schlüsselanfrage</string>
|
||||
<string name="error_keyserver_too_many_responses">Die Schlüsselanfrage liefert zu viele Ergebnisse. Bitte verfeinern sie sie Anfrage.</string>
|
||||
<string name="error_query_too_short">zu kurze Schlüsselanfrage</string>
|
||||
<string name="error_too_many_responses">Die Schlüsselanfrage liefert zu viele Ergebnisse. Bitte verfeinern sie sie Anfrage.</string>
|
||||
<string name="error_generic_report_bug">Ein allgemeiner Fehler trat auf, bitte schreiben Sie einen neuen Bugreport für OpenKeychain.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
<item quantity="one">Ein Teil der geladenen Datei ist ein gültiges OpenPGP Objekt aber kein OpenPGP Schlüssel</item>
|
||||
|
@ -250,9 +250,9 @@
|
||||
<string name="error_jelly_bean_needed">¡Necesita Android 4.1 para usar la característica NFC Beam (haz NFC) de Android!</string>
|
||||
<string name="error_nfc_needed">¡NFC no está disponible en tu dispositivo!</string>
|
||||
<string name="error_nothing_import">¡No se encontraron claves!</string>
|
||||
<string name="error_keyserver_insufficient_query">Petición de búsqueda de clave demasiado corta</string>
|
||||
<string name="error_query_too_short">Petición de búsqueda de clave demasiado corta</string>
|
||||
<string name="error_searching_keys">Error irrecuperable buscando claves en el servidor</string>
|
||||
<string name="error_keyserver_too_many_responses">La petición de búsqueda de clave devolvió demasiados candidatos; por favor refine su petición</string>
|
||||
<string name="error_too_many_responses">La petición de búsqueda de clave devolvió demasiados candidatos; por favor refine su petición</string>
|
||||
<string name="error_import_no_valid_keys">El Fichero/Portapapeles está vacío</string>
|
||||
<string name="error_generic_report_bug">Ha ocurrido un error genérico, por favor, informa de este bug a OpenKeychain</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
|
@ -250,9 +250,9 @@
|
||||
<string name="error_jelly_bean_needed">Il vous faut Android 4.1 pour utiliser la fonction Beam NFC d\'Android !</string>
|
||||
<string name="error_nfc_needed">La NFC n\'est pas disponible sur votre appareil !</string>
|
||||
<string name="error_nothing_import">Aucune clef trouvée !</string>
|
||||
<string name="error_keyserver_insufficient_query">La requête de recherche de clef est trop courte</string>
|
||||
<string name="error_query_too_short">La requête de recherche de clef est trop courte</string>
|
||||
<string name="error_searching_keys">Erreur irrécupérable lors de la recherche de clef sur le serveur</string>
|
||||
<string name="error_keyserver_too_many_responses">La requête de recherche de clef a retourné trop de candidats. Veuillez raffiner la requête</string>
|
||||
<string name="error_too_many_responses">La requête de recherche de clef a retourné trop de candidats. Veuillez raffiner la requête</string>
|
||||
<string name="error_import_no_valid_keys">Le fichier/le presse-papiers est vide</string>
|
||||
<string name="error_generic_report_bug">Une erreur générique est survenue, veuillez créer un nouveau rapport de bogue pour OpenKeychain.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
|
@ -250,9 +250,9 @@
|
||||
<string name="error_jelly_bean_needed">Devi avere Android 4.1 per usare Android NFC Beam!</string>
|
||||
<string name="error_nfc_needed">NFC non disponibile nel tuo dispositivo!</string>
|
||||
<string name="error_nothing_import">Nessuna chiave trovata!</string>
|
||||
<string name="error_keyserver_insufficient_query">Chiave della query di ricerca troppo corta</string>
|
||||
<string name="error_query_too_short">Chiave della query di ricerca troppo corta</string>
|
||||
<string name="error_searching_keys">Errore irreversibile nella ricerca di chiavi sul server</string>
|
||||
<string name="error_keyserver_too_many_responses">Chiave della query di ricerca ha generato troppi candidati; Si prega di perfezionare la ricerca</string>
|
||||
<string name="error_too_many_responses">Chiave della query di ricerca ha generato troppi candidati; Si prega di perfezionare la ricerca</string>
|
||||
<string name="error_import_no_valid_keys">File/Appunti vuoti</string>
|
||||
<string name="error_generic_report_bug">Si è verificato un errore generico, si prega di creare una nuova segnalazione di errore per OpenKeychain.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
|
@ -246,9 +246,9 @@
|
||||
<string name="error_jelly_bean_needed">Android NFC Beam機能を使うにはAndroid 4.1 が必要です!</string>
|
||||
<string name="error_nfc_needed">あなたのデバイスにはNFCが存在しません!</string>
|
||||
<string name="error_nothing_import">鍵が見当りません!</string>
|
||||
<string name="error_keyserver_insufficient_query">鍵検索のクエリが短かすぎます</string>
|
||||
<string name="error_query_too_short">鍵検索のクエリが短かすぎます</string>
|
||||
<string name="error_searching_keys">サーバでの鍵の検索が回復不可能なエラーになりました</string>
|
||||
<string name="error_keyserver_too_many_responses">鍵検索のクエリが沢山の候補を返しました; クエリを精密化してください</string>
|
||||
<string name="error_too_many_responses">鍵検索のクエリが沢山の候補を返しました; クエリを精密化してください</string>
|
||||
<string name="error_import_no_valid_keys">ファイル/クリップボードが空です</string>
|
||||
<string name="error_generic_report_bug">一般エラーが発生しました、この新しいバグの情報をOpenKeychainプロジェクトに送ってください</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
|
@ -254,9 +254,9 @@
|
||||
<string name="error_jelly_bean_needed">Для использования NFC Beam требуется Android 4.1+ !</string>
|
||||
<string name="error_nfc_needed">Ваше устройство не поддерживает NFC!</string>
|
||||
<string name="error_nothing_import">Ключи не найдены!</string>
|
||||
<string name="error_keyserver_insufficient_query">Запрос слишком короткий</string>
|
||||
<string name="error_query_too_short">Запрос слишком короткий</string>
|
||||
<string name="error_searching_keys">Ошибка поиска ключей на сервере</string>
|
||||
<string name="error_keyserver_too_many_responses">Поиск ключа вернул слишком много вариантов; Пожалуйста, уточните запрос</string>
|
||||
<string name="error_too_many_responses">Поиск ключа вернул слишком много вариантов; Пожалуйста, уточните запрос</string>
|
||||
<string name="error_import_no_valid_keys">Файл/Буфер пуст</string>
|
||||
<string name="error_generic_report_bug">Выявлена ошибка. Пожалуйста, сообщите о ней разработчику.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
|
@ -254,9 +254,9 @@
|
||||
<string name="error_only_files_are_supported">Neposredni binarni podatki brez dejanske datoteke v datotečnem sistemu niso podprti.</string>
|
||||
<string name="error_jelly_bean_needed">Za uporabo storitve NFC Beam potrebujete najmanj Android 4.1!</string>
|
||||
<string name="error_nfc_needed">NFC ni na voljo na vaši napravi!</string>
|
||||
<string name="error_keyserver_insufficient_query">Iskalni pojem je prekratek</string>
|
||||
<string name="error_query_too_short">Iskalni pojem je prekratek</string>
|
||||
<string name="error_searching_keys">Nepremostljiva napaka pri iskanju ključev na strežniku</string>
|
||||
<string name="error_keyserver_too_many_responses">Iskanje ključev je vrnilo preveč zadetkov; prosimo redefinirajte iskalni pojem</string>
|
||||
<string name="error_too_many_responses">Iskanje ključev je vrnilo preveč zadetkov; prosimo redefinirajte iskalni pojem</string>
|
||||
<string name="error_generic_report_bug">Pripetila se je splošna napaka, prosimo ustvarite poročilo o \'hrošču\'.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
<item quantity="one">Del naložene datoteke je veljavnen objekt OpenPGP a ni ključ.</item>
|
||||
|
@ -252,9 +252,9 @@
|
||||
<string name="error_jelly_bean_needed">Вам потрібний Android 4.1 для використання функції Androids NFC промінь!</string>
|
||||
<string name="error_nfc_needed">NFC недоступний на вашому пристрої!</string>
|
||||
<string name="error_nothing_import">Ключ не знайдено!</string>
|
||||
<string name="error_keyserver_insufficient_query">Запит пошуку ключа надто короткий</string>
|
||||
<string name="error_query_too_short">Запит пошуку ключа надто короткий</string>
|
||||
<string name="error_searching_keys">Невиправна помилка пошуку ключів в сервері</string>
|
||||
<string name="error_keyserver_too_many_responses">Запит пошуку ключа видав надто багато варіантів. Уточніть пошуковий запит</string>
|
||||
<string name="error_too_many_responses">Запит пошуку ключа видав надто багато варіантів. Уточніть пошуковий запит</string>
|
||||
<string name="error_generic_report_bug">Трапилася загальна помилка, будь ласка, створіть новий звіт про помилку для OpenKeychain.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
<item quantity="one">частина завантаженого файлу є вірним об\'єктом OpenPGP, але не ключем OpenPGP</item>
|
||||
|
@ -270,9 +270,11 @@
|
||||
<string name="error_jelly_bean_needed">You need Android 4.1 to use Android\'s NFC Beam feature!</string>
|
||||
<string name="error_nfc_needed">NFC is not available on your device!</string>
|
||||
<string name="error_nothing_import">No keys found!</string>
|
||||
<string name="error_keyserver_insufficient_query">Key search query too short</string>
|
||||
<string name="error_searching_keys">An error occurred when searching for keys</string>
|
||||
<string name="error_keyserver_too_many_responses">Key search query returned too many candidates; Please refine query</string>
|
||||
<string name="error_query_too_short">Search query too short. Please refine your query!</string>
|
||||
<string name="error_searching_keys">An error occurred when searching for keys.</string>
|
||||
<string name="error_too_many_responses">Key search query returned too many candidates. Please refine your query!</string>
|
||||
<string name="error_too_short_or_too_many_responses">Either no keys or too many have been found. Please improve your query!</string>
|
||||
|
||||
<string name="error_import_no_valid_keys">No valid keys found in File/Clipboard!</string>
|
||||
<string name="error_generic_report_bug">A generic error occurred, please create a new bug report for OpenKeychain.</string>
|
||||
<plurals name="error_import_non_pgp_part">
|
||||
@ -392,8 +394,8 @@
|
||||
<item quantity="other">Successfully imported %1$d keys</item>
|
||||
</plurals>
|
||||
<plurals name="import_keys_added_and_updated_2">
|
||||
<item quantity="one"> and updated key%2$s.</item>
|
||||
<item quantity="other"> and updated %1$d keys%2$s.</item>
|
||||
<item quantity="one">and updated key%2$s.</item>
|
||||
<item quantity="other">and updated %1$d keys%2$s.</item>
|
||||
</plurals>
|
||||
<plurals name="import_keys_added">
|
||||
<item quantity="one">Successfully imported key%2$s.</item>
|
||||
|
Loading…
Reference in New Issue
Block a user