summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-19 17:42:36 (EDT)
committerChris Aniszczyk2011-04-19 18:45:17 (EDT)
commitd690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9 (patch)
treedc093ab8c6672123648fbce56042b8e3a4bf856d
parente793ae60c86c31b5f6529787c85d186070da4571 (diff)
downloadegit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.zip
egit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.tar.gz
egit-github-d690df7fb5377a5760a62d7fd5a2ae6f2a65b6f9.tar.bz2
Externalize task editor page factory stringsrefs/changes/73/3173/2
Change-Id: I0707bcb9aaafc3cee61def945244c4d764bfd78b Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java22
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties1
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 dfad693..fd1ced9 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 4324859..ec25197 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 dc78920..df6f2ef 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