Browse Source

localized recovery key printout

Sebastian Stenzel 5 years ago
parent
commit
cdb0fb37a9

+ 3 - 4
main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyDisplayController.java

@@ -38,13 +38,12 @@ public class RecoveryKeyDisplayController implements FxController {
 
 	@FXML
 	public void printRecoveryKey() {
-		// TODO localize
-
 		PrinterJob job = PrinterJob.createPrinterJob();
 		if (job != null && job.showPrintDialog(window)) {
 			PageLayout pageLayout = job.getJobSettings().getPageLayout();
-
-			Text heading = new Text("Cryptomator Recovery Key\n" + vaultName + "\n");
+			
+			String headingText = String.format(localization.getString("recoveryKey.printout.heading"), vaultName);
+			Text heading = new Text(headingText);
 			heading.setFont(Font.font("serif", FontWeight.BOLD, 20));
 			heading.setFontSmoothingType(FontSmoothingType.LCD);
 

+ 1 - 0
main/ui/src/main/resources/i18n/strings.properties

@@ -215,6 +215,7 @@ recoveryKey.display.message=The following recovery key can be used to restore ac
 recoveryKey.display.StorageHints=Keep it somewhere very secure, e.g.:\n • Store it using a password manager\n • Save it on a USB flash drive\n • Print it on paper
 recoveryKey.recover.prompt=Enter your recovery key for "%s":
 recoveryKey.recover.validKey=This is a valid recovery key
+recoveryKey.printout.heading=Cryptomator Recovery Key\n"%s"\n
 
 # New Password
 newPassword.promptText=Enter a new password