Update harbour-fernschreiber-sk.ts

This commit is contained in:
okruhliak 2021-01-31 20:57:51 +01:00
commit f7ba5ebe45
17 changed files with 245 additions and 226 deletions

View file

@ -32,17 +32,9 @@ CoverBackground {
property int connectionState: TelegramAPI.WaitingForNetwork
function setUnreadInfoText() {
if (unreadMessages === 1) {
unreadMessagesText.text = qsTr("unread message");
} else {
unreadMessagesText.text = qsTr("unread messages");
}
if (unreadChats === 1) {
unreadChatsText.text = qsTr("chat");
} else {
unreadChatsText.text = qsTr("chats");
}
unreadMessagesText.text = qsTr("unread messages", "", coverPage.unreadMessages);
unreadChatsText.text = qsTr("chats", "", coverPage.unreadChats)
switch (coverPage.connectionState) {
case TelegramAPI.WaitingForNetwork:
@ -131,7 +123,7 @@ CoverBackground {
}
Label {
id: unreadMessagesText
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeExtraSmall
width: parent.width - unreadMessagesCountText.width - Theme.paddingMedium
wrapMode: Text.Wrap
anchors.verticalCenter: unreadMessagesCountText.verticalCenter
@ -146,7 +138,7 @@ CoverBackground {
visible: coverPage.authenticated && coverPage.unreadMessages > 1
Text {
id: inText
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.primaryColor
text: qsTr("in")
anchors.verticalCenter: unreadChatsCountText.verticalCenter
@ -159,7 +151,7 @@ CoverBackground {
}
Text {
id: unreadChatsText
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.primaryColor
width: parent.width - unreadChatsCountText.width - inText.width - ( 2 * Theme.paddingMedium )
wrapMode: Text.Wrap

View file

@ -561,11 +561,66 @@ Page {
}
}
ComboBox {
id: feedbackComboBox
width: parent.columnWidth
label: qsTr("Notification feedback")
description: qsTr("Use non-graphical feedback (sound, vibration) for notifications")
menu: ContextMenu {
id: feedbackMenu
x: 0
width: feedbackComboBox.width
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackAll
text: qsTr("All events")
onClicked: {
appSettings.notificationFeedback = value
}
}
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackNew
text: qsTr("Only new events")
onClicked: {
appSettings.notificationFeedback = value
}
}
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackNone
text: qsTr("None")
onClicked: {
appSettings.notificationFeedback = value
}
}
}
Component.onCompleted: updateFeedbackSelection()
function updateFeedbackSelection() {
var menuItems = feedbackMenu.children
var n = menuItems.length
for (var i=0; i<n; i++) {
if (menuItems[i].value === appSettings.notificationFeedback) {
currentIndex = i
return
}
}
}
Connections {
target: appSettings
onNotificationFeedbackChanged: {
feedbackComboBox.updateFeedbackSelection()
}
}
}
TextSwitch {
width: parent.columnWidth
checked: appSettings.notificationTurnsDisplayOn && enabled
text: qsTr("Notification turns on the display")
height: appSettings.notificationFeedback === AppSettings.NotificationFeedbackNone ? 0 : implicitHeight
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
height: enabled ? implicitHeight: 0
clip: height < implicitHeight
visible: height > 0
automaticCheck: false
@ -574,57 +629,23 @@ Page {
}
Behavior on height { SmoothedAnimation { duration: 200 } }
}
}
ComboBox {
id: feedbackComboBox
label: qsTr("Notification feedback")
description: qsTr("Use non-graphical feedback (sound, vibration) for notifications")
menu: ContextMenu {
id: feedbackMenu
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackAll
text: qsTr("All events")
onClicked: {
appSettings.notificationFeedback = value
}
}
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackNew
text: qsTr("Only new events")
onClicked: {
appSettings.notificationFeedback = value
}
}
MenuItem {
readonly property int value: AppSettings.NotificationFeedbackNone
text: qsTr("None")
onClicked: {
appSettings.notificationFeedback = value
}
TextSwitch {
width: parent.columnWidth
checked: appSettings.notificationSoundsEnabled && enabled
text: qsTr("Enable notification sounds")
description: qsTr("When sounds are enabled, Fernschreiber would use Sailfish OS notification sound for chats, which can be configured in system settings.")
enabled: appSettings.notificationFeedback !== AppSettings.NotificationFeedbackNone
height: enabled ? implicitHeight: 0
clip: height < implicitHeight
visible: height > 0
automaticCheck: false
onClicked: {
appSettings.notificationSoundsEnabled = !checked
}
Behavior on height { SmoothedAnimation { duration: 200 } }
}
Component.onCompleted: updateFeedbackSelection()
function updateFeedbackSelection() {
var menuItems = feedbackMenu.children
var n = menuItems.length
for (var i=0; i<n; i++) {
if (menuItems[i].value === appSettings.notificationFeedback) {
currentIndex = i
return
}
}
}
Connections {
target: appSettings
onNotificationFeedbackChanged: {
feedbackComboBox.updateFeedbackSelection()
}
}
}
SectionHeader {

View file

@ -27,6 +27,7 @@ namespace {
const QString KEY_SHOW_STICKERS_AS_IMAGES("showStickersAsImages");
const QString KEY_ANIMATE_STICKERS("animateStickers");
const QString KEY_NOTIFICATION_TURNS_DISPLAY_ON("notificationTurnsDisplayOn");
const QString KEY_NOTIFICATION_SOUNDS_ENABLED("notificationSoundsEnabled");
const QString KEY_NOTIFICATION_FEEDBACK("notificationFeedback");
const QString KEY_STORAGE_OPTIMIZER("storageOptimizer");
const QString KEY_INLINEBOT_LOCATION_ACCESS("allowInlineBotLocationAccess");
@ -122,6 +123,20 @@ void AppSettings::setNotificationTurnsDisplayOn(bool turnOn)
}
}
bool AppSettings::notificationSoundsEnabled() const
{
return settings.value(KEY_NOTIFICATION_SOUNDS_ENABLED, true).toBool();
}
void AppSettings::setNotificationSoundsEnabled(bool enable)
{
if (notificationSoundsEnabled() != enable) {
LOG(KEY_NOTIFICATION_SOUNDS_ENABLED << enable);
settings.setValue(KEY_NOTIFICATION_SOUNDS_ENABLED, enable);
emit notificationSoundsEnabledChanged();
}
}
AppSettings::NotificationFeedback AppSettings::notificationFeedback() const
{
return (NotificationFeedback) settings.value(KEY_NOTIFICATION_FEEDBACK, (int) NotificationFeedbackAll).toInt();

View file

@ -29,6 +29,7 @@ class AppSettings : public QObject {
Q_PROPERTY(bool showStickersAsImages READ showStickersAsImages WRITE setShowStickersAsImages NOTIFY showStickersAsImagesChanged)
Q_PROPERTY(bool animateStickers READ animateStickers WRITE setAnimateStickers NOTIFY animateStickersChanged)
Q_PROPERTY(bool notificationTurnsDisplayOn READ notificationTurnsDisplayOn WRITE setNotificationTurnsDisplayOn NOTIFY notificationTurnsDisplayOnChanged)
Q_PROPERTY(bool notificationSoundsEnabled READ notificationSoundsEnabled WRITE setNotificationSoundsEnabled NOTIFY notificationSoundsEnabledChanged)
Q_PROPERTY(NotificationFeedback notificationFeedback READ notificationFeedback WRITE setNotificationFeedback NOTIFY notificationFeedbackChanged)
Q_PROPERTY(bool storageOptimizer READ storageOptimizer WRITE setStorageOptimizer NOTIFY storageOptimizerChanged)
Q_PROPERTY(bool allowInlineBotLocationAccess READ allowInlineBotLocationAccess WRITE setAllowInlineBotLocationAccess NOTIFY allowInlineBotLocationAccessChanged)
@ -64,6 +65,9 @@ public:
bool notificationTurnsDisplayOn() const;
void setNotificationTurnsDisplayOn(bool turnOn);
bool notificationSoundsEnabled() const;
void setNotificationSoundsEnabled(bool enable);
NotificationFeedback notificationFeedback() const;
void setNotificationFeedback(NotificationFeedback feedback);
@ -86,6 +90,7 @@ signals:
void showStickersAsImagesChanged();
void animateStickersChanged();
void notificationTurnsDisplayOnChanged();
void notificationSoundsEnabledChanged();
void notificationFeedbackChanged();
void storageOptimizerChanged();
void allowInlineBotLocationAccessChanged();

View file

@ -373,7 +373,7 @@ void NotificationManager::publishNotification(const NotificationGroup *notificat
} else {
nemoNotification->setPreviewBody(notificationBody);
nemoNotification->setPreviewSummary(summary);
nemoNotification->setHintValue(HINT_SUPPRESS_SOUND, false);
nemoNotification->setHintValue(HINT_SUPPRESS_SOUND, !appSettings->notificationSoundsEnabled());
nemoNotification->setHintValue(HINT_DISPLAY_ON, appSettings->notificationTurnsDisplayOn());
nemoNotification->setHintValue(HINT_VISIBILITY, VISIBILITY_PUBLIC);
nemoNotification->setUrgency(Notification::Normal);

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>ungelesene Nachricht</translation>
</message>
<message>
<source>unread messages</source>
<translation>ungelesene Nachrichten</translation>
</message>
<message>
<source>in</source>
<translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Aktualisiere Inhalte...</translation>
</message>
<message>
<source>chat</source>
<translation>Chat</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>Chats</translation>
<translation>
<numerusform>Chat</numerusform>
<numerusform>Chats</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation>
<numerusform>ungelesene Nachricht</numerusform>
<numerusform>ungelesene Nachrichten</numerusform>
</translation>
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>unread message</translation>
</message>
<message>
<source>unread messages</source>
<translation>unread messages</translation>
</message>
<message>
<source>in</source>
<translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Updating content...</translation>
</message>
<message>
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>chats</translation>
<translation>
<numerusform>chat</numerusform>
<numerusform>chats</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation>
<numerusform>unread message</numerusform>
<numerusform>unread messages</numerusform>
</translation>
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>mensaje no leído</translation>
</message>
<message>
<source>unread messages</source>
<translation>mensajes no leído</translation>
</message>
<message>
<source>in</source>
<translation>en</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Actualizando contenido...</translation>
</message>
<message>
<source>chat</source>
<translation>charla</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>charlas</translation>
<translation type="unfinished">
<numerusform>charlas</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>lukematon viesti</translation>
</message>
<message>
<source>unread messages</source>
<translation>lukematonta viestiä</translation>
</message>
<message>
<source>in</source>
<translatorcomment>The preposition &apos;in&apos; is translated to Finnish using the inessive case (suffix ssa/ssä), so this string should be left empty in the translation. Unfortunately Qt will ignore empty translations, so let&apos;s use the character U+200B (zero width space) instead.</translatorcomment>
@ -482,13 +474,19 @@
<source>Updating content...</source>
<translation>Päivitetään sisältöä...</translation>
</message>
<message>
<source>chat</source>
<translation>keskustelussa</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>keskustelussa</translation>
<translation type="unfinished">
<numerusform>keskustelussa</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -439,14 +439,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>olvasatlan üzenet</translation>
</message>
<message>
<source>unread messages</source>
<translation>olvasatlan üzenetek</translation>
</message>
<message>
<source>in</source>
<translation>ban</translation>
@ -471,13 +463,17 @@
<source>Updating content...</source>
<translation>Tartalom frissítése...</translation>
</message>
<message>
<source>chat</source>
<translation>csevegés</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>csevegések</translation>
<translation type="unfinished">
<numerusform>csevegések</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>messaggio non letto</translation>
</message>
<message>
<source>unread messages</source>
<translation>messaggi non letti</translation>
</message>
<message>
<source>in</source>
<translation>in</translation>
@ -465,13 +457,12 @@
<source>Connected</source>
<translation>Connesso</translation>
</message>
<message>
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>chat</translation>
<translation type="unfinished">
<numerusform>chat</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<source>Waiting for network...</source>
@ -489,6 +480,13 @@
<source>Updating content...</source>
<translation>Aggiorna contenuti...</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>
<name>EditGroupChatPermissionsColumn</name>

View file

@ -459,14 +459,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>nieprzeczytana wiadomość</translation>
</message>
<message>
<source>unread messages</source>
<translation>nieprzeczytane wiadomości</translation>
</message>
<message>
<source>in</source>
<translation>w</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source>
<translation>Aktualizacja treści...</translation>
</message>
<message>
<source>chat</source>
<translation>czat</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>czaty</translation>
<translation type="unfinished">
<numerusform>czaty</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -459,14 +459,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>сообщение</translation>
</message>
<message>
<source>unread messages</source>
<translation>сообщений</translation>
</message>
<message>
<source>in</source>
<translation>в</translation>
@ -491,13 +483,21 @@
<source>Updating content...</source>
<translation>Обновление контента...</translation>
</message>
<message>
<source>chat</source>
<translation>чате</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>чатах</translation>
<translation type="unfinished">
<numerusform>чатах</numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -459,14 +459,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>neprečítaná správa</translation>
</message>
<message>
<source>unread messages</source>
<translation>neprečítané správy</translation>
</message>
<message>
<source>in</source>
<translation>v</translation>
@ -491,6 +483,7 @@
<source>Updating content...</source>
<translation>Aktualizácia obsahu...</translation>
</message>
<<<<<<< HEAD
<message>
<source>chat</source>
<translation>čete</translation>
@ -498,6 +491,23 @@
<message>
<source>chats</source>
<translation>četoch</translation>
=======
<message numerus="yes">
<source>chats</source>
<translation>
<numerusform>čete</numerusform>
<numerusform>četoch</numerusform>
<numerusform>četoch</numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation>
<numerusform>neprečítaná správa</numerusform>
<numerusform>neprečítané správy</numerusform>
<numerusform>neprečítaných správ</numerusform>
</translation>
>>>>>>> 444649c3b2608f42403dc59a132ba944e782288d
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>oläst meddelande</translation>
</message>
<message>
<source>unread messages</source>
<translation>olästa meddelanden</translation>
</message>
<message>
<source>in</source>
<translation>i</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Uppdaterar innehåll...</translation>
</message>
<message>
<source>chat</source>
<translation>chatt</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>chattar</translation>
<translation type="unfinished">
<numerusform>chattar</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -439,16 +439,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>
</translation>
</message>
<message>
<source>unread messages</source>
<translation>
</translation>
</message>
<message>
<source>in</source>
<translation></translation>
@ -473,13 +463,17 @@
<source>Updating content...</source>
<translation></translation>
</message>
<message>
<source>chat</source>
<translation></translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation></translation>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
</translation>
</message>
</context>
<context>

View file

@ -449,14 +449,6 @@
</context>
<context>
<name>CoverPage</name>
<message>
<source>unread message</source>
<translation>unread message</translation>
</message>
<message>
<source>unread messages</source>
<translation>unread messages</translation>
</message>
<message>
<source>in</source>
<translation>in</translation>
@ -481,13 +473,19 @@
<source>Updating content...</source>
<translation>Updating content...</translation>
</message>
<message>
<source>chat</source>
<translation>chat</translation>
</message>
<message>
<message numerus="yes">
<source>chats</source>
<translation>chats</translation>
<translation type="unfinished">
<numerusform>chats</numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<source>unread messages</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
</context>
<context>