mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
Localizable file picker title
This commit is contained in:
@@ -14,6 +14,7 @@ import org.cryptomator.ui.model.VaultFactory;
|
||||
import javax.inject.Inject;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
@AddVaultWizardScoped
|
||||
public class ChooseExistingVaultController implements FxController {
|
||||
@@ -23,21 +24,22 @@ public class ChooseExistingVaultController implements FxController {
|
||||
private final ObjectProperty<Path> vaultPath;
|
||||
private final ObservableList<Vault> vaults;
|
||||
private final VaultFactory vaultFactory;
|
||||
private final ResourceBundle resourceBundle;
|
||||
|
||||
@Inject
|
||||
ChooseExistingVaultController(@AddVaultWizard Stage window, @AddVaultWizard FXMLLoaderFactory fxmlLoaders, ObjectProperty<Path> vaultPath, ObservableList<Vault> vaults, VaultFactory vaultFactory) {
|
||||
ChooseExistingVaultController(@AddVaultWizard Stage window, @AddVaultWizard FXMLLoaderFactory fxmlLoaders, ObjectProperty<Path> vaultPath, ObservableList<Vault> vaults, VaultFactory vaultFactory, ResourceBundle resourceBundle) {
|
||||
this.window = window;
|
||||
this.fxmlLoaders = fxmlLoaders;
|
||||
this.vaultPath = vaultPath;
|
||||
this.vaults = vaults;
|
||||
this.vaultFactory = vaultFactory;
|
||||
this.resourceBundle = resourceBundle;
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void chooseFile() {
|
||||
FileChooser fileChooser = new FileChooser();
|
||||
//TODO: Title is part of the localization. => inject resource bundle and get correct title
|
||||
fileChooser.setTitle("TODO Open Masterkey File");
|
||||
fileChooser.setTitle(resourceBundle.getString("addvaultwizard.existing.filePickerTitle"));
|
||||
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Cryptomator Masterkey", "*.cryptomator"));
|
||||
final File file = fileChooser.showOpenDialog(window);
|
||||
if (file != null) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
addvaultwizard.existing.instruction=Please choose the masterkey.cryptomator file of your existing vault
|
||||
addvaultwizard.existing.filePickerTitle=Open Masterkey File
|
||||
main.closeBtn.tooltip=Close
|
||||
main.settingsBtn.tooltip=Settings
|
||||
preferences.autoUpdateCheck=Check for updates automatically
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
addvaultwizard.existing.instruction=Please choose the masterkey.cryptomator file of your existing vault
|
||||
addvaultwizard.existing.filePickerTitle=Open Masterkey File
|
||||
main.closeBtn.tooltip=Close
|
||||
main.settingsBtn.tooltip=Settings
|
||||
preferences.autoUpdateCheck=Check for updates automatically
|
||||
|
||||
Reference in New Issue
Block a user