some ui and wording changes

This commit is contained in:
Jan-Peter Klein
2023-11-02 13:47:58 +01:00
parent 31fcf294e9
commit 77f9e6c411
5 changed files with 15 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ import javafx.concurrent.Task;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
import java.util.ResourceBundle;
/**
* A multi-step task that consists of background activities as well as user interaction.
@@ -35,6 +36,7 @@ public class UnlockWorkflow extends Task<Boolean> {
private static final Logger LOG = LoggerFactory.getLogger(UnlockWorkflow.class);
private final Stage window;
private final ResourceBundle resourceBundle;
private final Vault vault;
private final VaultService vaultService;
private final Lazy<Scene> successScene;
@@ -46,6 +48,7 @@ public class UnlockWorkflow extends Task<Boolean> {
@Inject
UnlockWorkflow(@UnlockWindow Stage window, //
ResourceBundle resourceBundle,
@UnlockWindow Vault vault, //
VaultService vaultService, //
@FxmlScene(FxmlFile.UNLOCK_SUCCESS) Lazy<Scene> successScene, //
@@ -55,6 +58,7 @@ public class UnlockWorkflow extends Task<Boolean> {
@UnlockWindow KeyLoadingStrategy keyLoadingStrategy, //
@UnlockWindow ObjectProperty<IllegalMountPointException> illegalMountPointException) {
this.window = window;
this.resourceBundle = resourceBundle;
this.vault = vault;
this.vaultService = vaultService;
this.successScene = successScene;
@@ -99,6 +103,7 @@ public class UnlockWorkflow extends Task<Boolean> {
private void handleFuseRestartRequiredError(FuseRestartRequiredException fRRE) {
Platform.runLater(() -> {
window.setScene(fuseRestartRequiredScene.get());
window.setTitle(String.format(resourceBundle.getString("unlock.error.fuseRestartRequired.title"), vault.getDisplayName()));
window.show();
});
}

View File

@@ -367,7 +367,7 @@ public class MountOptionsController implements FxController {
@Override
public String toString(MountService provider) {
if (provider == null) {
return resourceBundle.getString("preferences.volume.type.default") + " (" + defaultMountService.getValue().displayName() + ")";
return String.format(resourceBundle.getString("vaultOptions.mount.volumeType.default"), defaultMountService.getValue().displayName());
} else {
return provider.displayName();
}