From c310fa0c802f40a774edb58641de3ac5bfad0e2c Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sun, 25 Nov 2012 17:17:20 +0100 Subject: Mark non-externalizable strings as such A few classes such as Constanrs are marked with @SuppressWarnings, as are toString() methods with many liternal, but otherwise $NLS-n$ is used for string containing text that should not be translated. A few literals may fall into the gray zone, but mostly I've tried to only tag the obvious ones. Change-Id: I22e50a77e2bf9e0b842a66bdf674e8fa1692f590 --- .../src/org/eclipse/jgit/console/ConsoleAuthenticator.java | 8 ++++---- .../org/eclipse/jgit/console/ConsoleCredentialsProvider.java | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'org.eclipse.jgit.console/src/org') diff --git a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleAuthenticator.java b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleAuthenticator.java index 3df5e44331..941205af32 100644 --- a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleAuthenticator.java +++ b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleAuthenticator.java @@ -66,11 +66,11 @@ public class ConsoleAuthenticator extends CachedAuthenticator { @Override protected PasswordAuthentication promptPasswordAuthentication() { final String realm = formatRealm(); - String username = cons.readLine(MessageFormat.format(ConsoleText.get().usernameFor + " ", realm)); + String username = cons.readLine(MessageFormat.format(ConsoleText.get().usernameFor + " ", realm)); //$NON-NLS-1$ if (username == null || username.isEmpty()) { return null; } - char[] password = cons.readPassword(ConsoleText.get().password + " "); + char[] password = cons.readPassword(ConsoleText.get().password + " "); //$NON-NLS-1$ if (password == null) { password = new char[0]; } @@ -81,10 +81,10 @@ public class ConsoleAuthenticator extends CachedAuthenticator { final StringBuilder realm = new StringBuilder(); if (getRequestorType() == RequestorType.PROXY) { realm.append(getRequestorType()); - realm.append(" "); + realm.append(" "); //$NON-NLS-1$ realm.append(getRequestingHost()); if (getRequestingPort() > 0) { - realm.append(":"); + realm.append(":"); //$NON-NLS-1$ realm.append(getRequestingPort()); } } else { diff --git a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java index 972ce44a4d..91034fd2cc 100644 --- a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java +++ b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java @@ -118,7 +118,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { private boolean get(CredentialItem.StringType item) { if (item.isValueSecure()) { - char[] v = cons.readPassword("%s: ", item.getPromptText()); + char[] v = cons.readPassword("%s: ", item.getPromptText()); //$NON-NLS-1$ if (v != null) { item.setValue(new String(v)); return true; @@ -126,7 +126,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { return false; } } else { - String v = cons.readLine("%s: ", item.getPromptText()); + String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ if (v != null) { item.setValue(v); return true; @@ -138,7 +138,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { private boolean get(CredentialItem.CharArrayType item) { if (item.isValueSecure()) { - char[] v = cons.readPassword("%s: ", item.getPromptText()); + char[] v = cons.readPassword("%s: ", item.getPromptText()); //$NON-NLS-1$ if (v != null) { item.setValueNoCopy(v); return true; @@ -146,7 +146,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { return false; } } else { - String v = cons.readLine("%s: ", item.getPromptText()); + String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ if (v != null) { item.setValueNoCopy(v.toCharArray()); return true; @@ -157,13 +157,13 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { } private boolean get(CredentialItem.InformationalMessage item) { - cons.printf("%s\n", item.getPromptText()); + cons.printf("%s\n", item.getPromptText()); //$NON-NLS-1$ cons.flush(); return true; } private boolean get(CredentialItem.YesNoType item) { - String r = cons.readLine("%s [%s/%s]? ", item.getPromptText(), + String r = cons.readLine("%s [%s/%s]? ", item.getPromptText(), //$NON-NLS-1$ ConsoleText.get().answerYes, ConsoleText.get().answerNo); if (r != null) { item.setValue(ConsoleText.get().answerYes.equalsIgnoreCase(r)); -- cgit v1.2.3