diff options
author | Kenny Root <kenny@the-b.org> | 2009-06-27 05:40:50 +0000 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2009-06-27 05:40:50 +0000 |
commit | a3b3e8b14c5a9468aafc1925b3e9763a56269472 (patch) | |
tree | 54a8687be76063dbd1bcde0bcab5bbe9fc5ef088 /src/org/connectbot/transport | |
parent | 9184616dc5e0c02d646a0dd6d86b97567f1810f6 (diff) | |
download | connectbot-a3b3e8b14c5a9468aafc1925b3e9763a56269472.tar.gz connectbot-a3b3e8b14c5a9468aafc1925b3e9763a56269472.tar.bz2 connectbot-a3b3e8b14c5a9468aafc1925b3e9763a56269472.zip |
Externalize the last few strings lingering in SSH and TerminalBridge
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@339 df292f66-193f-0410-a5fc-6d59da041ff2
Diffstat (limited to 'src/org/connectbot/transport')
-rw-r--r-- | src/org/connectbot/transport/SSH.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/org/connectbot/transport/SSH.java b/src/org/connectbot/transport/SSH.java index 3e3af20..f34f791 100644 --- a/src/org/connectbot/transport/SSH.java +++ b/src/org/connectbot/transport/SSH.java @@ -155,13 +155,13 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC switch(hosts.verifyHostkey(matchName, serverHostKeyAlgorithm, serverHostKey)) { case KnownHosts.HOSTKEY_IS_OK: - bridge.outputLine(String.format("Verified host %s key: %s", algorithmName, fingerprint)); + bridge.outputLine(manager.res.getString(R.string.terminal_sucess, algorithmName, fingerprint)); return true; case KnownHosts.HOSTKEY_IS_NEW: // prompt user - bridge.outputLine(String.format(manager.res.getString(R.string.host_authenticity_warning), hostname)); - bridge.outputLine(String.format(manager.res.getString(R.string.host_fingerprint), algorithmName, fingerprint)); + bridge.outputLine(manager.res.getString(R.string.host_authenticity_warning, hostname)); + bridge.outputLine(manager.res.getString(R.string.host_fingerprint, algorithmName, fingerprint)); result = bridge.promptHelper.requestBooleanPrompt(null, manager.res.getString(R.string.prompt_continue_connecting)); if(result == null) return false; @@ -212,7 +212,7 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC Log.d(TAG, "Host does not support 'none' authentication."); } - bridge.outputLine("Trying to authenticate"); + bridge.outputLine(manager.res.getString(R.string.terminal_auth)); try { long pubkeyId = host.getPubkeyId(); @@ -240,7 +240,7 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC } } } else { - bridge.outputLine("Attempting 'publickey' authentication with a specific public key"); + bridge.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); @@ -255,7 +255,7 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC } else if (connection.isAuthMethodAvailable(host.getUsername(), AUTH_PASSWORD)) { bridge.outputLine(manager.res.getString(R.string.terminal_auth_pass)); String password = bridge.getPromptHelper().requestStringPrompt(null, - manager.res.getString(R.string.terminal_auth_pass_hint)); + manager.res.getString(R.string.prompt_password)); if (password != null && connection.authenticateWithPassword(host.getUsername(), password)) { finishConnection(); @@ -353,7 +353,7 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC //bridge.outputLine(String.format("Attempting 'publickey' with key '%s' [%s]...", keyNickname, trileadKey.toString())); boolean success = connection.authenticateWithPublicKey(username, trileadKey); if(!success) - bridge.outputLine(String.format("Authentication method 'publickey' with key '%s' failed", keyNickname)); + bridge.outputLine(manager.res.getString(R.string.terminal_auth_pubkey_fail, keyNickname)); return success; } @@ -367,14 +367,14 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC for (PortForwardBean portForward : portForwards) { try { enablePortForward(portForward); - bridge.outputLine(String.format("Enable port forward: %s", portForward.getDescription())); + bridge.outputLine(manager.res.getString(R.string.terminal_enable_portfoward, portForward.getDescription())); } catch (Exception e) { Log.e(TAG, "Error setting up port forward during connect", e); } } if (!host.getWantSession()) { - bridge.outputLine("Session will not be started due to host preference."); + bridge.outputLine(manager.res.getString(R.string.terminal_no_session)); bridge.onConnected(); return; } @@ -431,17 +431,17 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC .equals(connectionInfo.serverToClientCryptoAlgorithm) && connectionInfo.clientToServerMACAlgorithm .equals(connectionInfo.serverToClientMACAlgorithm)) { - bridge.outputLine(String.format("Using algorithm: %s %s", + bridge.outputLine(manager.res.getString(R.string.terminal_using_algorithm, connectionInfo.clientToServerCryptoAlgorithm, connectionInfo.clientToServerMACAlgorithm)); } else { - bridge.outputLine(String.format( - "Client-to-server algorithm: %s %s", + bridge.outputLine(manager.res.getString( + R.string.terminal_using_c2s_algorithm, connectionInfo.clientToServerCryptoAlgorithm, connectionInfo.clientToServerMACAlgorithm)); - bridge.outputLine(String.format( - "Server-to-client algorithm: %s %s", + bridge.outputLine(manager.res.getString( + R.string.terminal_using_s2c_algorithm, connectionInfo.serverToClientCryptoAlgorithm, connectionInfo.serverToClientMACAlgorithm)); } |