From cc08ee3997c2b6bdafb27c5073f7f1c798d13bf5 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Fri, 27 Nov 2020 21:13:55 +0100 Subject: [PATCH] Switch to file picker for documents, fix short text for audios --- qml/pages/ChatPage.qml | 2 +- src/fernschreiberutils.cpp | 3 +++ translations/harbour-fernschreiber-de.ts | 9 +++++++++ translations/harbour-fernschreiber-en.ts | 9 +++++++++ translations/harbour-fernschreiber-es.ts | 9 +++++++++ translations/harbour-fernschreiber-fi.ts | 9 +++++++++ translations/harbour-fernschreiber-hu.ts | 9 +++++++++ translations/harbour-fernschreiber-it.ts | 9 +++++++++ translations/harbour-fernschreiber-pl.ts | 9 +++++++++ translations/harbour-fernschreiber-ru.ts | 9 +++++++++ translations/harbour-fernschreiber-sv.ts | 9 +++++++++ translations/harbour-fernschreiber-zh_CN.ts | 9 +++++++++ translations/harbour-fernschreiber.ts | 9 +++++++++ 13 files changed, 103 insertions(+), 1 deletion(-) diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml index 0c77e58..15258eb 100644 --- a/qml/pages/ChatPage.qml +++ b/qml/pages/ChatPage.qml @@ -1023,7 +1023,7 @@ Page { visible: chatPage.hasSendPrivilege("can_send_media_messages") icon.source: "image://theme/icon-m-document" onClicked: { - var picker = pageStack.push("Sailfish.Pickers.DocumentPickerPage"); + var picker = pageStack.push("Sailfish.Pickers.FilePickerPage"); picker.selectedContentPropertiesChanged.connect(function(){ attachmentOptionsRow.visible = false; Debug.log("Selected document: ", picker.selectedContentProperties.filePath ); diff --git a/src/fernschreiberutils.cpp b/src/fernschreiberutils.cpp index 26a7e93..0b35405 100644 --- a/src/fernschreiberutils.cpp +++ b/src/fernschreiberutils.cpp @@ -27,6 +27,9 @@ QString FernschreiberUtils::getMessageShortText(const QVariantMap &messageConten if (contentType == "messageAnimation") { return myself ? tr("sent an animation", "myself") : tr("sent an animation"); } + if (contentType == "messageAudio") { + return myself ? tr("sent an audio", "myself") : tr("sent an audio"); + } if (contentType == "messageVoiceNote") { return myself ? tr("sent a voice note", "myself") : tr("sent a voice note"); } diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts index 2117ba9..f38427d 100644 --- a/translations/harbour-fernschreiber-de.ts +++ b/translations/harbour-fernschreiber-de.ts @@ -740,6 +740,15 @@ sent a self-destructing photo that is expired hat ein selbstzerstörendes Bild gesendet, das abgelaufen ist + + sent an audio + myself + haben eine Audiodatei gesendet + + + sent an audio + hat eine Audiodatei gesendet + ImagePage diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts index a875854..a9968b8 100644 --- a/translations/harbour-fernschreiber-en.ts +++ b/translations/harbour-fernschreiber-en.ts @@ -740,6 +740,15 @@ sent a self-destructing photo that is expired sent a self-destructing photo that is expired + + sent an audio + myself + sent an audio + + + sent an audio + sent an audio + ImagePage diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index a29da1e..6edf96f 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -730,6 +730,15 @@ sent a self-destructing photo that is expired envió un foto autodestructivo que está caducado + + sent an audio + myself + envió un audio + + + sent an audio + envió un audio + ImagePage diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts index 3df7861..3dab528 100644 --- a/translations/harbour-fernschreiber-fi.ts +++ b/translations/harbour-fernschreiber-fi.ts @@ -741,6 +741,15 @@ sent a self-destructing photo that is expired lähetti itsetuhoutuvan kuvan joka vanheni + + sent an audio + myself + + + + sent an audio + + ImagePage diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts index 7396ec0..45955cd 100644 --- a/translations/harbour-fernschreiber-hu.ts +++ b/translations/harbour-fernschreiber-hu.ts @@ -730,6 +730,15 @@ sent a self-destructing photo that is expired + + sent an audio + myself + audiót küldött + + + sent an audio + audiót küldött + ImagePage diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index 07058aa..c4a1588 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -740,6 +740,15 @@ sent a self-destructing photo that is expired ha inviato una foto effimera già scaduta + + sent an audio + myself + + + + sent an audio + + ImagePage diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts index 40e6c6e..bc92256 100644 --- a/translations/harbour-fernschreiber-pl.ts +++ b/translations/harbour-fernschreiber-pl.ts @@ -750,6 +750,15 @@ sent a self-destructing photo that is expired + + sent an audio + myself + + + + sent an audio + + ImagePage diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts index 0e8465f..ebaba6b 100644 --- a/translations/harbour-fernschreiber-ru.ts +++ b/translations/harbour-fernschreiber-ru.ts @@ -750,6 +750,15 @@ sent a self-destructing photo that is expired + + sent an audio + myself + отправил(а) аудио + + + sent an audio + отправил(а) аудио + ImagePage diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts index c2c32d9..b631f0e 100644 --- a/translations/harbour-fernschreiber-sv.ts +++ b/translations/harbour-fernschreiber-sv.ts @@ -740,6 +740,15 @@ sent a self-destructing photo that is expired skickade ett självförstörande foto som är utgånget + + sent an audio + myself + skickade en ljudfil + + + sent an audio + skickade en ljudfil + ImagePage diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts index baf55f6..44bde59 100644 --- a/translations/harbour-fernschreiber-zh_CN.ts +++ b/translations/harbour-fernschreiber-zh_CN.ts @@ -730,6 +730,15 @@ sent a self-destructing photo that is expired 发送过期即自毁视频 + + sent an audio + myself + 发送音频 + + + sent an audio + 发送音频 + ImagePage diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index b75a5a9..6591e8e 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -740,6 +740,15 @@ sent a self-destructing photo that is expired sent a self-destructing photo that is expired + + sent an audio + myself + sent an audio + + + sent an audio + sent an audio + ImagePage