瀏覽代碼

localize health check

Armin Schrenk 3 年之前
父節點
當前提交
747ebaea7c

+ 2 - 2
src/main/resources/fxml/health_check_details.fxml

@@ -23,8 +23,8 @@
 	<Label text="%health.check.detail.checkSkipped" visible="${controller.checkSkipped}" managed="${controller.checkSkipped}"/>
 	<Label text="%health.check.detail.checkCancelled" visible="${controller.checkCancelled}" managed="${controller.checkCancelled}"/>
 	<Label text="%health.check.detail.checkFailed" visible="${controller.checkFailed}" managed="${controller.checkFailed}"/>
-	<Label text="%health.check.detail.checkSucceeded" visible="${controller.checkSucceeded &amp;&amp; !controller.warnOrCritsExist}" managed="${controller.checkSucceeded &amp;&amp; !controller.warnOrCritsExist}"/>
-	<Label text="TODO: check finished and found something" visible="${controller.checkSucceeded &amp;&amp; controller.warnOrCritsExist}" managed="${controller.checkSucceeded &amp;&amp; controller.warnOrCritsExist}"/>
+	<Label text="%health.check.detail.checkFinished" visible="${controller.checkSucceeded &amp;&amp; !controller.warnOrCritsExist}" managed="${controller.checkSucceeded &amp;&amp; !controller.warnOrCritsExist}"/>
+	<Label text="%health.check.detail.checkFinishedAndFound" visible="${controller.checkSucceeded &amp;&amp; controller.warnOrCritsExist}" managed="${controller.checkSucceeded &amp;&amp; controller.warnOrCritsExist}"/>
 
 	<ListView fx:id="resultsListView" VBox.vgrow="ALWAYS" visible="${!controller.checkSkipped}" fixedCellSize="25"/>
 </VBox>

+ 6 - 4
src/main/resources/fxml/health_check_list.fxml

@@ -25,10 +25,12 @@
 	<children>
 		<HBox spacing="12" VBox.vgrow="ALWAYS">
 			<ListView fx:id="checksListView" VBox.vgrow="ALWAYS" minWidth="175" maxWidth="175"/>
-			<VBox alignment="CENTER" visible="${!controller.mainRunStarted}"  managed="${!controller.mainRunStarted}" HBox.hgrow="ALWAYS">
-				<Label text="TODO: Introductory/Explanatory Text? "/>
-				<Button onAction="#selectAllChecks" text="%health.checkList.selectAllBox" />
-				<Button onAction="#deselectAllChecks" text="TODO:Deselect all Checks" />
+			<VBox alignment="CENTER" visible="${!controller.mainRunStarted}"  managed="${!controller.mainRunStarted}" HBox.hgrow="ALWAYS" spacing="12">
+				<Label text="%health.checkList.description" wrapText="true"/>
+				<HBox alignment="CENTER">
+					<Button onAction="#selectAllChecks" text="%health.checkList.selectAllButton" />
+					<Button onAction="#deselectAllChecks" text="%health.checkList.deselectAllButton" />
+				</HBox>
 			</VBox>
 			<StackPane visible="${controller.mainRunStarted}"  managed="${controller.mainRunStarted}" HBox.hgrow="ALWAYS">
 				<VBox minWidth="300" alignment="CENTER" visible="${!controller.anyCheckSelected}" managed="${!controller.anyCheckSelected}" >

+ 6 - 6
src/main/resources/fxml/health_start.fxml

@@ -33,10 +33,10 @@
 				<padding>
 					<Insets topRightBottomLeft="12"/>
 				</padding>
-				<Label text="TODO:Health Check" styleClass="label-large"/>
+				<Label text="%health.intro.header" styleClass="label-large"/>
 				<Region minHeight="15"/>
 				<VBox>
-					<Label text="TODO: short text" wrapText="true"/>
+					<Label text="%health.intro.text" wrapText="true"/>
 					<GridPane alignment="CENTER_LEFT" >
 						<padding>
 							<Insets left="6"/>
@@ -51,14 +51,14 @@
 							<RowConstraints valignment="TOP"/>
 						</rowConstraints>
 						<Label text="1." GridPane.rowIndex="0" GridPane.columnIndex="0" />
-						<Label text="%vaultOptions.health.remarkSync" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="1" />
+						<Label text="%health.intro.remarkSync" wrapText="true" GridPane.rowIndex="0" GridPane.columnIndex="1" />
 						<Label text="2." GridPane.rowIndex="1" GridPane.columnIndex="0" />
-						<Label text="%vaultOptions.health.remarkFix" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="1" />
+						<Label text="%health.intro.remarkFix" wrapText="true" GridPane.rowIndex="1" GridPane.columnIndex="1" />
 						<Label text="3." GridPane.rowIndex="2" GridPane.columnIndex="0" />
-						<Label text="%vaultOptions.health.remarkBackup" wrapText="true" GridPane.rowIndex="2" GridPane.columnIndex="1" />
+						<Label text="%health.intro.remarkBackup" wrapText="true" GridPane.rowIndex="2" GridPane.columnIndex="1" />
 					</GridPane>
 					<Region minHeight="15"/>
-					<CheckBox text="%vaultOptions.health.affirmation" fx:id="affirmationBox"/>
+					<CheckBox text="%health.intro.affirmation" fx:id="affirmationBox"/>
 				</VBox>
 			</VBox>
 		</HBox>

+ 4 - 4
src/main/resources/fxml/health_start_fail.fxml

@@ -18,10 +18,10 @@
 	<padding>
 		<Insets topRightBottomLeft="12"/>
 	</padding>
