diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 3dcb1b826..e4ffceb39 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -504,7 +504,7 @@ "password": "Passwort eingeben...", "restart": "Neu starten", "shut-down": "Herunterfahren", - "suspend": "Ruhezustand", + "suspend": "Energie sparen", "welcome-back": "Willkommen zurück," }, "notifications": { @@ -513,6 +513,15 @@ "description": "Ihre Benachrichtigungen werden hier angezeigt, sobald sie eintreffen.", "no-notifications": "Keine Benachrichtigungen", "title": "Benachrichtigungen" + }, + "time": { + "now": "jetzt", + "diffM": "vor 1 Minute", + "diffMM": "vor {diff} Minuten", + "diffH": "vor 1 Stunde", + "diffHH": "vor {diff} Stunden", + "diffD": "vor 1 Tag", + "diffDD": "vor {diff} Tagen" } }, "options": { @@ -763,11 +772,11 @@ "action-in-seconds": "{action} in {seconds} Sekunden...", "hibernate": "Ruhezustand", "lock": "Sperren", - "lock-and-suspend": "Sperren und Ruhezustand", + "lock-and-suspend": "Sperren und Energie sparen", "logout": "Abmelden", "reboot": "Neu starten", "shutdown": "Herunterfahren", - "suspend": "Energiesparmodus", + "suspend": "Energie sparen", "title": "Sitzungsmenü" }, "settings": { @@ -1521,8 +1530,8 @@ "label": "Kompakter Sperrbildschirm" }, "lock-on-suspend": { - "description": "Den Bildschirm beim Suspendieren des Systems automatisch sperren.", - "label": "Sperren beim Ruhezustand" + "description": "Den Bildschirm beim Energiesparen automatisch sperren.", + "label": "Sperren beim Energiesparen" }, "show-hibernate": { "description": "Die Option 'Ruhezustand' in den Energieaktionen anzeigen.", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index ef6bd8751..90c86a42f 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -513,6 +513,15 @@ "description": "Your notifications will show up here as they arrive.", "no-notifications": "No notifications", "title": "Notifications" + }, + "time": { + "now": "now", + "diffM": "1 minute ago", + "diffMM": "{diff} minutes ago", + "diffH": "1 hour ago", + "diffHH": "{diff} hours ago", + "diffD": "1 day ago", + "diffDD": "{diff} days ago" } }, "options": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 13c6d24e9..4890862b6 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -513,6 +513,15 @@ "description": "Tus notificaciones aparecerán aquí a medida que lleguen.", "no-notifications": "No hay notificaciones", "title": "Notificaciones" + }, + "time": { + "now": "ahora", + "diffM": "hace 1 minuto", + "diffMM": "hace {diff} minutos", + "diffH": "hace 1 hora", + "diffHH": "hace {diff} horas", + "diffD": "hace 1 día", + "diffDD": "hace {diff} días" } }, "options": { diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 76ca5dac5..bcecc2387 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -513,6 +513,15 @@ "description": "Vos notifications apparaîtront ici à mesure qu'elles arriveront.", "no-notifications": "Aucune notification", "title": "Notifications" + }, + "time": { + "now": "maintenant", + "diffM": "il y a 1 minute", + "diffMM": "il y a {diff} minutes", + "diffH": "il y a 1 heure", + "diffHH": "il y a {diff} heures", + "diffD": "il y a 1 jour", + "diffDD": "il y a {diff} jours" } }, "options": { diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 8708a07ff..91e5841e0 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -513,6 +513,15 @@ "description": "Je meldingen verschijnen hier zodra ze binnenkomen.", "no-notifications": "Geen meldingen", "title": "Meldingen" + }, + "time": { + "now": "nu", + "diffM": "1 minuut geleden", + "diffMM": "{diff} minuten geleden", + "diffH": "1 uur geleden", + "diffHH": "{diff} uur geleden", + "diffD": "1 dag geleden", + "diffDD": "{diff} dagen geleden" } }, "options": { diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 48f6ac331..19d857808 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -513,6 +513,15 @@ "description": "Suas notificações aparecerão aqui assim que chegarem.", "no-notifications": "Nenhuma notificação", "title": "Notificações" + }, + "time": { + "now": "agora", + "diffM": "há 1 minuto", + "diffMM": "há {diff} minutos", + "diffH": "há 1 hora", + "diffHH": "há {diff} horas", + "diffD": "há 1 dia", + "diffDD": "há {diff} dias" } }, "options": { diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index 95ce9cfff..9035a04df 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -513,6 +513,15 @@ "description": "Ваши уведомления будут появляться здесь по мере их поступления.", "no-notifications": "Нет уведомлений", "title": "Уведомления" + }, + "time": { + "now": "сейчас", + "diffM": "1 минуту назад", + "diffMM": "{diff} минут назад", + "diffH": "1 час назад", + "diffHH": "{diff} часов назад", + "diffD": "1 день назад", + "diffDD": "{diff} дней назад" } }, "options": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 376425081..e397922b8 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -513,6 +513,15 @@ "description": "Bildirimler geldikçe burada görünecek.", "no-notifications": "Bildirim yok", "title": "Bildirimler" + }, + "time": { + "now": "şimdi", + "diffM": "1 dakika önce", + "diffMM": "{diff} dakika önce", + "diffH": "1 saat önce", + "diffHH": "{diff} saat önce", + "diffD": "1 gün önce", + "diffDD": "{diff} gün önce" } }, "options": { diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 3f5c331e8..2dc22becc 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -513,6 +513,15 @@ "description": "Ваші сповіщення з'являтимуться тут по мірі надходження.", "no-notifications": "Немає сповіщень", "title": "Сповіщення" + }, + "time": { + "now": "зараз", + "diffM": "1 хвилину тому", + "diffMM": "{diff} хвилин тому", + "diffH": "1 годину тому", + "diffHH": "{diff} годин тому", + "diffD": "1 день тому", + "diffDD": "{diff} днів тому" } }, "options": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 700308352..f6fe649d8 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -513,6 +513,15 @@ "description": "您的通知将在到达时显示在此处。", "no-notifications": "无通知", "title": "通知" + }, + "time": { + "now": "现在", + "diffM": "1 分钟前", + "diffMM": "{diff} 分钟前", + "diffH": "1 小时前", + "diffHH": "{diff} 小时前", + "diffD": "1 天前", + "diffDD": "{diff} 天前" } }, "options": { diff --git a/Commons/Time.qml b/Commons/Time.qml index 453da834e..45afd8252 100644 --- a/Commons/Time.qml +++ b/Commons/Time.qml @@ -100,11 +100,23 @@ Singleton { return ""; const diff = Date.now() - date.getTime(); if (diff < 60000) - return "now"; + return I18n.tr("notifications.time.now"); + if (diff < 120000) + return I18n.tr("notifications.time.diffM"); if (diff < 3600000) - return `${Math.floor(diff / 60000)}m ago`; + return I18n.tr("notifications.time.diffMM", { + "diff": Math.floor(diff / 60000) + }); + if (diff < 7200000) + return I18n.tr("notifications.time.diffH"); if (diff < 86400000) - return `${Math.floor(diff / 3600000)}h ago`; - return `${Math.floor(diff / 86400000)}d ago`; + return I18n.tr("notifications.time.diffHH", { + "diff": Math.floor(diff / 3600000) + }); + if (diff < 172800000) + return I18n.tr("notifications.time.diffD"); + return I18n.tr("notifications.time.diffDD", { + "diff": Math.floor(diff / 86400000) + }); } } diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 5dbde5d40..494845957 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -393,23 +393,22 @@ Variants { RowLayout { Layout.fillWidth: true spacing: Style.marginL - Layout.margins: Style.marginM + Layout.leftMargin: Style.marginM * 2 + Layout.rightMargin: Style.marginM * 2 + Layout.topMargin: Style.marginM + Layout.bottomMargin: Style.marginM ColumnLayout { NImageCircled { Layout.preferredWidth: Math.round(40 * Style.uiScaleRatio) Layout.preferredHeight: Math.round(40 * Style.uiScaleRatio) - Layout.alignment: Qt.AlignTop - Layout.topMargin: 30 + Layout.alignment: Qt.AlignVCenter imagePath: model.originalImage || "" borderColor: Color.transparent borderWidth: 0 fallbackIcon: "bell" fallbackIconSize: 24 } - Item { - Layout.fillHeight: true - } } ColumnLayout { @@ -430,9 +429,18 @@ Variants { } NText { - text: `${model.appName || I18n.tr("system.unknown-app")} · ${Time.formatRelativeTime(model.timestamp)}` - color: Color.mSecondary + text: model.appName || "Unknown App" pointSize: Style.fontSizeXS + font.weight: Style.fontWeightBold + color: Color.mSecondary + } + + NText { + textFormat: Text.PlainText + text: " " + Time.formatRelativeTime(model.timestamp) + pointSize: Style.fontSizeXXS + color: Color.mOnSurfaceVariant + anchors.bottom: parent.bottom } Item { diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 67ed3524b..8efde22c9 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -238,13 +238,16 @@ SmartPanel { NText { text: model.appName || "Unknown App" pointSize: Style.fontSizeXS + font.weight: Style.fontWeightBold color: Color.mSecondary } NText { - text: Time.formatRelativeTime(model.timestamp) - pointSize: Style.fontSizeXS - color: Color.mSecondary + textFormat: Text.PlainText + text: " " + Time.formatRelativeTime(model.timestamp) + pointSize: Style.fontSizeXXS + color: Color.mOnSurfaceVariant + anchors.bottom: parent.bottom } } diff --git a/Modules/Toast/SimpleToast.qml b/Modules/Toast/SimpleToast.qml index 6bcc8c51f..701a5f0db 100644 --- a/Modules/Toast/SimpleToast.qml +++ b/Modules/Toast/SimpleToast.qml @@ -100,9 +100,9 @@ Item { anchors.bottom: parent.bottom anchors.bottomMargin: Style.marginM anchors.left: parent.left - anchors.leftMargin: Style.marginM * 2 + anchors.leftMargin: Style.marginM * 3 anchors.right: parent.right - anchors.rightMargin: Style.marginM * 2 + anchors.rightMargin: Style.marginM * 3 spacing: Style.marginL // Icon