From 5cb3ae2747bd051ba172edccc094a82a3d658782 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 18 Nov 2019 14:28:11 -0600 Subject: [PATCH] Display caldav exceptions --- .../tasks/caldav/CaldavAccountSettingsActivity.java | 6 +++--- .../tasks/caldav/CaldavCalendarSettingsActivity.java | 10 +++------- app/src/main/res/values-bg-rBG/strings.xml | 1 - app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-eu/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-hu/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-iw/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-ko/strings.xml | 1 - app/src/main/res/values-lt/strings.xml | 1 - app/src/main/res/values-nb/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values-sk/strings.xml | 1 - app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values-tl/strings.xml | 1 - app/src/main/res/values-tr/strings.xml | 1 - app/src/main/res/values-uk/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values/strings.xml | 2 +- 25 files changed, 7 insertions(+), 33 deletions(-) diff --git a/app/src/main/java/org/tasks/caldav/CaldavAccountSettingsActivity.java b/app/src/main/java/org/tasks/caldav/CaldavAccountSettingsActivity.java index f5436a8be..f2a92d0ba 100644 --- a/app/src/main/java/org/tasks/caldav/CaldavAccountSettingsActivity.java +++ b/app/src/main/java/org/tasks/caldav/CaldavAccountSettingsActivity.java @@ -352,12 +352,12 @@ public class CaldavAccountSettingsActivity extends ThemedInjectingAppCompatActiv showSnackbar(R.string.network_error); } else { Timber.e(t); - showSnackbar(R.string.error_adding_account); + showSnackbar(R.string.error_adding_account, t.getMessage()); } } - private void showSnackbar(int resId) { - showSnackbar(getString(resId)); + private void showSnackbar(int resId, Object... formatArgs) { + showSnackbar(getString(resId, formatArgs)); } private void showSnackbar(String message) { diff --git a/app/src/main/java/org/tasks/caldav/CaldavCalendarSettingsActivity.java b/app/src/main/java/org/tasks/caldav/CaldavCalendarSettingsActivity.java index 4988adba4..86fafc563 100644 --- a/app/src/main/java/org/tasks/caldav/CaldavCalendarSettingsActivity.java +++ b/app/src/main/java/org/tasks/caldav/CaldavCalendarSettingsActivity.java @@ -171,16 +171,12 @@ public class CaldavCalendarSettingsActivity extends BaseListSettingsActivity { } else if (t instanceof ConnectException) { showSnackbar(R.string.network_error); } else { - showGenericError(); + showSnackbar(R.string.error_adding_account, t.getMessage()); } } - private void showGenericError() { - showSnackbar(R.string.error_adding_account); - } - - private void showSnackbar(int resId) { - showSnackbar(getString(resId)); + private void showSnackbar(int resId, Object... formatArgs) { + showSnackbar(getString(resId, formatArgs)); } private void showSnackbar(String message) { diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml index 0f90d7991..d43ad6ac6 100644 --- a/app/src/main/res/values-bg-rBG/strings.xml +++ b/app/src/main/res/values-bg-rBG/strings.xml @@ -433,7 +433,6 @@ Добави акаунт Потребител Парола - Грешка при добавяне на акаунт Настройки на календара Управление на уведомления Управление на оптимизациите на батерията diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index fe7509c1d..aecd52653 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -420,7 +420,6 @@ Account hinzufügen Benutzer Passwort - Fehler beim Hinzufügen des Accounts Kalendereinstellungen Benachrichtigungen verwalten Energiesparmodus verwalten diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e96713d1a..682b7b98a 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -426,7 +426,6 @@ Añadir cuenta Usuario Contraseña - Error añadiendo cuenta Configuración de calendario Gestionar notificaciones Optimizaciones en gestión de batería diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 4a9db0e93..92b3ae330 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -439,7 +439,6 @@ Erabiltzailea Pasahitza URL-a - Errorea kontua gehitzean Egutegiaren ezarpenak Kudeatu jakinarazpenak Kudeatu bateriaren optimizazioak diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 6d97c071d..30497f7ac 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -411,7 +411,6 @@ Utilisateur Mot de passe Adresse URL - Erreur dans l\'ajout du compte Paramètres du calendrier Gérer les notifications Gérer les optimisations de la batterie diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 96414662a..9fc9ddf18 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -432,7 +432,6 @@ Felhasználónév Jelszó Link - Felhasználói fiók hozzáadása sikertelen Naptár beállítások Értesítések kezelése Akkumulátor optimalizálások kezelése diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index db4f0e756..f996cf21a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -428,7 +428,6 @@ Usa data e ora locali Aggiungi account Utente - Aggiunta account fallita Impostazioni calendario Gestione notifiche diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index ad52c8150..a93e3a10a 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -469,7 +469,6 @@ משתמש סיסמא כתובת URL - שגיאה בהוספת חשבון הגדרות יומן נהל התראות נהל חיסכון בסוללה diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index de30948a1..6c82ac038 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -430,7 +430,6 @@ アカウントを追加 ユーザー パスワード - アカウントの追加時にエラーが発生しました カレンダー設定 通知を管理 バッテリー最適化を管理 diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index ffa3b1d11..a74a36e0d 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -433,7 +433,6 @@ 계정 추가 사용자 비밀번호 - 계정 추가 오류 달력 설정 알림 관리 배터리 최적화 관리 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index cc401ea07..4f80ecbf9 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -428,7 +428,6 @@ Pridėti paskyrą Vartotojas Slaptažodis - Klaida kuriant paskyrą Kalendoriaus nustatymai Valdyti pranešimus Valdyti baterijos optimizacijas diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 7cd592537..f134b8831 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -460,7 +460,6 @@ Bruker Passord Nettadresse - Kunne ikke legge til konto Kalenderinnstillinger Merker Liste diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 2acfe1cd3..e66bd0cc4 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -420,7 +420,6 @@ Account toevoegen Gebruiker Wachtwoord - Fout bij account toevoegen Kalender instellingen Beheer notificaties Beheer batterij optimalisatie diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index f30773bd1..95f0ba034 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -429,7 +429,6 @@ Dodaj konto Użytkownik Hasło - Błąd przy dodawaniu konta Ustawienia kalendarza Zarządzaj powiadamieniami Zarządzaj zużyciem energii diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 4a64281ac..446a5fb8f 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -430,7 +430,6 @@ Adicionar conta Usuário Senha - Erro ao adicionar conta Configurações do calendário Gerenciar notificações Gerenciar otimizações da bateria diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index efb3680e2..0238491a1 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -431,7 +431,6 @@ Добавить учётную запись Пользователь Пароль - Ошибка при добавлении учётной записи Настройки календаря Управление уведомлениями Управление расходом батареи diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index b823181ec..65caa7698 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -429,7 +429,6 @@ Pridať účet Užívateľ Heslo - Chyba pridania účtu Nastavenia kalendára Spravovať upozornenia Zníženie spotreby energie diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 10dc9895b..17c09ad86 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -433,7 +433,6 @@ Användare Lösenord URL - Fel vid kontoskapande Kalenderinställningar Hantera notiser Hantera batterioptimering diff --git a/app/src/main/res/values-tl/strings.xml b/app/src/main/res/values-tl/strings.xml index 01053bbd0..17c516574 100644 --- a/app/src/main/res/values-tl/strings.xml +++ b/app/src/main/res/values-tl/strings.xml @@ -62,7 +62,6 @@ Kaliwa sa kanan Magdagdag ng account Gumagamit - Kamalian sa pagdadagdag ng account Mamahala ng baterya mga optimization Mga baterya optimization ay maaaring antalahin ang mga notification Huwag i-sync diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 2bfc6b139..a8b8507cc 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -434,7 +434,6 @@ Hesap ekle Kullanıcı Parola - Hesap eklenirken hata Takvim ayarları Bildirimleri yönet Pil optimizasyonlarını yönet diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 251131477..da515de73 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -433,7 +433,6 @@ Додати обліковий запис Користувач Пароль - Помилка додання облікового запису Налаштування календаря Управління сповіщеннями Управління оптимізацією розряда акумулятора diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d33f96423..d0bddda43 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -414,7 +414,6 @@ 用户 密码 网址 - 添加帐号错误 日历设置 管理通知 电池优化管理 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 134a758b0..fbbfdeb4d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -440,7 +440,7 @@ File %1$s contained %2$s.\n\n User Password URL - Error adding account + Error: %s Calendar settings Manage notifications Manage battery optimizations