Browse Source

renaming and reordering

Jan-Peter Klein 5 days ago
parent
commit
2b79c58577

+ 13 - 13
src/main/java/org/cryptomator/ui/dialogs/Dialogs.java

@@ -49,28 +49,28 @@ public class Dialogs {
 				});
 	}
 
-	public SimpleDialog.Builder prepareContactHubAdmin(Stage window) {
+	public SimpleDialog.Builder prepareContactHubVaultOwner(Stage window) {
 		return createDialogBuilder().setOwner(window) //
-				.setTitleKey("contactHubAdmin.title") //
-				.setMessageKey("contactHubAdmin.message") //
-				.setDescriptionKey("contactHubAdmin.description") //
+				.setTitleKey("contactHubVaultOwner.title") //
+				.setMessageKey("contactHubVaultOwner.message") //
+				.setDescriptionKey("contactHubVaultOwner.description") //
 				.setIcon(FontAwesome5Icon.EXCLAMATION)//
 				.setOkButtonKey(BUTTON_KEY_CLOSE);
 	}
 
 	public SimpleDialog.Builder prepareRecoveryVaultAdded(Stage window, String displayName) {
 		return createDialogBuilder().setOwner(window) //
-				.setTitleKey("recoveryKey.recoverExisting.title") //
-				.setMessageKey("recoveryKey.recoverExisting.message") //
-				.setDescriptionKey("recoveryKey.recoverExisting.description", displayName) //
+				.setTitleKey("recover.existing.title") //
+				.setMessageKey("recover.existing.message") //
+				.setDescriptionKey("recover.existing.description", displayName) //
 				.setIcon(FontAwesome5Icon.CHECK)//
 				.setOkButtonKey(BUTTON_KEY_CLOSE);
 	}
 	public SimpleDialog.Builder prepareRecoveryVaultAlreadyExists(Stage window, String displayName) {
 		return createDialogBuilder().setOwner(window) //
-				.setTitleKey("recoveryKey.alreadyExists.title") //
-				.setMessageKey("recoveryKey.alreadyExists.message") //
-				.setDescriptionKey("recoveryKey.alreadyExists.description", displayName) //
+				.setTitleKey("recover.alreadyExists.title") //
+				.setMessageKey("recover.alreadyExists.message") //
+				.setDescriptionKey("recover.alreadyExists.description", displayName) //
 				.setIcon(FontAwesome5Icon.EXCLAMATION)//
 				.setOkButtonKey(BUTTON_KEY_CLOSE);
 	}
@@ -130,9 +130,9 @@ public class Dialogs {
 	public SimpleDialog.Builder prepareNoDDirectorySelectedDialog(Stage window) {
 		return createDialogBuilder() //
 				.setOwner(window) //
-				.setTitleKey("recoveryKey.noDDirDetected.title") //
-				.setMessageKey("recoveryKey.noDDirDetected.message") //
-				.setDescriptionKey("recoveryKey.noDDirDetected.description") //
+				.setTitleKey("recover.invalidSelection.title") //
+				.setMessageKey("recover.invalidSelection.message") //
+				.setDescriptionKey("recover.invalidSelection.description") //
 				.setIcon(FontAwesome5Icon.EXCLAMATION) //
 				.setOkButtonKey("generic.button.change") //
 				.setOkAction(Stage::close);

+ 1 - 1
src/main/java/org/cryptomator/ui/mainwindow/VaultDetailMissingVaultController.java

@@ -69,7 +69,7 @@ public class VaultDetailMissingVaultController implements FxController {
 	@FXML
 	void restoreVaultConfig() {
 		if(KeyLoadingStrategy.isHubVault(vault.get().getVaultSettings().lastKnownKeyLoader.get())){
-			dialogs.prepareContactHubAdmin(window).build().showAndWait();
+			dialogs.prepareContactHubVaultOwner(window).build().showAndWait();
 		}
 		else if(Files.exists(vault.get().getPath().resolve(MASTERKEY_FILENAME))){
 			recoveryKeyWindow.create(vault.get(), window, new SimpleObjectProperty<>(RecoveryActionType.RESTORE_VAULT_CONFIG)).showOnboardingDialogWindow();

+ 2 - 2
src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java

@@ -100,7 +100,7 @@ public class RecoveryKeyCreationController implements FxController {
 		if (recoverType.get() == RecoveryActionType.SHOW_KEY) {
 			window.setTitle(resourceBundle.getString("recoveryKey.display.title"));
 		} else if (recoverType.get() == RecoveryActionType.RESTORE_VAULT_CONFIG) {
-			window.setTitle(resourceBundle.getString("recoveryKey.recoverVaultConfig.title"));
+			window.setTitle(resourceBundle.getString("recover.recoverVaultConfig.title"));
 			descriptionLabel.formatProperty().set(resourceBundle.getString("recoveryKey.recover.description"));
 			cancelButton.setOnAction((_) -> back());
 			cancelButton.setText(resourceBundle.getString("generic.button.back"));
@@ -158,7 +158,7 @@ public class RecoveryKeyCreationController implements FxController {
 			}
 			window.close();
 			dialogs.prepareRecoverPasswordSuccess(window) //
-					.setTitleKey("recoveryKey.recoverVaultConfig.title") //
+					.setTitleKey("recover.recoverVaultConfig.title") //
 					.setMessageKey("recoveryKey.recover.resetVaultConfigSuccess.message") //
 					.setDescriptionKey("recoveryKey.recover.resetMasterkeyFileSuccess.description")
 					.build().showAndWait();

+ 11 - 11
src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyOnboardingController.java

@@ -68,7 +68,7 @@ public class RecoveryKeyOnboardingController implements FxController {
 										   ResourceBundle resourceBundle) {
 		this.window = window;
 		this.vault = vault;
-		window.setTitle(resourceBundle.getString("recoveryKey.recoverVaultConfig.title"));
+		window.setTitle(resourceBundle.getString("recover.recoverVaultConfig.title"));
 
 		this.recoverykeyRecoverScene = recoverykeyRecoverScene;
 		this.recoverykeyExpertSettingsScene = recoverykeyExpertSettingsScene;
@@ -93,21 +93,21 @@ public class RecoveryKeyOnboardingController implements FxController {
 
 		switch (recoverType.get()) {
 			case RESTORE_MASTERKEY ->
-					window.setTitle(resourceBundle.getString("recoveryKey.recoverMasterkey.title"));
+					window.setTitle(resourceBundle.getString("recover.recoverMasterkey.title"));
 			case RESTORE_ALL, RESTORE_VAULT_CONFIG ->
-					window.setTitle(resourceBundle.getString("recoveryKey.recoverVaultConfig.title"));
+					window.setTitle(resourceBundle.getString("recover.recoverVaultConfig.title"));
 			default -> window.setTitle("");
 		}
 
 		messageLabel.textProperty().bind(Bindings.createStringBinding(() ->
 				vault.getState() == VaultState.Value.ALL_MISSING
-				? resourceBundle.getString("recoveryKey.recover.onBoarding.message")
-				: resourceBundle.getString("recoveryKey.recover.onBoarding.readThis")));
+				? resourceBundle.getString("recover.onBoarding.allMissing.intro")
+				: resourceBundle.getString("recover.onBoarding.intro")));
 
 		titleLabel.textProperty().bind(Bindings.createStringBinding(() ->
 				recoverType.get() == RecoveryActionType.RESTORE_MASTERKEY
-						? resourceBundle.getString("recoveryKey.recoverMasterkey.title")
-						: resourceBundle.getString("recoveryKey.recoverVaultConfig.title"), recoverType));
+						? resourceBundle.getString("recover.recoverMasterkey.title")
+						: resourceBundle.getString("recover.recoverVaultConfig.title"), recoverType));
 
 		BooleanBinding isMaster = Bindings.createBooleanBinding(
 				() -> recoverType.get() == RecoveryActionType.RESTORE_MASTERKEY, recoverType);
@@ -118,10 +118,10 @@ public class RecoveryKeyOnboardingController implements FxController {
 			Toggle sel = methodToggleGroup.getSelectedToggle();
 			return switch (type) {
 				case RESTORE_VAULT_CONFIG -> resourceBundle.getString(sel == passwordRadio
-						? "recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.password"
-						: "recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.recoveryKey");
-				case RESTORE_MASTERKEY -> resourceBundle.getString("recoveryKey.recover.onBoarding.recoverMasterkey.intro2");
-				case RESTORE_ALL       -> resourceBundle.getString("recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.recoveryKey");
+						? "recover.onBoarding.intro.password"
+						: "recover.onBoarding.intro.recoveryKey");
+				case RESTORE_MASTERKEY -> resourceBundle.getString("recover.onBoarding.intro.masterkey.recoveryKey");
+				case RESTORE_ALL       -> resourceBundle.getString("recover.onBoarding.intro.recoveryKey");
 				default                -> "";
 			};
 		}, recoverType, methodToggleGroup.selectedToggleProperty()));

+ 2 - 2
src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java

@@ -48,11 +48,11 @@ public class RecoveryKeyRecoverController implements FxController {
 		this.recoverType = recoverType;
 		this.nextScene = switch (recoverType.get()) {
 			case RESTORE_ALL, RESTORE_VAULT_CONFIG -> {
-				window.setTitle(resourceBundle.getString("recoveryKey.recoverVaultConfig.title"));
+				window.setTitle(resourceBundle.getString("recover.recoverVaultConfig.title"));
 				yield expertSettingsScene;
 			}
 			case RESTORE_MASTERKEY -> {
-				window.setTitle(resourceBundle.getString("recoveryKey.recoverMasterkey.title"));
+				window.setTitle(resourceBundle.getString("recover.recoverMasterkey.title"));
 				yield resetPasswordScene;
 			}
 			case RESET_PASSWORD -> {

+ 2 - 2
src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java

@@ -139,7 +139,7 @@ public class RecoveryKeyResetPasswordController implements FxController {
 			}
 			window.close();
 			dialogs.prepareRecoverPasswordSuccess(window) //
-					.setTitleKey("recoveryKey.recoverVaultConfig.title") //
+					.setTitleKey("recover.recoverVaultConfig.title") //
 					.setMessageKey("recoveryKey.recover.resetVaultConfigSuccess.message") //
 					.build().showAndWait();
 
@@ -162,7 +162,7 @@ public class RecoveryKeyResetPasswordController implements FxController {
 			window.close();
 			switch (recoverType.get()){
 				case RESET_PASSWORD -> dialogs.prepareRecoverPasswordSuccess(window).build().showAndWait();
-				case RESTORE_MASTERKEY -> dialogs.prepareRecoverPasswordSuccess(window).setTitleKey("recoveryKey.recoverMasterkey.title").setMessageKey("recoveryKey.recover.resetMasterkeyFileSuccess.message").build().showAndWait();
+				case RESTORE_MASTERKEY -> dialogs.prepareRecoverPasswordSuccess(window).setTitleKey("recover.recoverMasterkey.title").setMessageKey("recoveryKey.recover.resetMasterkeyFileSuccess.message").build().showAndWait();
 			}
 		});
 

+ 1 - 1
src/main/resources/fxml/recoverykey_expert_settings.fxml

@@ -57,7 +57,7 @@
 					</tooltip>
 				</Hyperlink>
 			</HBox>
-			<Label text="%recoveryKey.recover.expertSettings.shorteningThreshold.title" wrapText="true"/>
+			<Label text="%recover.expertSettings.shorteningThreshold.title" wrapText="true"/>
 			<NumericTextField fx:id="shorteningThresholdTextField"/>
 			<HBox alignment="TOP_RIGHT">
 				<Region minWidth="4" prefWidth="4" HBox.hgrow="NEVER"/>

+ 8 - 8
src/main/resources/fxml/recoverykey_onboarding.fxml

@@ -39,19 +39,19 @@
 		</StackPane>
 	</Group>
 	<VBox HBox.hgrow="ALWAYS" spacing="12">
-		<Label fx:id="titleLabel" text="%recoveryKey.recoverVaultConfig.title" styleClass="label-extra-large"/>
+		<Label fx:id="titleLabel" text="%recover.recoverVaultConfig.title" styleClass="label-extra-large"/>
 		<VBox spacing="6">
 			<VBox fx:id="chooseMethodeBox" spacing="6">
-				<Label text="%recoveryKey.recover.onBoarding.chooseMethod"/>
-				<RadioButton fx:id="recoveryKeyRadio" text="%recoveryKey.recover.onBoarding.useRecoveryKey" selected="true">
+				<Label text="%recover.onBoarding.chooseMethod"/>
+				<RadioButton fx:id="recoveryKeyRadio" text="%recover.onBoarding.useRecoveryKey" selected="true">
 					<toggleGroup>
 						<ToggleGroup fx:id="methodToggleGroup"/>
 					</toggleGroup>
 				</RadioButton>
-				<RadioButton fx:id="passwordRadio" text="%recoveryKey.recover.onBoarding.usePassword"/>
+				<RadioButton fx:id="passwordRadio" text="%recover.onBoarding.usePassword"/>
 			</VBox>
 
-			<Label fx:id="messageLabel" text="%recoveryKey.recover.onBoarding.message" wrapText="true"/>
+			<Label fx:id="messageLabel" wrapText="true"/>
 			<GridPane alignment="CENTER_LEFT">
 				<padding>
 					<Insets left="6"/>
@@ -66,11 +66,11 @@
 					<RowConstraints valignment="TOP"/>
 				</rowConstraints>
 				<Label text="1." GridPane.rowIndex="0" GridPane.columnIndex="0"/>
-				<Label text="%recoveryKey.recover.onBoarding.intro1" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="1"/>
+				<Label text="%recover.onBoarding.intro.ensure" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="1"/>
 				<Label text="2." GridPane.rowIndex="1" GridPane.columnIndex="0"/>
-				<Label fx:id="secondTextDesc" text="%recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.recoveryKey" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
+				<Label fx:id="secondTextDesc" text="%recover.onBoarding.intro.recoveryKey" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
 			</GridPane>
-			<CheckBox fx:id="affirmationBox" text="%recoveryKey.recover.onBoarding.affirmation"/>
+			<CheckBox fx:id="affirmationBox" text="%recover.onBoarding.affirmation"/>
 		</VBox>
 
 		<Region VBox.vgrow="ALWAYS"/>

+ 42 - 35
src/main/resources/i18n/strings.properties

@@ -110,11 +110,6 @@ removeVault.title=Remove "%s"
 removeVault.message=Remove vault?
 removeVault.description=This will only make Cryptomator forget about this vault. You can add it again. No encrypted files will be deleted from your hard drive.
 
-# Contact Hub Admin
-contactHubAdmin.title=Hub Vault
-contactHubAdmin.message=This vault was created with Cryptomator Hub
-contactHubAdmin.description=Please reach out to the vault owner to restore the missing file. They can download the vault template from Cryptomator Hub.
-
 # Change Password
 changepassword.title=Change Password
 changepassword.enterOldPassword=Enter the current password for "%s"
@@ -530,36 +525,48 @@ recoveryKey.recover.resetVaultConfigSuccess.message=Vault config reset successfu
 recoveryKey.recover.resetMasterkeyFileSuccess.message=Masterkey file reset successful
 recoveryKey.recover.resetMasterkeyFileSuccess.description=You can unlock your vault with your password now.
 
-### Recover Kram
-recoveryKey.recoverExisting.title=Vault Added
-recoveryKey.recoverExisting.message=The vault was added successfully
-recoveryKey.recoverExisting.description=Your vault "%s" has been added to your vault list. No recovery process was started.
-
-recoveryKey.alreadyExists.title=Vault Already Exists
-recoveryKey.alreadyExists.message=This vault has already been added
-recoveryKey.alreadyExists.description=Your vault "%s" is already present in your vault list and was therefore not added again.
-
-recoveryKey.noDDirDetected.title=Invalid Selection
-recoveryKey.noDDirDetected.message=Your selection is not a vault
-recoveryKey.noDDirDetected.description=The selected folder must be a valid Cryptomator vault.
-
-recoveryKey.recoverVaultConfig.title=Recover Vault Config
-recoveryKey.recoverMasterkey.title=Recover Masterkey
-
-recoveryKey.recover.expertSettings.shorteningThreshold.title=This value must match the one used before recovery to ensure compatibility with previously encrypted data.
-
-recoveryKey.recover.onBoarding.readThis=Make sure to check the following:
-recoveryKey.recover.onBoarding.message=If your vault is a Hub vault, the vault owner can restore the file for you. Otherwise:
-recoveryKey.recover.onBoarding.intro1=Ensure all files are completely synced.
-recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.recoveryKey=You will need the recovery key, a new vault password and possibly some expert settings.
-recoveryKey.recover.onBoarding.recoverVaultConfig.intro2.password=You will need the vault password and possibly some expert settings.
-recoveryKey.recover.onBoarding.recoverMasterkey.intro2=You will need the vault recovery key.
-
-recoveryKey.recover.onBoarding.chooseMethod=Choose recovery method:
-recoveryKey.recover.onBoarding.useRecoveryKey=Use Recovery Key
-recoveryKey.recover.onBoarding.usePassword=Use Password
-recoveryKey.recover.onBoarding.affirmation=I have read and understood the above information
-
+# Recover Vault Config File and/or Masterkey
+##Add Existing Vault without recovery - Dialog
+recover.existing.title=Vault Added
+recover.existing.message=The vault was added successfully
+recover.existing.description=Your vault "%s" has been added to your vault list. No recovery process was started.
+
+##Vault Already Exists - Dialog
+recover.alreadyExists.title=Vault Already Exists
+recover.alreadyExists.message=This vault has already been added
+recover.alreadyExists.description=Your vault "%s" is already present in your vault list and was therefore not added again.
+
+##Invalid Selection - Dialog
+recover.invalidSelection.title=Invalid Selection
+recover.invalidSelection.message=Your selection is not a vault
+recover.invalidSelection.description=The selected folder must be a valid Cryptomator vault.
+
+## Contact Hub Vault Owner - Dialog
+contactHubVaultOwner.title=Hub Vault
+contactHubVaultOwner.message=This vault was created with Cryptomator Hub
+contactHubVaultOwner.description=Please reach out to the vault owner to restore the missing file. They can download the vault template from Cryptomator Hub.
+
+##Dialog Title
+recover.recoverVaultConfig.title=Recover Vault Config
+recover.recoverMasterkey.title=Recover Masterkey
+
+## OnBoarding
+recover.onBoarding.chooseMethod=Choose recovery method:
+recover.onBoarding.useRecoveryKey=Use Recovery Key
+recover.onBoarding.usePassword=Use Password
+recover.onBoarding.intro=Make sure to check the following:
+recover.onBoarding.allMissing.intro=If your vault is a Hub vault, the vault owner can restore the file for you. Otherwise:
+recover.onBoarding.intro.ensure=Ensure all files are completely synced.
+recover.onBoarding.affirmation=I have read and understood the above information
+
+###Vault Config Missing
+recover.onBoarding.intro.recoveryKey=You will need the recovery key, a new vault password and possibly some expert settings.
+recover.onBoarding.intro.password=You will need the vault password and possibly some expert settings.
+###Masterkey Missing
+recover.onBoarding.intro.masterkey.recoveryKey=You will need the vault recovery key.
+
+## Expert Settings
+recover.expertSettings.shorteningThreshold.title=This value must match the one used before recovery to ensure compatibility with previously encrypted data.
 
 # Convert Vault
 convertVault.title=Convert Vault