Translate pwman prompts

This commit is contained in:
crschnick committed 2026-06-24 08:16:09 +00:00
1 parent aa00541aaf
commit ce759ff330
23 files changed
+117 -14

No files matched your search

@@ -324,7 +324,7 @@ public class BitwardenPasswordManager implements PasswordManager {
}
if (r[1].contains("Vault is locked")) {
var pw = AskpassAlert.queryRaw("Unlock vault with your Bitwarden master password", null, false);
var pw = AskpassAlert.queryRaw(AppI18n.get("bitwardenUnlock"), null, false);
if (pw.getSecret() == null) {
return false;
}
@@ -1,6 +1,7 @@
package io.xpipe.app.pwman;
import io.xpipe.app.comp.base.ContextualFileReferenceChoiceComp;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.AppSystemInfo;
import io.xpipe.app.ext.ProcessControlProvider;
import io.xpipe.app.issue.ErrorEventFactory;
@@ -135,7 +136,7 @@ public class EnpassPasswordManager implements PasswordManager {
}
var pass = SecretManager.retrieve(
new SecretPromptStrategy(), "Enter Enpass vault master password", MASTER_PASSWORD_UUID, 0, true);
new SecretPromptStrategy(), AppI18n.get("enpassUnlock"), MASTER_PASSWORD_UUID, 0, true);
if (pass == null) {
return null;
}
@@ -204,7 +204,7 @@ public class KeeperPasswordManager implements PasswordManager {
""";
return input;
} else {
var totp = AskpassAlert.queryRaw("Enter Keeper Commander SMS Code", null, false);
var totp = AskpassAlert.queryRaw(AppI18n.get("keeperSmsUnlock"), null, false);
if (totp.getState() != SecretQueryState.NORMAL) {
return null;
}
@@ -290,7 +290,7 @@ public class KeeperPasswordManager implements PasswordManager {
""";
return input;
} else {
var totp = AskpassAlert.queryRaw("Enter Keeper 2FA Code", null, false);
var totp = AskpassAlert.queryRaw(AppI18n.get("keeper2faUnlock"), null, false);
if (totp.getState() != SecretQueryState.NORMAL) {
return null;
}
@@ -531,7 +531,7 @@ public class KeeperPasswordManager implements PasswordManager {
var r = SecretManager.retrieve(
new SecretPromptStrategy(),
"Enter your Keeper master password to unlock",
AppI18n.get("keeperUnlock"),
KEEPER_PASSWORD_ID,
0,
true);
@@ -2,6 +2,7 @@ package io.xpipe.app.util;
import io.xpipe.app.comp.base.SecretFieldComp;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.mode.AppOperationMode;
import io.xpipe.app.core.window.AppSideWindow;
import io.xpipe.app.secret.SecretManager;
import io.xpipe.app.secret.SecretQueryResult;
@@ -23,6 +24,10 @@ import javafx.stage.Window;
public class AskpassAlert {
public static SecretQueryResult queryRaw(String prompt, InPlaceSecretValue secretValue, boolean stealFocus) {
if (AppOperationMode.isInShutdown()) {
return new SecretQueryResult(null, SecretQueryState.CANCELLED);
}
prompt = prompt.strip();
if (prompt.endsWith(":") || prompt.endsWith("?")) {
prompt = prompt.substring(0, prompt.length() - 1);
@@ -2,8 +2,11 @@ package io.xpipe.app.util;
import io.xpipe.app.comp.base.TextFieldComp;
import io.xpipe.app.core.AppI18n;
import io.xpipe.app.core.mode.AppOperationMode;
import io.xpipe.app.core.window.AppSideWindow;
import io.xpipe.app.secret.SecretQueryResult;
import io.xpipe.app.secret.SecretQueryState;
import javafx.animation.AnimationTimer;
import javafx.application.Platform;
import javafx.beans.property.SimpleObjectProperty;
@@ -16,6 +19,10 @@ import java.util.Optional;
public class AsktextAlert {
public static Optional<String> query(String prompt, String value) {
if (AppOperationMode.isInShutdown()) {
return Optional.empty();
}
var prop = new SimpleObjectProperty<>(value);
var r = AppSideWindow.showBlockingAlert(alert -> {
alert.setTitle(AppI18n.get("asktextAlertTitle"));