This commit is contained in:
Armin Schrenk
2026-02-16 10:13:21 +01:00
parent 0bec741c2b
commit 0b4d86768a
2 changed files with 5 additions and 10 deletions

View File

@@ -101,15 +101,10 @@ public class NotificationController implements FxController {
var device = userAndDevice.length == 1 ? userAndDevice[0] : userAndDevice[1];
var cleartextFileName = fiiue.cleartextPath().substring(fiiue.cleartextPath().lastIndexOf('/') + 1);
eventTimestamp.set(localizedTimeFormatter.format(fiiue.lastUpdated()));
message.set("File is locked by another device");
fileName.set(cleartextFileName);
description.set("The file is opened by %s on device %s. Ask the user to close the file and sync again. Otherwise, you can ignore the lock and open it anyway.".formatted(user, device));
actionText.set("Ignore Lock");
/* TODO: Once feature is out of beta, activate translations
message.set(resourceBundle.getString("notification.inUse.message"));
description.set(resourceBundle.getString("notification.inUse.description").formatted(fiiue.cleartextPath(), user, device));
fileName.set(cleartextFileName);
description.set(resourceBundle.getString("notification.inUse.description").formatted(user, device));
actionText.set(resourceBundle.getString("notification.inUse.action"));
*/
}
default -> {
message.set("NO CONTENT");

View File

@@ -723,6 +723,6 @@ eventView.entry.inUse.ignoreLock=Ignore Lock
# Notifications
## FileIsInUse Notification
#notification.inUse.message=File is locked
#notification.inUse.description=File %s is opened by user %s (%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
notification.inUse.message=File is locked by another device
notification.inUse.description=The file is opened by %s on device %s. Ask the user to close the file and sync again. Otherwise, you can ignore the lock and open it anyway.
notification.inUse.action=Ignore Lock