From ecbc83390e58c5ac2a41fa37aba05edf526ffc43 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 12 Sep 2020 16:53:43 +0300 Subject: [PATCH] Add "Configuration failed" stock string --- deltachat-ffi/deltachat.h | 3 ++- src/configure/mod.rs | 13 ++++++++++++- src/stock.rs | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index e72ec77b4..9e759ce0b 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -4924,8 +4924,9 @@ void dc_event_unref(dc_event_t* event); #define DC_STR_EPHEMERAL_FOUR_WEEKS 81 #define DC_STR_VIDEOCHAT_INVITATION 82 #define DC_STR_VIDEOCHAT_INVITE_MSG_BODY 83 +#define DC_STR_CONFIGURATION_FAILED 84 -#define DC_STR_COUNT 83 +#define DC_STR_COUNT 84 /* * @} diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 0d25c5baf..5b78caa9f 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -20,6 +20,7 @@ use crate::message::Message; use crate::oauth2::*; use crate::provider::{Protocol, Socket, UsernamePattern}; use crate::smtp::Smtp; +use crate::stock::StockMessage; use crate::{chat, e2ee, provider}; use auto_mozilla::moz_autoconfigure; @@ -117,7 +118,17 @@ impl Context { Ok(()) } Err(err) => { - progress!(self, 0, Some(err.to_string())); + progress!( + self, + 0, + Some( + self.stock_string_repl_str( + StockMessage::ConfigurationFailed, + err.to_string(), + ) + .await + ) + ); Err(err) } } diff --git a/src/stock.rs b/src/stock.rs index 09e0ecd9c..226a0946c 100644 --- a/src/stock.rs +++ b/src/stock.rs @@ -216,6 +216,9 @@ pub enum StockMessage { #[strum(props(fallback = "You are invited to a video chat, click %1$s to join."))] VideochatInviteMsgBody = 83, + + #[strum(props(fallback = "Configuration failed. Error: ā€œ%1$sā€"))] + ConfigurationFailed = 84, } /*