api: stock strings for calls

This commit is contained in:
link2xt
2025-10-01 14:51:24 +00:00
committed by l
parent 38e4919be1
commit a930ae27be
2 changed files with 55 additions and 0 deletions

View File

@@ -7820,6 +7820,21 @@ void dc_event_unref(dc_event_t* event);
/// "❤️ Seems you're enjoying Delta Chat!"… (donation request device message)
#define DC_STR_DONATION_REQUEST 193
/// "Outgoing Call"
#define DC_STR_OUTGOING_CALL 194
/// "Incoming Call"
#define DC_STR_INCOMING_CALL 195
/// "Declined Call"
#define DC_STR_DECLINED_CALL 196
/// "Canceled Call"
#define DC_STR_CANCELED_CALL 197
/// "Missed Call"
#define DC_STR_MISSED_CALL 198
/// "Contact". Deprecated, currently unused.
#define DC_STR_CONTACT 200

View File

@@ -424,6 +424,21 @@ Help keeping us to keep Delta Chat independent and make it more awesome in the f
https://delta.chat/donate"))]
DonationRequest = 193,
#[strum(props(fallback = "Outgoing Call"))]
OutgoingCall = 194,
#[strum(props(fallback = "Incoming Call"))]
IncomingCall = 195,
#[strum(props(fallback = "Declined Call"))]
DeclinedCall = 196,
#[strum(props(fallback = "Canceled Call"))]
CanceledCall = 197,
#[strum(props(fallback = "Missed Call"))]
MissedCall = 198,
}
impl StockMessage {
@@ -801,6 +816,31 @@ pub(crate) async fn donation_request(context: &Context) -> String {
translated(context, StockMessage::DonationRequest).await
}
/// Stock string: `Outgoing Call`.
pub(crate) async fn outgoing_call(context: &Context) -> String {
translated(context, StockMessage::OutgoingCall).await
}
/// Stock string: `Incoming Call`.
pub(crate) async fn incoming_call(context: &Context) -> String {
translated(context, StockMessage::IncomingCall).await
}
/// Stock string: `Declined Call`.
pub(crate) async fn declined_call(context: &Context) -> String {
translated(context, StockMessage::DeclinedCall).await
}
/// Stock string: `Canceled Call`.
pub(crate) async fn canceled_call(context: &Context) -> String {
translated(context, StockMessage::CanceledCall).await
}
/// Stock string: `Missed Call`.
pub(crate) async fn missed_call(context: &Context) -> String {
translated(context, StockMessage::MissedCall).await
}
/// Stock string: `Scan to chat with %1$s`.
pub(crate) async fn setup_contact_qr_description(
context: &Context,