From d746e9e21556a7f185931db62327af40774c9b74 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 12 Dec 2025 16:55:15 +0100 Subject: [PATCH] add translation to event --- .../ui/notification/NotificationController.java | 7 +++---- src/main/resources/i18n/strings.properties | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/notification/NotificationController.java b/src/main/java/org/cryptomator/ui/notification/NotificationController.java index 9fb9ec250..6ac5ce814 100644 --- a/src/main/java/org/cryptomator/ui/notification/NotificationController.java +++ b/src/main/java/org/cryptomator/ui/notification/NotificationController.java @@ -80,10 +80,9 @@ public class NotificationController implements FxController { vaultName.set(newEvent.v().getDisplayName()); switch (newEvent.actualEvent()) { case FileIsInUseEvent fiiue -> { - //TODO: Translations! - message.set("File is locked"); - description.set("The file %s is locked by user %s. Ask the user to close the file. Otherwise, you can ignore the lock and open it anyway.".formatted(fiiue.cleartextPath(), fiiue.owner())); - actionText.set("Ignore Lock"); + message.set(resourceBundle.getString("notification.inUse.message")); + description.set(resourceBundle.getString("notification.inUse.description").formatted(fiiue.cleartextPath(), fiiue.owner())); + actionText.set(resourceBundle.getString("notification.inUse.action")); } default -> { message.set("NO CONTENT"); diff --git a/src/main/resources/i18n/strings.properties b/src/main/resources/i18n/strings.properties index ac631abe2..a22aa86ab 100644 --- a/src/main/resources/i18n/strings.properties +++ b/src/main/resources/i18n/strings.properties @@ -696,3 +696,9 @@ eventView.entry.brokenFileNode.message=Broken filesystem node eventView.entry.brokenFileNode.showEncrypted=Show broken, encrypted node eventView.entry.brokenFileNode.copyEncrypted=Copy path of broken, encrypted node eventView.entry.brokenFileNode.copyDecrypted=Copy decrypted path + +# Notifications +## FileIsInUse Notification +notification.inUse.message=File is locked +notification.inUse.description=File %s is opened by user %s. Ask the user to close the file. Otherwise, you can ignore the lock and open it anyway, but be aware of the data loss risk! +notification.inUse.action=Ignore Lock \ No newline at end of file