From 8f5688cbd6c59bd642d67b3218b43a0de1cf6ee4 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 5 Jun 2009 18:29:45 +0000 Subject: Externalize some strings to match the transports branch git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@271 df292f66-193f-0410-a5fc-6d59da041ff2 --- src/org/connectbot/service/TerminalBridge.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/org/connectbot/service/TerminalBridge.java b/src/org/connectbot/service/TerminalBridge.java index 5123158..82d1ce5 100644 --- a/src/org/connectbot/service/TerminalBridge.java +++ b/src/org/connectbot/service/TerminalBridge.java @@ -525,7 +525,7 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener, InteractiveCal Log.d(TAG, "Host does not support 'none' authentication."); } - outputLine("Trying to authenticate"); + outputLine(manager.res.getString(R.string.terminal_auth)); try { long pubkeyId = host.getPubkeyId(); @@ -539,7 +539,7 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener, InteractiveCal if (pubkeyId == HostDatabase.PUBKEYID_ANY) { // try each of the in-memory keys - outputLine("Attempting 'publickey' authentication with any in-memory SSH keys"); + outputLine(manager.res.getString(R.string.terminal_auth_pubkey_any)); for(String nickname : manager.loadedPubkeys.keySet()) { Object trileadKey = manager.loadedPubkeys.get(nickname); if(this.tryPublicKey(host.getUsername(), nickname, trileadKey)) { @@ -548,12 +548,12 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener, InteractiveCal } } } else { - outputLine("Attempting 'publickey' authentication with a specific public key"); + outputLine(manager.res.getString(R.string.terminal_auth_pubkey_specific)); // use a specific key for this host, as requested PubkeyBean pubkey = manager.pubkeydb.findPubkeyById(pubkeyId); if (pubkey == null) - outputLine("Selected public key is invalid, try reselecting key in host editor"); + outputLine(manager.res.getString(R.string.terminal_auth_pubkey_invalid)); else if (tryPublicKey(pubkey)) finishConnection(); @@ -561,28 +561,28 @@ public class TerminalBridge implements VDUDisplay, OnKeyListener, InteractiveCal pubkeysExhausted = true; } else if (connection.isAuthMethodAvailable(host.getUsername(), AUTH_PASSWORD)) { - outputLine("Attempting 'password' authentication"); + outputLine(manager.res.getString(R.string.terminal_auth_pass)); String password = promptHelper.requestStringPrompt(null, manager.res.getString(R.string.prompt_password)); if (password != null && connection.authenticateWithPassword(host.getUsername(), password)) { finishConnection(); } else { - outputLine("Authentication method 'password' failed"); + outputLine(manager.res.getString(R.string.terminal_auth_pass_fail)); } } else if(connection.isAuthMethodAvailable(host.getUsername(), AUTH_KEYBOARDINTERACTIVE)) { // this auth method will talk with us using InteractiveCallback interface // it blocks until authentication finishes - outputLine("Attempting 'keyboard-interactive' authentication"); + outputLine(manager.res.getString(R.string.terminal_auth_ki)); if(connection.authenticateWithKeyboardInteractive(host.getUsername(), TerminalBridge.this)) { finishConnection(); } else { - outputLine("Authentication method 'keyboard-interactive' failed"); + outputLine(manager.res.getString(R.string.terminal_auth_ki_fail)); } } else { - outputLine("[Your host doesn't support 'password' or 'keyboard-interactive' authentication.]"); + outputLine(manager.res.getString(R.string.terminal_auth_fail)); } } catch(Exception e) { -- cgit v1.2.3