-	<Label text="TODO: Error on loading" />
-	<FormattedLabel format="TODO: Error reading file: %s" arg1="${controller.localizedErrorMessage}" visible="${controller.ioException}" managed="${controller.ioException}"/>
-	<Label text="TODO: Malformed vault config" visible="${controller.parseException}" managed="${controller.parseException}"/>
-	<TitledPane fx:id="moreInfoPane" text="TODO: More" expanded="false" contentDisplay="LEFT" >
+	<Label text="%health.fail.header" styleClass="label-large" />
+	<FormattedLabel fx:id="ioErrorLabel" format="%health.fail.ioError" arg1="${controller.localizedErrorMessage}" visible="${controller.ioException}" managed="${controller.ioException}"/>
+	<Label fx:id="parseErrorLabel" text="%health.fail.parseError" visible="${controller.parseException}" managed="${controller.parseException}"/>
+	<TitledPane fx:id="moreInfoPane" text="%health.fail.moreInfo" expanded="false" contentDisplay="LEFT" >
 		<graphic>
 			<HBox alignment="CENTER" minWidth="8">
 				<FontAwesome5IconView glyph="${controller.moreInfoIcon}"/>

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

@@ -41,7 +41,7 @@
 			<ChoiceBox fx:id="actionAfterUnlockChoiceBox"/>
 		</HBox>
 
-		<Button fx:id="healthCheckButton" text="%vaultOptions.health.startBtn" onAction="#startHealthCheck">
+		<Button fx:id="healthCheckButton" text="%vaultOptions.general.startBtn" onAction="#startHealthCheck">
 			<graphic>
 				<FontAwesome5IconView glyph="STETHOSCOPE"/>
 			</graphic>

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

@@ -44,6 +44,6 @@
 			<Label text="%vaultOptions.health.remarkBackup" wrapText="true" GridPane.rowIndex="2" GridPane.columnIndex="1" />
 		</GridPane>
 		<CheckBox text="%vaultOptions.health.affirmation" fx:id="affirmationBox"/>
-		<Button text="%vaultOptions.health.startBtn" disable="${!affirmationBox.selected}" onAction="#startHealthCheck"/>
+		<Button text="%vaultOptions.general.startBtn" disable="${!affirmationBox.selected}" onAction="#startHealthCheck"/>
 	</children>
 </VBox>

+ 21 - 13
src/main/resources/i18n/strings.properties

@@ -147,16 +147,31 @@ migration.impossible.reason=The vault cannot be automatically migrated because i
 migration.impossible.moreInfo=The vault can still be opened with an older version. For instructions on how to manually migrate a vault, visit
 
 # Health Check
-health.title=Health Check of \"%s\"
-health.checkList.selectAllBox=Select All
+## Start
+health.title=Health Check of "%s"
+health.intro.header=Health Check
+health.intro.text=Health Check is a collection of checks to detect and possibly fix problems in the internal structure of your vault. Please keep in mind:
+health.intro.remarkSync=Ensure all devices are completely synced, this resolves most problems.
+health.intro.remarkFix=Not all problems can be fixed.
+health.intro.remarkBackup=If data is corrupted, only a backup can help.
+health.intro.affirmation=I have read and understood the above information
+## Start Failure
+health.fail.header=Error on loading Vault Configuration
+health.fail.ioError=An error happened while accessing and reading the config file : "%s" 
+health.fail.parseError=An error happened while parsing the vault config.
+health.fail.moreInfo=More Info:
+## Check Selection
+health.checkList.description=Select checks in the left list or use the buttons below.
+health.checkList.selectAllButton=Select All Checks
+health.checkList.deselectAllButton=Deselect All Checks
 health.check.runBatchBtn=Run Selected Checks
 ## Detail view
 health.check.detail.noSelectedCheck=For results select a finished health check in the left list.
-health.check.detail.header=Results of %s
 health.check.detail.checkScheduled=The check is scheduled.
 health.check.detail.checkRunning=The check is currently running…
 health.check.detail.checkSkipped=The check was not selected to run.
-health.check.detail.checkSucceeded=The check finished successfully.
+health.check.detail.checkFinished=The check finished successfully.
+health.check.detail.checkFinishedAndFound=The check finished with results needed to be viewed .
 health.check.detail.checkFailed=The check exited due to an error.
 health.check.detail.checkCancelled=The check was cancelled.
 health.check.exportBtn=Export Report
@@ -303,6 +318,8 @@ vaultOptions.general.actionAfterUnlock=After successful unlock
 vaultOptions.general.actionAfterUnlock.ignore=Do nothing
 vaultOptions.general.actionAfterUnlock.reveal=Reveal Drive
 vaultOptions.general.actionAfterUnlock.ask=Ask
+vaultOptions.general.startBtn=Start Health Check
+
 ## Mount
 vaultOptions.mount=Mounting
 vaultOptions.mount.readonly=Read-Only
@@ -321,15 +338,6 @@ vaultOptions.masterkey.forgetSavedPasswordBtn=Forget Saved Password
 vaultOptions.masterkey.recoveryKeyExplanation=A recovery key is your only means to restore access to a vault if you lose your password.
 vaultOptions.masterkey.showRecoveryKeyBtn=Display Recovery Key
 vaultOptions.masterkey.recoverPasswordBtn=Recover Password
-## Health
-vaultOptions.health=Health Check
-vaultOptions.health.startBtn=Start Health Check
-vaultOptions.health.introduction=Health Check is a collection of checks to detect and possibly fix problems in the internal structure of your vault.
-vaultOptions.health.remarks=Please keep in mind:
-vaultOptions.health.remarkSync=Incomplete synchronisation causes most problems. Ensure that every device is completely synced.
-vaultOptions.health.remarkFix=Not all problems can be fixed.
-vaultOptions.health.remarkBackup=If data is corrupted, only a backup can help.
-vaultOptions.health.affirmation=I have read and understood the above information.
 
 
 # Recovery Key