diff options
| author | Kevin Sawicki | 2011-04-19 21:42:36 +0000 |
|---|---|---|
| committer | Chris Aniszczyk | 2011-04-19 22:45:17 +0000 |
| commit | d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9 (patch) | |
| tree | dc093ab8c6672123648fbce56042b8e3a4bf856d | |
| parent | e793ae60c86c31b5f6529787c85d186070da4571 (diff) | |
| download | egit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.tar.gz egit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.tar.xz egit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.zip | |
Externalize task editor page factory strings
Change-Id: I0707bcb9aaafc3cee61def945244c4d764bfd78b
Signed-off-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
3 files changed, 11 insertions, 15 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java index dfad6936..fd1ced9b 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java @@ -12,17 +12,15 @@ *******************************************************************************/ package org.eclipse.mylyn.github.ui.internal; -import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.mylyn.github.internal.GitHub; +import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.tasks.ui.TasksUiUtil; import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory; import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput; import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.editor.IFormPage; -import org.eclipse.ui.plugin.AbstractUIPlugin; /** * Editor page factory for GitHub. @@ -31,15 +29,9 @@ public class GitHubTaskEditorPageFactory extends AbstractTaskEditorPageFactory { @Override public boolean canCreatePageFor(TaskEditorInput input) { - if (GitHub.CONNECTOR_KIND.equals( - input.getTask().getConnectorKind())) { - return true; - } - if (TasksUiUtil.isOutgoingNewTask(input.getTask(), - GitHub.CONNECTOR_KIND)) { - return true; - } - return false; + ITask task = input.getTask(); + return GitHub.CONNECTOR_KIND.equals(task.getConnectorKind()) + || TasksUiUtil.isOutgoingNewTask(task, GitHub.CONNECTOR_KIND); } @Override @@ -49,19 +41,19 @@ public class GitHubTaskEditorPageFactory extends AbstractTaskEditorPageFactory { @Override public String getPageText() { - return "GitHub"; + return Messages.GitHubTaskEditorPageFactory_PageText; } @Override public int getPriority() { return PRIORITY_TASK; } - + @Override public IFormPage createPage(TaskEditor parentEditor) { return new GitHubTaskEditorPage(parentEditor); } - + @Override public String[] getConflictingIds(TaskEditorInput input) { return new String[] { ITasksUiConstants.ID_PAGE_PLANNING }; 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 4324859a..ec25197f 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 @@ -83,6 +83,9 @@ public class Messages extends NLS { public static String GitHubRepositorySettingsPage_Title; /** */ + public static String GitHubTaskEditorPageFactory_PageText; + + /** */ 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 dc789202..df6f2ef1 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 @@ -19,6 +19,7 @@ GitHubRepositorySettingsPage_StatusSuccess=Success\! GitHubRepositorySettingsPage_TaskContactingServer=Contacting server... GitHubRepositorySettingsPage_TaskValidating=Validating settings GitHubRepositorySettingsPage_Title=GitHub Issue Repository Settings +GitHubTaskEditorPageFactory_PageText=GitHub IssueLabelAttributeEditor_ActionNewLabel=New Label... IssueLabelAttributeEditor_DescriptionNewLabel=Label Name: IssueLabelAttributeEditor_MessageEnterName=Enter label name |
