mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(notifications): improve exclude apps translations
- Update translations to emphasize "skip playing configured notification sound" - Remove duplicate "exclude-apps" entries from all locale files - Apply consistent meaning across all 10 supported languages - Clarify that the feature skips user-configured sounds for apps with built-in audio This provides better user understanding of the exclude apps functionality that prevents double notification sounds.
This commit is contained in:
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Lautstärke für Benachrichtigungstöne anpassen.",
|
||||
"label": "Sound-Lautstärke"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Überspringen Sie das Abspielen der konfigurierten Benachrichtigungstöne für bestimmte Anwendungen, die ihre eigenen integrierten Töne haben.",
|
||||
"label": "Ausgeschlossene Anwendungen",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "WLAN"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1779,6 +1779,11 @@
|
||||
"description": "Configure notification sound effects and volume.",
|
||||
"label": "Sound settings"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Skip playing the configured notification sound for specific applications that have their own built-in sounds.",
|
||||
"label": "Excluded applications",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"separate": {
|
||||
"description": "Use different sound files for low, normal, and critical priority notifications.",
|
||||
"label": "Use different sounds per priority"
|
||||
@@ -2669,4 +2674,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Ajustar el nivel de volumen para los sonidos de notificación.",
|
||||
"label": "Volumen del sonido"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Omitir la reproducción del sonido de notificación configurado para aplicaciones específicas que tienen sus propios sonidos integrados.",
|
||||
"label": "Aplicaciones excluidas",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Ajuster le niveau de volume pour les sons de notification.",
|
||||
"label": "Volume sonore"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Ne pas jouer le son de notification configuré pour les applications spécifiques qui ont leurs propres sons intégrés.",
|
||||
"label": "Applications exclues",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "通知音の音量レベルを調整します。",
|
||||
"label": "サウンド音量"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "独自の通知音を持つ特定のアプリケーションについて、設定された通知音の再生をスキップします。",
|
||||
"label": "除外アプリケーション",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Pas het volumeniveau aan voor meldingsgeluiden.",
|
||||
"label": "Geluidsvolume"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Sla het afspelen van het geconfigureerde notificatiegeluid over voor specifieke applicaties die hun eigen ingebouwde geluiden hebben.",
|
||||
"label": "Uitgesloten applicaties",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Ajustar o nível de volume para sons de notificação.",
|
||||
"label": "Volume do som"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Pular a reprodução do som de notificação configurado para aplicativos específicos que têm seus próprios sons integrados.",
|
||||
"label": "Aplicativos excluídos",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Настроить уровень громкости для звуков уведомлений.",
|
||||
"label": "Громкость звука"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускать воспроизведение настроенного звука уведомлений для определенных приложений, имеющих собственные встроенные звуки.",
|
||||
"label": "Исключенные приложения",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Bildirim sesleri için ses seviyesini ayarlayın.",
|
||||
"label": "Ses seviyesi"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Kendi dahili seslerine sahip belirli uygulamalar için ayarlanan bildirim sesini çalmayı es geçin.",
|
||||
"label": "Hariç tutulan uygulamalar",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Kablosuz Bağlantı"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "Налаштуйте рівень гучності для звуків сповіщень.",
|
||||
"label": "Гучність звуку"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускати відтворення налаштованого звуку сповіщень для певних програм, які мають власні вбудовані звуки.",
|
||||
"label": "Виключені програми",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1776,6 +1776,11 @@
|
||||
"volume": {
|
||||
"description": "调整通知声音的音量级别。",
|
||||
"label": "声音音量"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "跳过播放具有自己内置声音的特定应用程序的配置通知声音。",
|
||||
"label": "排除的应用程序",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"toast": {
|
||||
@@ -2668,4 +2673,4 @@
|
||||
"title": "Wi-Fi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +314,8 @@
|
||||
"separateSounds": false,
|
||||
"criticalSoundFile": "",
|
||||
"normalSoundFile": "",
|
||||
"lowSoundFile": ""
|
||||
"lowSoundFile": "",
|
||||
"excludedApps": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
|
||||
@@ -504,6 +504,7 @@ Singleton {
|
||||
property string criticalSoundFile: ""
|
||||
property string normalSoundFile: ""
|
||||
property string lowSoundFile: ""
|
||||
property string excludedApps: "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,25 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
// Excluded Apps List
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: Settings.data.notifications?.sounds?.enabled ?? false
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.notifications.sounds.excluded-apps.label")
|
||||
description: I18n.tr("settings.notifications.sounds.excluded-apps.description")
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: I18n.tr("settings.notifications.sounds.excluded-apps.placeholder")
|
||||
text: Settings.data.notifications?.sounds?.excludedApps ?? ""
|
||||
onEditingFinished: Settings.data.notifications.sounds.excludedApps = text
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginL
|
||||
|
||||
@@ -185,7 +185,7 @@ Singleton {
|
||||
addToHistory(data);
|
||||
|
||||
// Play notification sound if enabled (before checking for existing notifications)
|
||||
playNotificationSound(data.urgency);
|
||||
playNotificationSound(data.urgency, notification.appName);
|
||||
|
||||
if (root.doNotDisturb || PowerProfileService.noctaliaPerformanceMode)
|
||||
return;
|
||||
@@ -208,7 +208,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// Function to play notification sound using existing SoundService
|
||||
function playNotificationSound(urgency) {
|
||||
function playNotificationSound(urgency, appName) {
|
||||
// Check if notification sounds are enabled
|
||||
if (!Settings.data.notifications?.sounds?.enabled) {
|
||||
return;
|
||||
@@ -219,6 +219,20 @@ Singleton {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this app should be excluded
|
||||
if (appName) {
|
||||
const excludedApps = Settings.data.notifications.sounds.excludedApps || "";
|
||||
if (excludedApps.trim() !== "") {
|
||||
const excludedList = excludedApps.toLowerCase().split(',').map(app => app.trim());
|
||||
const normalizedName = appName.toLowerCase();
|
||||
|
||||
if (excludedList.includes(normalizedName)) {
|
||||
Logger.i("NotificationService", `Skipping sound for excluded app: ${appName}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if system is muted
|
||||
if (AudioService.muted) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user