From 1d5a4d6fab760330f3e953778da2969a55b90999 Mon Sep 17 00:00:00 2001 From: BONNEVILLE Geoffroy Date: Thu, 26 Jul 2018 10:18:00 +0200 Subject: [PATCH] Removal of unused string resources Minor Toast code refactor --- .../Common/ToastNotificationHelper.cs | 6 +-- ModernKeePass/Strings/en-US/CodeBehind.resw | 42 ------------------- ModernKeePass/Strings/fr-FR/CodeBehind.resw | 42 ------------------- 3 files changed, 3 insertions(+), 87 deletions(-) diff --git a/ModernKeePass/Common/ToastNotificationHelper.cs b/ModernKeePass/Common/ToastNotificationHelper.cs index 46f8f0c..4f43513 100644 --- a/ModernKeePass/Common/ToastNotificationHelper.cs +++ b/ModernKeePass/Common/ToastNotificationHelper.cs @@ -11,16 +11,16 @@ namespace ModernKeePass.Common { public static void ShowMovedToast(IPwEntity entity, string action, string text) { - var entityType = entity is GroupVm ? "Group" : "Entry"; var notificationXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02); var toastElements = notificationXml.GetElementsByTagName("text"); - toastElements[0].AppendChild(notificationXml.CreateTextNode($"{action} {entityType} {entity.Name}")); + toastElements[0].AppendChild(notificationXml.CreateTextNode($"{action} {entity.Name}")); toastElements[1].AppendChild(notificationXml.CreateTextNode(text)); var toastNode = notificationXml.SelectSingleNode("/toast"); + // This is useful only for Windows 10 UWP var launch = new JsonObject { - {"entityType", JsonValue.CreateStringValue(entityType)}, + {"entityType", JsonValue.CreateStringValue(entity.GetType().Name)}, {"entityId", JsonValue.CreateStringValue(entity.Id)} }; ((XmlElement)toastNode)?.SetAttribute("launch", launch.Stringify()); diff --git a/ModernKeePass/Strings/en-US/CodeBehind.resw b/ModernKeePass/Strings/en-US/CodeBehind.resw index 5314966..224f4ac 100644 --- a/ModernKeePass/Strings/en-US/CodeBehind.resw +++ b/ModernKeePass/Strings/en-US/CodeBehind.resw @@ -135,48 +135,6 @@ Database composite key updated. - - Your product has already been purchased. - - - Purchase - - - No purchased product to fulfill - - - Fulfillment - - - The purchase failed because we haven't confirmed fulfillment of a previous purchase. - - - Purchase - - - The purchase is pending so we cannot fulfill the product. - - - Purchase - - - Your purchase has been reverted. - - - Purchase - - - Impossible to contact the Windows Store, there was an error when fulfilling. - - - Error - - - Your donation was successful. - - - Thank you! - Delete diff --git a/ModernKeePass/Strings/fr-FR/CodeBehind.resw b/ModernKeePass/Strings/fr-FR/CodeBehind.resw index c7e8214..875639b 100644 --- a/ModernKeePass/Strings/fr-FR/CodeBehind.resw +++ b/ModernKeePass/Strings/fr-FR/CodeBehind.resw @@ -135,48 +135,6 @@ Clé composite de la base de données mise à jour. - - Vous avez déjà acheté ce produit. - - - Achat - - - Il n'y a aucun produit acheté à valider. - - - Validation - - - L'achat a échoué parce que nous n'avons pas pu valider un achat précédent. - - - Achat - - - Un achat est en cours donc nous ne pouvons le valider. - - - Achat - - - Votre achat a été annulé. - - - Achat - - - Impossible de contacter le Windows Store, l'achat n'a pas été réalisé. - - - Erreur - - - Votre don a été enregistré. - - - Merci! - Supprimer