From a9970ee87549df745603b8605df0f716cc48f53b Mon Sep 17 00:00:00 2001 From: Vavassor Date: Thu, 6 Apr 2017 03:09:49 -0400 Subject: [PATCH] Simplify the error messages and remove unused strings. --- .../keylesspalace/tusky/AccountActivity.java | 32 +++--------- .../keylesspalace/tusky/ComposeActivity.java | 2 +- .../keylesspalace/tusky/ReportActivity.java | 2 +- .../tusky/ViewThreadFragment.java | 2 +- app/src/main/res/values-de/strings.xml | 45 ++++++---------- app/src/main/res/values-fr/strings.xml | 52 +++++++------------ app/src/main/res/values/strings.xml | 52 +++++++------------ 7 files changed, 66 insertions(+), 121 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java index a86df1c26..9939863be 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java @@ -246,7 +246,7 @@ public class AccountActivity extends BaseActivity { } private void onObtainAccountFailure() { - Snackbar.make(tabLayout, R.string.error_obtain_account, Snackbar.LENGTH_LONG) + Snackbar.make(tabLayout, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, new View.OnClickListener() { @Override public void onClick(View v) { @@ -377,19 +377,14 @@ public class AccountActivity extends BaseActivity { } private void onFollowFailure(final String id) { - int messageId; - if (following) { - messageId = R.string.error_unfollowing; - } else { - messageId = R.string.error_following; - } View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { follow(id); } }; - Snackbar.make(findViewById(R.id.activity_account), messageId, Snackbar.LENGTH_LONG) + View anyView = findViewById(R.id.activity_account); + Snackbar.make(anyView, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, listener) .show(); } @@ -419,19 +414,14 @@ public class AccountActivity extends BaseActivity { } private void onBlockFailure(final String id) { - int messageId; - if (blocking) { - messageId = R.string.error_unblocking; - } else { - messageId = R.string.error_blocking; - } View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { block(id); } }; - Snackbar.make(findViewById(R.id.activity_account), messageId, Snackbar.LENGTH_LONG) + View anyView = findViewById(R.id.activity_account); + Snackbar.make(anyView, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, listener) .show(); } @@ -463,22 +453,14 @@ public class AccountActivity extends BaseActivity { } private void onMuteFailure(final String id) { - int messageId; - - if (muting) { - messageId = R.string.error_unmuting; - } else { - messageId = R.string.error_muting; - } - View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { mute(id); } }; - - Snackbar.make(findViewById(R.id.activity_account), messageId, Snackbar.LENGTH_LONG) + View anyView = findViewById(R.id.activity_account); + Snackbar.make(anyView, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, listener) .show(); } diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index afb600626..852d4a6fc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -790,7 +790,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFrag } private void onSendFailure() { - textEditor.setError(getString(R.string.error_sending_status)); + textEditor.setError(getString(R.string.error_generic)); statusAlreadyInFlight = false; } diff --git a/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java b/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java index 57b7cb8c0..7ab606eb5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ReportActivity.java @@ -139,7 +139,7 @@ public class ReportActivity extends BaseActivity { private void onSendFailure(final String accountId, final String[] statusIds, final String comment) { - Snackbar.make(anyView, R.string.error_report_unsent, Snackbar.LENGTH_LONG) + Snackbar.make(anyView, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewThreadFragment.java b/app/src/main/java/com/keylesspalace/tusky/ViewThreadFragment.java index c0498b83e..d5212861b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewThreadFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewThreadFragment.java @@ -129,7 +129,7 @@ public class ViewThreadFragment extends SFragment implements StatusActionListene private void onThreadRequestFailure(final String id) { View view = getView(); if (view != null) { - Snackbar.make(view, R.string.error_view_thread, Snackbar.LENGTH_LONG) + Snackbar.make(view, R.string.error_generic, Snackbar.LENGTH_LONG) .setAction(R.string.action_retry, new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b6344ab26..af4e0649d 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1,21 +1,14 @@ + Ungültige Domain angegeben + Diese App konnte sich auf dem Server nicht authentifizieren. Ein undefinierbarer Autorisierungsfehler ist aufgetreten. - Benachrichtigungen konnten nicht empfangen werden. Der Status ist zu lang! - Der Status konnte nicht gesendet werden. Die Datei muss kleiner als 4MB sein. Dieser Dateityp darf nicht hochgeladen werden. Die Datei konnte nicht geöffnet werden. Eine Leseberechtigung wird für das Hochladen der Mediendatei benötigt. Bilder und Videos können beide nicht an den Status angehängt werden. Die Mediendatei konnte nicht hochgeladen werden. - Dem Benutzer wurde nicht gefolgt. - Dieser Benutzer wurde nicht entfolgt. - Dieser Benutzer wurde nicht blockiert. - Dieser Benutzer wurde nicht entblockt. - Konnte diese Unterhaltung nicht empfangen. - Fehler beim Laden des Accounts. - Dieser Bericht konnte nicht gesendet werden. Mindestens ein Status muss berichtet werden. Start @@ -35,9 +28,6 @@ Zeige mehr Zeige weniger - Konnte den Rest der Status nicht laden. - Konnte den Rest der Benachrichtigungen nicht laden. - Konnte den Rest der Accounts nicht laden. Ende der Status Ende der Benachrichtigungen Ende der Accounts @@ -72,7 +62,17 @@ Favoriten Blockierte Nutzer Im Browser öffnen - Setzen + Senden + Füge Medien hinzu + Teilen + Stummschalten + Lautschalten + Erwähnen + NSFW + + Teile Toot-URL zu… + + Suche Accounts… Toot! Gesendet! @@ -97,30 +97,17 @@ Nur für Follower und Erwähnte sichtbar Benachrichtigungen + Push-Benachrichtigungen Benachrichtige mit Sound Benachrichtige mit Vibration Benachrichtige mit Licht Aussehen Benutze helles Theme - Senden - Füge Medien hinzu - Privatsphären-Optionen - Willkommen zurück! - Teilen - Teile Toot-URL zu… - Stummschalten - Lautschalten - Dieser Benutzer wurde nicht lautgeschaltet. - Dieser Benutzer wurde nicht stummgeschaltet. - Suche Accounts… - NSFW - Erwähnen + %s hat dich erwähnt - Ungültige Domain angegeben - Diese App konnte sich auf dem Server nicht authentifizieren. %1$s, %2$s, %3$s und %4$d andere %1$s, %2$s, und %3$s %1$s und %2$s %d neue Interaktionen - Push-Benachrichtigungen + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 15f499c4e..157017e7b 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1,25 +1,19 @@ + Une erreur s\'est produite. + Le domaine est invalide + L\'application n\'a pu s\'authentifier avec l\'instance. Impossible de trouver un navigateur web. - Une erreur d'authorisation inconnu s'est produite. + Une erreur d\'authorisation inconnu s\'est produite. Vous ne pouvez pas vous authentifier. Impossible de récupérer le jeton d\'authentification. - Impossible d\'actualiser les notifications. Votre pouet est trop long! - Impossible d\'envoyer le pouet. Le fichier doit faire moins de 4Mo. Ce type de fichier n\'est pas accepté. Le fichier ne peut être ouvert. Permission to read media is required to upload it. Impossible de mettre une vidéo et une image sur le même pouet. Ce média ne peut être uploadé. - Vous n\'avez pas suivit cet utilisateur. - Vous suivez toujours cet utilisateur. - Vous n\'avez pas bloqué cet utilisateur. - Cet utilisateur est toujours bloqué. - Impossible de voir ce pouet. - Impossible de voir ce compte. - Le signalement n\'a pas été envoyé. Au moins un pouet a été reporté. Accueil @@ -41,9 +35,6 @@ Voir plus Voir moins - Impossible de charger le reste de ce pouet. - Impossible d\'afficher plus de notification. - Impossible de charger plus de comptes. fin du pouet fin des notifications fin des comptes @@ -78,7 +69,17 @@ Favoris Utilisateurs bloqués Ouvrir avec votre navigateur - Définir + Envoyer + Ajouter un média + Partager + Rendre muet + Redonner la parole + Mention + NSFW + + Partager l\'URL de votre pouet avec… + + Rechercher un compte… Toot! Envoyer! @@ -87,9 +88,9 @@ Quoi de neuf ? Contenu mis en garde - Qu'est ce qu\'une instance? + Qu\'est ce qu\'une instance? - L'adresse ou le domaine d'une instance peut être entré + L\'adresse ou le domaine d\'une instance peut être entré Ici, comme mastodon.social, icosahedron.website, social.tchncs.de, et plus (en anglais)! \n\nSi vous n\'avez pas de compte, Vous pouvez entrer le nom de l\'instance que vous voulez rejoindre et créer un compte ici.\n\n Une instance est l\'endroit où votre compte est @@ -104,6 +105,7 @@ Uniquement les followers et les mentionnés peuvent voir Notifications + Notifications push Alertes Sonner pour notifier Vibrer pour notifier @@ -115,25 +117,11 @@ mes pouets mis en favoris Apparence Utiliser le thème clair - Envoyer - Ajouter un média - Vie privée - Content de vous revoir! - Partager - Partager l\'URL de votre pouet avec… - Rendre muet - Redonner la parole - L\'utilisateur est toujours muet. - L\'utilisateur n\'est pas devenu muet. - Rechercher un compte… - NSFW - Mention + %s vous ont mentionnés - Le domaine est invalide - L\'application n'a pu s'authentifier avec l\'instance. %1$s, %2$s, %3$s et %4$d plus %1$s, %2$s, et %3$s %1$s et %2$s %d nouvelles interactions - Notifications push + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a23d4a311..24fd9ca9b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,25 +1,19 @@ + An error occurred. + Invalid domain entered + Failed authenticating with that instance. Couldn\'t find a web browser to use. An unidentified authorization error occurred. Authorization was denied. Failed getting a login token. - Notifications could not be fetched. The status is too long! - The status failed to be sent. The file must be less than 4MB. - That type of file is not able to be uploaded. + That type of file cannot be uploaded. That file could not be opened. - Permission to read media is required to upload it. + Permission to read media is required. Images and videos cannot both be attached to the same status. - The media could not be uploaded. - That user wasn\'t followed. - That user wasn\'t unfollowed. - That user wasn\'t blocked. - That user wasn\'t unblocked. - Couldn\'t fetch that thread. - Failed to obtain that account. - The report could not be sent. + The upload failed. At least one status must be reported. Home @@ -41,9 +35,6 @@ Show More Show Less - Could not load the rest of the statuses. - Could not load the rest of the statuses. - Could not load the rest of the accounts. end of the statuses end of the notifications end of the accounts @@ -78,7 +69,17 @@ Favourites Blocked users Open in browser - Set + Submit + Add media + Share + Mute + Unmute + Mention + NSFW + + Share toot URL to… + + Search accounts… Toot! Sent! @@ -106,6 +107,7 @@ Only followers and mentions can see Notifications + Push notifications Alerts Notify with a sound Notify with vibration @@ -117,25 +119,11 @@ my posts are favourited Appearance Use the Light Theme - Submit - Add media - Privacy options - Welcome back! - Share - Share toot URL to… - Mute - Unmute - That user wasn\'t unmuted. - That user wasn\'t muted. - Search accounts… - NSFW - Mention + %s mentioned you - Invalid domain entered - This app could not obtain authentication from that server instance. %1$s, %2$s, %3$s and %4$d others %1$s, %2$s, and %3$s %1$s and %2$s %d new interactions - Push notifications +