From 29d99dd7d10d272e0a40894c5a0f9e1ac86e517d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Fri, 6 Nov 2020 14:28:47 -0500 Subject: [PATCH] chatview: fix chatview' strings for qml client on linux Change-Id: Iabbab961b1a68ef5d42c331ddc9c481552cb7a29 --- src/api/chatview.h | 2 +- src/chatview.cpp | 66 +++++++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/api/chatview.h b/src/api/chatview.h index b75d54de..48cb62c7 100644 --- a/src/api/chatview.h +++ b/src/api/chatview.h @@ -28,7 +28,7 @@ namespace api { namespace chatview { -QVariantMap getTranslatedStrings(); +QVariantMap getTranslatedStrings(bool qwebview = true); } // namespace chatview } // namespace api diff --git a/src/chatview.cpp b/src/chatview.cpp index 0652c3d0..654b857b 100644 --- a/src/chatview.cpp +++ b/src/chatview.cpp @@ -24,41 +24,41 @@ namespace api { namespace chatview { QVariantMap -getTranslatedStrings() +getTranslatedStrings(bool qwebview) { - return - { + return { {"Hide chat view", QObject::tr("Hide chat view")}, - {"Place video call", QObject::tr("Place video call")}, - {"Place audio call", QObject::tr("Place audio call")}, - {"Add to conversations", QObject::tr("Add to conversations")}, - {"Unban contact", QObject::tr("Unban contact")}, {"Send", QObject::tr("Send")}, - {"Options", QObject::tr("Options")}, {"Jump to latest", QObject::tr("Jump to latest")}, - {"Send file", QObject::tr("Send file")}, - {"Leave video message", QObject::tr("Leave video message")}, - {"Leave audio message", QObject::tr("Leave audio message")}, - {"Accept", QObject::tr("Accept")}, {"Refuse", QObject::tr("Refuse")}, - {"Block", QObject::tr("Block")}, {"Type a message", QObject::tr("Type a message")}, - {"Note: an interaction will create a new contact.", - QObject::tr("Note: an interaction will create a new contact.")}, - {"is not in your contacts", QObject::tr("is not in your contacts")}, - {"Note: you can automatically accept this invitation by sending a message.", - QObject::tr( - "Note: you can automatically accept this invitation by sending a message.")}, -#if defined(WIN32) - {"%d days ago", QObject::tr("{0} days ago")}, - {"%d hours ago", QObject::tr("{0} hours ago")}, - {"%d minutes ago", QObject::tr("{0} minutes ago")}, -#else - {"%d days ago", QObject::tr("%d days ago")}, - {"%d hours ago", QObject::tr("%d hours ago")}, - {"%d minutes ago", QObject::tr("%d minutes ago")}, -#endif - {"one day ago", QObject::tr("one day ago")}, - {"one hour ago", QObject::tr("one hour ago")}, {"just now", QObject::tr("just now")}, - {"Failure", QObject::tr("Failure")}, {"Accept", QObject::tr("Accept")}, - {"Refuse", QObject::tr("Refuse")}, {"Delete", QObject::tr("Delete")}, - {"Retry", QObject::tr("Retry")}, + {"Place video call", QObject::tr("Place video call")}, + {"Place audio call", QObject::tr("Place audio call")}, + {"Add to conversations", QObject::tr("Add to conversations")}, + {"Unban contact", QObject::tr("Unban contact")}, + {"Send", QObject::tr("Send")}, + {"Options", QObject::tr("Options")}, + {"Jump to latest", QObject::tr("Jump to latest")}, + {"Send file", QObject::tr("Send file")}, + {"Leave video message", QObject::tr("Leave video message")}, + {"Leave audio message", QObject::tr("Leave audio message")}, + {"Accept", QObject::tr("Accept")}, + {"Refuse", QObject::tr("Refuse")}, + {"Block", QObject::tr("Block")}, + {"Type a message", QObject::tr("Type a message")}, + {"Note: an interaction will create a new contact.", + QObject::tr("Note: an interaction will create a new contact.")}, + {"is not in your contacts", QObject::tr("is not in your contacts")}, + {"Note: you can automatically accept this invitation by sending a message.", + QObject::tr("Note: you can automatically accept this invitation by sending a message.")}, + {"%d days ago", qwebview ? QObject::tr("{0} days ago") : QObject::tr("%d days ago")}, + {"%d hours ago", qwebview ? QObject::tr("{0} hours ago") : QObject::tr("%d hours ago")}, + {"%d minutes ago", + qwebview ? QObject::tr("{0} minutes ago") : QObject::tr("%d minutes ago")}, + {"one day ago", QObject::tr("one day ago")}, + {"one hour ago", QObject::tr("one hour ago")}, + {"just now", QObject::tr("just now")}, + {"Failure", QObject::tr("Failure")}, + {"Accept", QObject::tr("Accept")}, + {"Refuse", QObject::tr("Refuse")}, + {"Delete", QObject::tr("Delete")}, + {"Retry", QObject::tr("Retry")}, }; } -- GitLab