diff options
| author | Kevin Sawicki | 2011-04-19 21:32:43 +0000 |
|---|---|---|
| committer | Chris Aniszczyk | 2011-04-19 22:44:16 +0000 |
| commit | e793ae60c86c31b5f6529787c85d186070da4571 (patch) | |
| tree | ad7dc71cf2e145aa44826d2638364db9625fe053 | |
| parent | cc48e03b2456850cfc1cd60ac2d3b4305a1b35e6 (diff) | |
| download | egit-github-e793ae60c86c31b5f6529787c85d186070da4571.tar.gz egit-github-e793ae60c86c31b5f6529787c85d186070da4571.tar.xz egit-github-e793ae60c86c31b5f6529787c85d186070da4571.zip | |
Externalize repository settings page strings
Change-Id: Icc3f3475623cff4560a22bbb5237ade16355f86f
Signed-off-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
3 files changed, 40 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java index c2cc10ff..e778f6f5 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java @@ -59,8 +59,9 @@ public class GitHubRepositorySettingsPage extends * - Object to populate */ public GitHubRepositorySettingsPage(final TaskRepository taskRepository) { - super("GitHub Issue Repository Settings", - "Enter repository location and credentials", taskRepository); + super(Messages.GitHubRepositorySettingsPage_Title, + Messages.GitHubRepositorySettingsPage_Description, + taskRepository); this.setHttpAuth(false); this.setNeedsAdvanced(false); this.setNeedsAnonymousLogin(true); @@ -91,7 +92,7 @@ public class GitHubRepositorySettingsPage extends protected void createAdditionalControls(Composite parent) { // Set the URL now, because serverURL is definitely instantiated . if (serverUrlCombo.getText().length() == 0) { - String fullUrlText = URL + "/user/project"; + String fullUrlText = URL + DEFAULT_REPOSITORY; serverUrlCombo.setText(fullUrlText); serverUrlCombo.setFocus(); // select the user/project part of the URL so that the user can just @@ -132,19 +133,21 @@ public class GitHubRepositorySettingsPage extends Validator validator = new Validator() { @Override public void run(IProgressMonitor monitor) throws CoreException { - monitor.beginTask("Validating settings", 100); + monitor.beginTask( + Messages.GitHubRepositorySettingsPage_TaskValidating, + 100); try { String urlText = repository.getUrl(); Matcher urlMatcher = GitHub.URL_PATTERN - .matcher(urlText == null ? "" : urlText); + .matcher(urlText == null ? "" : urlText); //$NON-NLS-1$ if (!urlMatcher.matches()) { setStatus(GitHubUi - .createErrorStatus("Server URL must be in the form http://github.com/user/project")); + .createErrorStatus(Messages.GitHubRepositorySettingsPage_ErrorMalformedUrl)); return; } monitor.worked(20); - monitor.subTask("Contacting server..."); + monitor.subTask(Messages.GitHubRepositorySettingsPage_TaskContactingServer); try { AuthenticationCredentials auth = repository .getCredentials(AuthenticationType.REPOSITORY); @@ -162,14 +165,14 @@ public class GitHubRepositorySettingsPage extends service.getIssues(user, project, null); } catch (IOException e) { setStatus(GitHubUi - .createErrorStatus("Invalid credentials. Please check your GitHub User ID and Password.")); + .createErrorStatus(Messages.GitHubRepositorySettingsPage_ErrorInvalidCredentials)); return; } finally { monitor.done(); } setStatus(new Status(IStatus.OK, GitHubUi.BUNDLE_ID, - "Success!")); + Messages.GitHubRepositorySettingsPage_StatusSuccess)); } finally { monitor.done(); } diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java index f4e213da..4324859a 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java @@ -62,6 +62,27 @@ public class Messages extends NLS { public static String GitHubRepositoryQueryPage_TitleLabel; /** */ + public static String GitHubRepositorySettingsPage_Description; + + /** */ + public static String GitHubRepositorySettingsPage_ErrorInvalidCredentials; + + /** */ + public static String GitHubRepositorySettingsPage_ErrorMalformedUrl; + + /** */ + public static String GitHubRepositorySettingsPage_StatusSuccess; + + /** */ + public static String GitHubRepositorySettingsPage_TaskContactingServer; + + /** */ + public static String GitHubRepositorySettingsPage_TaskValidating; + + /** */ + public static String GitHubRepositorySettingsPage_Title; + + /** */ public static String IssueLabelAttributeEditor_ActionNewLabel; /** */ diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties index e7b40854..dc789202 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties @@ -12,6 +12,13 @@ GitHubRepositoryQueryPage_StatusOpen=Open GitHubRepositoryQueryPage_TaskLoadingLabels=Loading labels GitHubRepositoryQueryPage_TaskLoadingMilestones=Loading milestones GitHubRepositoryQueryPage_TitleLabel=Title: +GitHubRepositorySettingsPage_Description=Enter repository location and credentials +GitHubRepositorySettingsPage_ErrorInvalidCredentials=Invalid credentials. Please check your GitHub User ID and Password. +GitHubRepositorySettingsPage_ErrorMalformedUrl=Server URL must be in the form http://github.com/user/project +GitHubRepositorySettingsPage_StatusSuccess=Success\! +GitHubRepositorySettingsPage_TaskContactingServer=Contacting server... +GitHubRepositorySettingsPage_TaskValidating=Validating settings +GitHubRepositorySettingsPage_Title=GitHub Issue Repository Settings IssueLabelAttributeEditor_ActionNewLabel=New Label... IssueLabelAttributeEditor_DescriptionNewLabel=Label Name: IssueLabelAttributeEditor_MessageEnterName=Enter label name |
