Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-12-03 04:45:33 +0000
committerspingel2008-12-03 04:45:33 +0000
commit421572df548a12e4b5511cf6f00d0b8281d679b3 (patch)
treeabd8ef6fa296fe008b079eb7cc7205a4eb7b30ba /org.eclipse.mylyn.trac.ui
parentc01b999e6db2841004b0bd2a9db7e7b776ccb09a (diff)
downloadorg.eclipse.mylyn.tasks-421572df548a12e4b5511cf6f00d0b8281d679b3.tar.gz
org.eclipse.mylyn.tasks-421572df548a12e4b5511cf6f00d0b8281d679b3.tar.xz
org.eclipse.mylyn.tasks-421572df548a12e4b5511cf6f00d0b8281d679b3.zip
NEW - bug 253130: externalize strings for org.eclipse.mylyn.trac.* in Extras
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253130
Diffstat (limited to 'org.eclipse.mylyn.trac.ui')
-rw-r--r--org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.trac.ui/build.properties3
-rw-r--r--org.eclipse.mylyn.trac.ui/plugin.properties9
-rw-r--r--org.eclipse.mylyn.trac.ui/plugin.xml8
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/Messages.java37
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java16
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java60
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java10
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracSearchHandler.java2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java6
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/Messages.java32
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracPeoplePart.java8
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java28
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorPageFactory.java4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/messages.properties4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/messages.properties6
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java111
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracFilterQueryPage.java46
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java80
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java18
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties44
23 files changed, 392 insertions, 151 deletions
diff --git a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
index b9f85482f..7f5c18cbe 100644
--- a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Trac Connector UI
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.trac.ui;singleton:=true
Bundle-Version: 3.1.0.qualifier
Bundle-Activator: org.eclipse.mylyn.internal.trac.ui.TracUiPlugin
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jface.text,
org.eclipse.ui,
@@ -20,3 +20,4 @@ Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true,
org.eclipse.mylyn.internal.trac.ui.editor;x-internal:=true,
org.eclipse.mylyn.internal.trac.ui.wizard;x-internal:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
diff --git a/org.eclipse.mylyn.trac.ui/build.properties b/org.eclipse.mylyn.trac.ui/build.properties
index 1976ca356..34b05847d 100644
--- a/org.eclipse.mylyn.trac.ui/build.properties
+++ b/org.eclipse.mylyn.trac.ui/build.properties
@@ -11,5 +11,6 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
icons/,\
- about.html
+ about.html,\
+ plugin.properties
src.includes = about.html
diff --git a/org.eclipse.mylyn.trac.ui/plugin.properties b/org.eclipse.mylyn.trac.ui/plugin.properties
new file mode 100644
index 000000000..e1cdcef35
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/plugin.properties
@@ -0,0 +1,9 @@
+#Properties file for org.eclipse.mylyn.trac.ui
+Bundle-Vendor = Eclipse.org
+Bundle-Name = Mylyn Trac Connector UI
+
+repository.name = Trac Repository
+TracRepositoryConnector.name = Trac Connector Core
+TracConnectorUi.name = Trac Connector UI
+
+TracHyperlinkDetector.name = Trac Links
diff --git a/org.eclipse.mylyn.trac.ui/plugin.xml b/org.eclipse.mylyn.trac.ui/plugin.xml
index 0fb189241..2ca9cda83 100644
--- a/org.eclipse.mylyn.trac.ui/plugin.xml
+++ b/org.eclipse.mylyn.trac.ui/plugin.xml
@@ -3,17 +3,17 @@
<plugin>
<extension
id="org.eclipse.mylyn.trac.repository"
- name="Trac Repository"
+ name="%repository.name"
point="org.eclipse.mylyn.tasks.ui.repositories">
<connectorCore
class="org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector"
id="trac"
- name="Trac Connector Core"/>
+ name="%TracRepositoryConnector.name"/>
<connectorUi
brandingIcon="icons/eview16/trac-icon.gif"
class="org.eclipse.mylyn.internal.trac.ui.TracConnectorUi"
id="trac"
- name="Trac Connector UI"
+ name="%TracConnectorUi.name"
overlayIcon="icons/eview16/overlay-trac.gif"/>
<taskListMigrator
class="org.eclipse.mylyn.internal.trac.ui.TracTaskListMigrator">
@@ -41,7 +41,7 @@
<hyperlinkDetector
class="org.eclipse.mylyn.internal.trac.ui.TracHyperlinkDetector"
id="org.eclipse.mylyn.trac.ui.hyperlinksDetectors.Trac"
- name="Trac Links"
+ name="%TracHyperlinkDetector.name"
targetId="org.eclipse.mylyn.tasks.ui.TaskEditor">
</hyperlinkDetector>
</extension>
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/Messages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/Messages.java
new file mode 100644
index 000000000..5825d3b24
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/Messages.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.trac.ui.messages"; //$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ reloadMessages();
+ }
+
+ public static void reloadMessages() {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String TracConnectorUi_Replying_to__comment_X_X_;
+
+ public static String TracConnectorUi_Replying_to__comment_ticket_X_X_X_;
+
+ public static String TracConnectorUi_Replying_to__ticket_X_X_;
+
+ public static String TracConnectorUi_Ticket;
+
+ public static String WebHyperlink_Open_URL_X;
+}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java
index 272b0c92d..4b44e763a 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2006, 2008 Steffen Pingel and others.
+ * Copyright (c) 2006, 2008 Steffen Pingel and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPage;
import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
import org.eclipse.mylyn.tasks.ui.wizards.NewWebTaskWizard;
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;
+import org.eclipse.osgi.util.NLS;
/**
* @author Mik Kersten
@@ -55,7 +56,7 @@ public class TracConnectorUi extends AbstractRepositoryConnectorUi {
@Override
public String getTaskKindLabel(ITask repositoryTask) {
- return "Ticket";
+ return Messages.TracConnectorUi_Ticket;
}
@Override
@@ -120,14 +121,13 @@ public class TracConnectorUi extends AbstractRepositoryConnectorUi {
@Override
public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask) {
if (taskComment == null) {
- return "Replying to [ticket:" + task.getTaskKey() + " " + task.getOwner() + "]:";
+ return NLS.bind(Messages.TracConnectorUi_Replying_to__ticket_X_X_, task.getTaskKey(), task.getOwner());
} else if (includeTask) {
- return "Replying to [comment:ticket:" + task.getTaskKey() + ":" + taskComment.getNumber() + " "
- + taskComment.getAuthor().getPersonId() + "]:";
+ return NLS.bind(Messages.TracConnectorUi_Replying_to__comment_ticket_X_X_X_, new Object[] {
+ task.getTaskKey(), taskComment.getNumber(), taskComment.getAuthor().getPersonId() });
} else {
- return "Replying to [comment:" + taskComment.getNumber() + " " + taskComment.getAuthor().getPersonId()
- + "]:";
+ return NLS.bind(Messages.TracConnectorUi_Replying_to__comment_X_X_, taskComment.getNumber(),
+ taskComment.getAuthor().getPersonId());
}
}
-
}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
index 95c089e79..649a6a03d 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
@@ -36,41 +36,41 @@ import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
*/
public class TracHyperlinkUtil {
- static Pattern ticketPattern = createPattern("(ticket:|#)(\\d+)");
+ static Pattern ticketPattern = createPattern("(ticket:|#)(\\d+)"); //$NON-NLS-1$
- static Pattern commentPattern = createPattern("comment:ticket:(\\d+):(\\d+)");
+ static Pattern commentPattern = createPattern("comment:ticket:(\\d+):(\\d+)"); //$NON-NLS-1$
- static Pattern reportPattern1 = createPattern("report:(\\d+)");
+ static Pattern reportPattern1 = createPattern("report:(\\d+)"); //$NON-NLS-1$
- static Pattern reportPattern2 = createPattern("\\{(\\d+)\\}");
+ static Pattern reportPattern2 = createPattern("\\{(\\d+)\\}"); //$NON-NLS-1$
- static Pattern changesetPattern1 = createPattern("(r|changeset:)(\\d+)(/\\w+)?");
+ static Pattern changesetPattern1 = createPattern("(r|changeset:)(\\d+)(/\\w+)?"); //$NON-NLS-1$
- static Pattern changesetPattern2 = createPattern("\\[(\\d+)(/\\w+)?\\]");
+ static Pattern changesetPattern2 = createPattern("\\[(\\d+)(/\\w+)?\\]"); //$NON-NLS-1$
- static Pattern revisionLogPattern1 = createPattern("r(\\d+):(\\d+)");
+ static Pattern revisionLogPattern1 = createPattern("r(\\d+):(\\d+)"); //$NON-NLS-1$
- static Pattern revisionLogPattern2 = createPattern("\\[(\\d+):(\\d+)\\]");
+ static Pattern revisionLogPattern2 = createPattern("\\[(\\d+):(\\d+)\\]"); //$NON-NLS-1$
- static Pattern revisionLogPattern3 = createPattern("log:(\\w+)?@(\\d+):(\\d+)");
+ static Pattern revisionLogPattern3 = createPattern("log:(\\w+)?@(\\d+):(\\d+)"); //$NON-NLS-1$
- static Pattern diffPattern1 = createPattern("diff:@(\\d+):(\\d+)");
+ static Pattern diffPattern1 = createPattern("diff:@(\\d+):(\\d+)"); //$NON-NLS-1$
- static Pattern diffPattern2 = createPattern("diff:([\\w\\./-]+)(@(\\d+))?//([\\w\\./-]+)(@(\\d+))?");
+ static Pattern diffPattern2 = createPattern("diff:([\\w\\./-]+)(@(\\d+))?//([\\w\\./-]+)(@(\\d+))?"); //$NON-NLS-1$
- static Pattern wikiPattern1 = createPattern("wiki:(\\w+)");
+ static Pattern wikiPattern1 = createPattern("wiki:(\\w+)"); //$NON-NLS-1$
- static Pattern wikiPattern2 = Pattern.compile("(?<![!.a-z])[A-Z][a-z0-9]+[A-Z]\\w*");
+ static Pattern wikiPattern2 = Pattern.compile("(?<![!.a-z])[A-Z][a-z0-9]+[A-Z]\\w*"); //$NON-NLS-1$
- static Pattern milestonePattern = createPattern("milestone:([\\w\\.]+)");
+ static Pattern milestonePattern = createPattern("milestone:([\\w\\.]+)"); //$NON-NLS-1$
- static Pattern attachmentPattern = createPattern("attachment:ticket:(\\d+):([\\w\\.]+)");
+ static Pattern attachmentPattern = createPattern("attachment:ticket:(\\d+):([\\w\\.]+)"); //$NON-NLS-1$
- static Pattern filesPattern = createPattern("source:/*([\\w\\./\\-_]+)(@(\\d+)(#L(\\d+))?)?");
+ static Pattern filesPattern = createPattern("source:/*([\\w\\./\\-_]+)(@(\\d+)(#L(\\d+))?)?"); //$NON-NLS-1$
private static Pattern createPattern(String regexp) {
// hyperlink patterns prefixed with "!" are not links
- return Pattern.compile("(?<!!)" + regexp);
+ return Pattern.compile("(?<!!)" + regexp); //$NON-NLS-1$
}
/**
@@ -156,8 +156,8 @@ public class TracHyperlinkUtil {
if (isInRegion(offsetInText, m)) {
String rev = m.group(1);
String stopRev = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev
- + "&stop_rev=" + stopRev;
+ String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev //$NON-NLS-1$
+ + "&stop_rev=" + stopRev; //$NON-NLS-1$
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
}
}
@@ -167,8 +167,8 @@ public class TracHyperlinkUtil {
if (isInRegion(offsetInText, m)) {
String rev = m.group(1);
String stopRev = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev
- + "&stop_rev=" + stopRev;
+ String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev //$NON-NLS-1$
+ + "&stop_rev=" + stopRev; //$NON-NLS-1$
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
}
}
@@ -183,7 +183,7 @@ public class TracHyperlinkUtil {
if (branch != null) {
url += branch;
}
- url += "?rev=" + rev + "&stop_rev=" + stopRev;
+ url += "?rev=" + rev + "&stop_rev=" + stopRev; //$NON-NLS-1$ //$NON-NLS-2$
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
}
}
@@ -220,7 +220,7 @@ public class TracHyperlinkUtil {
String old_rev = m.group(1);
String new_rev = m.group(2);
String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL;
- url += "?new=" + new_rev + "&old=" + old_rev;
+ url += "?new=" + new_rev + "&old=" + old_rev; //$NON-NLS-1$ //$NON-NLS-2$
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
}
}
@@ -234,17 +234,17 @@ public class TracHyperlinkUtil {
String new_rev = m.group(6);
String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL;
try {
- url += "?new_path=" + URLEncoder.encode(new_path, "UTF-8");
- url += "&old_path=" + URLEncoder.encode(old_path, "UTF-8");
+ url += "?new_path=" + URLEncoder.encode(new_path, "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+ url += "&old_path=" + URLEncoder.encode(old_path, "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (UnsupportedEncodingException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.ID_PLUGIN, "Unexcpected exception", e));
+ StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.ID_PLUGIN, "Unexcpected exception", e)); //$NON-NLS-1$
continue;
}
if (new_rev != null) {
- url += "&new=" + new_rev;
+ url += "&new=" + new_rev; //$NON-NLS-1$
}
if (old_rev != null) {
- url += "&old=" + old_rev;
+ url += "&old=" + old_rev; //$NON-NLS-1$
}
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
}
@@ -294,9 +294,9 @@ public class TracHyperlinkUtil {
String line = m.group(5);
String url = repository.getRepositoryUrl() + ITracClient.BROWSER_URL + filename;
if (rev != null) {
- url += "?rev=" + rev;
+ url += "?rev=" + rev; //$NON-NLS-1$
if (line != null) {
- url += "#L" + line;
+ url += "#L" + line; //$NON-NLS-1$
}
}
links.add(new WebHyperlink(determineRegion(textOffset, m), url));
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
index 525838100..bd0a6c512 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
@@ -23,13 +23,13 @@ import org.eclipse.jface.resource.ImageDescriptor;
*/
public class TracImages {
- private static final URL baseURL = TracUiPlugin.getDefault().getBundle().getEntry("/icons/");
+ private static final URL baseURL = TracUiPlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
- public static final String T_VIEW = "eview16";
+ public static final String T_VIEW = "eview16"; //$NON-NLS-1$
- public static final ImageDescriptor OVERLAY_DEFECT = create(T_VIEW, "overlay-critical.gif");
+ public static final ImageDescriptor OVERLAY_DEFECT = create(T_VIEW, "overlay-critical.gif"); //$NON-NLS-1$
- public static final ImageDescriptor OVERLAY_ENHANCEMENT = create(T_VIEW, "overlay-enhancement.gif");
+ public static final ImageDescriptor OVERLAY_ENHANCEMENT = create(T_VIEW, "overlay-enhancement.gif"); //$NON-NLS-1$
private static ImageDescriptor create(String prefix, String name) {
try {
@@ -45,7 +45,7 @@ public class TracImages {
}
StringBuilder buffer = new StringBuilder(prefix);
- if (prefix != "") {
+ if (prefix != "") { //$NON-NLS-1$
buffer.append('/');
}
buffer.append(name);
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracSearchHandler.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracSearchHandler.java
index 49755fae8..d7541c43d 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracSearchHandler.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracSearchHandler.java
@@ -32,7 +32,7 @@ public class TracSearchHandler extends AbstractSearchHandler {
@Override
public boolean queryForText(TaskRepository taskRepository, IRepositoryQuery query, TaskData taskData,
String searchString) {
- TracSearchFilter filter = new TracSearchFilter("description");
+ TracSearchFilter filter = new TracSearchFilter("description"); //$NON-NLS-1$
filter.setOperator(CompareOperator.CONTAINS);
filter.addValue(searchString);
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java
index bf90faf39..08e521f56 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java
@@ -27,13 +27,13 @@ import org.w3c.dom.Element;
*/
public class TracTaskListMigrator extends AbstractTaskListMigrator {
- private static final String KEY_TRAC = "Trac";
+ private static final String KEY_TRAC = "Trac"; //$NON-NLS-1$
private static final String KEY_TRAC_TASK = KEY_TRAC + KEY_TASK;
private static final String KEY_TRAC_QUERY = KEY_TRAC + KEY_QUERY;
- private static final String KEY_SUPPORTS_SUBTASKS = "SupportsSubtasks";
+ private static final String KEY_SUPPORTS_SUBTASKS = "SupportsSubtasks"; //$NON-NLS-1$
@Override
public String getConnectorKind() {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java
index 29ed22fbd..0f5c125c2 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java
@@ -23,7 +23,7 @@ import org.osgi.framework.BundleContext;
*/
public class TracUiPlugin extends AbstractUIPlugin {
- public static final String ID_PLUGIN = "org.eclipse.mylyn.trac.ui";
+ public static final String ID_PLUGIN = "org.eclipse.mylyn.trac.ui"; //$NON-NLS-1$
private static TracUiPlugin plugin;
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
index f3acf5587..a6bf140ad 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2006, 2008 Steffen Pingel and others.
+ * Copyright (c) 2006, 2008 Steffen Pingel and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.internal.trac.ui;
+import java.text.MessageFormat;
+
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
@@ -41,7 +43,7 @@ public class WebHyperlink implements IHyperlink {
}
public String getHyperlinkText() {
- return "Open URL " + url;
+ return MessageFormat.format(Messages.WebHyperlink_Open_URL_X, url);
}
public void open() {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/Messages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/Messages.java
new file mode 100644
index 000000000..7ec02f46b
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.ui.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.trac.ui.editor.messages"; //$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ reloadMessages();
+ }
+
+ public static void reloadMessages() {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String TracPeoplePart_People;
+ public static String TracPeoplePart__Select_to_remove_;
+
+ public static String TracTaskEditorPageFactory_Browser;
+}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracPeoplePart.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracPeoplePart.java
index ee7d93482..a23b34725 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracPeoplePart.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracPeoplePart.java
@@ -33,7 +33,7 @@ public class TracPeoplePart extends AbstractTaskEditorPart {
private static final int COLUMN_MARGIN = 5;
public TracPeoplePart() {
- setPartName("People");
+ setPartName(Messages.TracPeoplePart_People);
}
private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute) {
@@ -69,8 +69,8 @@ public class TracPeoplePart extends AbstractTaskEditorPart {
TaskAttribute removeCc = getTaskData().getRoot().getMappedAttribute(TracAttributeMapper.REMOVE_CC);
if (cc != null && removeCc != null) {
addAttribute(peopleComposite, toolkit, cc);
- toolkit.createLabel(peopleComposite, "");
- Label label = toolkit.createLabel(peopleComposite, "(Select to remove)");
+ toolkit.createLabel(peopleComposite, ""); //$NON-NLS-1$
+ Label label = toolkit.createLabel(peopleComposite, Messages.TracPeoplePart__Select_to_remove_);
GridDataFactory.fillDefaults().indent(0, 5).align(SWT.CENTER, SWT.CENTER).applyTo(label);
}
@@ -106,4 +106,4 @@ public class TracPeoplePart extends AbstractTaskEditorPart {
}
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
index 14e1183dd..e4499ae5e 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
@@ -33,7 +33,7 @@ public class TracRenderingEngine extends AbstractRenderingEngine {
*/
@Override
public String renderAsHtml(TaskRepository repository, String text, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Render HTML Preview", IProgressMonitor.UNKNOWN);
+ monitor.beginTask("Render HTML Preview", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
try {
ITracClient client = TracCorePlugin.getDefault()
.getConnector()
@@ -46,24 +46,24 @@ public class TracRenderingEngine extends AbstractRenderingEngine {
throw new OperationCanceledException();
}
- String htmlHeader = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
- + "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">"
- + "<head>"
- + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/trac.css\" type=\"text/css\" />"
- + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/wiki.css\" type=\"text/css\" />"
- + "<link rel=\"icon\" href=\"REPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />"
- + "<link rel=\"shortcut icon\" href=\"EPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />"
- + "<style type=\"text/css\">body {background: #f4f4f4 url(REPOSITORY_URL/chrome/common/draft.png);margin: 0;padding: 0;}</style>"
- + "</head>";
- String htmlBody = "<body> " + htmlText + "</body>";
- String htmlFooter = "</html>";
+ String htmlHeader = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" //$NON-NLS-1$
+ + "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">" //$NON-NLS-1$
+ + "<head>" //$NON-NLS-1$
+ + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/trac.css\" type=\"text/css\" />" //$NON-NLS-1$
+ + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/wiki.css\" type=\"text/css\" />" //$NON-NLS-1$
+ + "<link rel=\"icon\" href=\"REPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />" //$NON-NLS-1$
+ + "<link rel=\"shortcut icon\" href=\"EPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />" //$NON-NLS-1$
+ + "<style type=\"text/css\">body {background: #f4f4f4 url(REPOSITORY_URL/chrome/common/draft.png);margin: 0;padding: 0;}</style>" //$NON-NLS-1$
+ + "</head>"; //$NON-NLS-1$
+ String htmlBody = "<body> " + htmlText + "</body>"; //$NON-NLS-1$ //$NON-NLS-2$
+ String htmlFooter = "</html>"; //$NON-NLS-1$
- String html = htmlHeader.replace("REPOSITORY_URL", repository.getRepositoryUrl()) + htmlBody
+ String html = htmlHeader.replace("REPOSITORY_URL", repository.getRepositoryUrl()) + htmlBody //$NON-NLS-1$
+ htmlFooter;
return html;
} else {
throw new CoreException(TracCorePlugin.toStatus(new TracException(
- "Preview is available only in XML-RPC access mode"), repository));
+ "Preview is available only in XML-RPC access mode"), repository)); //$NON-NLS-1$
}
} catch (TracException e) {
throw new CoreException(TracCorePlugin.toStatus(e, repository));
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorPageFactory.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorPageFactory.java
index a4f6af1e4..47500fc6a 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorPageFactory.java
@@ -47,7 +47,7 @@ public class TracTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
} else if (TracRepositoryConnector.hasRichEditor(input.getTaskRepository())) {
return new TracTaskEditorPage(parentEditor);
} else {
- return new BrowserFormPage(parentEditor, "Browser");
+ return new BrowserFormPage(parentEditor, Messages.TracTaskEditorPageFactory_Browser);
}
}
@@ -66,7 +66,7 @@ public class TracTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
@Override
public String getPageText() {
- return "Trac";
+ return "Trac"; //$NON-NLS-1$
}
@Override
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/messages.properties b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/messages.properties
new file mode 100644
index 000000000..9375dba7a
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/messages.properties
@@ -0,0 +1,4 @@
+TracPeoplePart_People=People
+TracPeoplePart__Select_to_remove_=(Select to remove)
+
+TracTaskEditorPageFactory_Browser=Browser
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/messages.properties b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/messages.properties
new file mode 100644
index 000000000..49118f301
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/messages.properties
@@ -0,0 +1,6 @@
+TracConnectorUi_Replying_to__comment_X_X_=Replying to [comment:{0} {1}]:
+TracConnectorUi_Replying_to__comment_ticket_X_X_X_=Replying to [comment:ticket:{0}:{1} {2}]:
+TracConnectorUi_Replying_to__ticket_X_X_=Replying to [ticket:{0} {1}]:
+TracConnectorUi_Ticket=Ticket
+
+WebHyperlink_Open_URL_X=Open URL {0}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
new file mode 100644
index 000000000..3df17dd34
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.ui.wizard;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.trac.ui.wizard.messages"; //$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ reloadMessages();
+ }
+
+ public static void reloadMessages() {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String TracFilterQueryPage_Add_search_filters_to_define_query;
+
+ public static String TracFilterQueryPage_CC;
+
+ public static String TracFilterQueryPage_Component;
+
+ public static String TracFilterQueryPage_Keywords;
+
+ public static String TracFilterQueryPage_Milestone;
+
+ public static String TracFilterQueryPage_New_Trac_Query;
+
+ public static String TracFilterQueryPage_or;
+
+ public static String TracFilterQueryPage_Owner;
+
+ public static String TracFilterQueryPage_Priority;
+
+ public static String TracFilterQueryPage_Query_Title;
+
+ public static String TracFilterQueryPage_Reporter;
+
+ public static String TracFilterQueryPage_Resolution;
+
+ public static String TracFilterQueryPage_Select_to_add_filter;
+
+ public static String TracFilterQueryPage_Status;
+
+ public static String TracFilterQueryPage_Summary;
+
+ public static String TracFilterQueryPage_Type;
+
+ public static String TracFilterQueryPage_Version;
+
+ public static String TracQueryPage_CC;
+
+ public static String TracQueryPage_Component;
+
+ public static String TracQueryPage_Description;
+
+ public static String TracQueryPage_Enter_query_parameters;
+
+ public static String TracQueryPage_If_attributes_are_blank_or_stale_press_the_Update_button;
+
+ public static String TracQueryPage_Keywords;
+
+ public static String TracQueryPage_Milestone;
+
+ public static String TracQueryPage_No_repository_available;
+
+ public static String TracQueryPage_Owner;
+
+ public static String TracQueryPage_Priority;
+
+ public static String TracQueryPage_Query_Title;
+
+ public static String TracQueryPage_Reporter;
+
+ public static String TracQueryPage_Resolution;
+
+ public static String TracQueryPage_Status;
+
+ public static String TracQueryPage_Summary;
+
+ public static String TracQueryPage_Type;
+
+ public static String TracQueryPage_Update_Attributes_Failed;
+
+ public static String TracQueryPage_Update_Attributes_from_Repository;
+
+ public static String TracQueryPage_Version;
+
+ public static String TracRepositorySettingsPage_Access_Type_;
+
+ public static String TracRepositorySettingsPage_Authentication_credentials_are_valid;
+
+ public static String TracRepositorySettingsPage_Automatic__Use_Validate_Settings_;
+
+ public static String TracRepositorySettingsPage_EXAMPLE_HTTP_TRAC_EDGEWALL_ORG;
+
+ public static String TracRepositorySettingsPage_No_Trac_repository_found_at_url;
+
+ public static String TracRepositorySettingsPage_Trac_Repository_Settings;
+}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracFilterQueryPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracFilterQueryPage.java
index 5524c648f..110b02c47 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracFilterQueryPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracFilterQueryPage.java
@@ -49,11 +49,11 @@ import org.eclipse.swt.widgets.Text;
*/
public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
- private static final String TITLE = "New Trac Query";
+ private static final String TITLE = Messages.TracFilterQueryPage_New_Trac_Query;
- private static final String DESCRIPTION = "Add search filters to define query.";
+ private static final String DESCRIPTION = Messages.TracFilterQueryPage_Add_search_filters_to_define_query;
- private static final String TITLE_QUERY_TITLE = "Query Title";
+ private static final String TITLE_QUERY_TITLE = Messages.TracFilterQueryPage_Query_Title;
private Text titleText;
@@ -118,7 +118,7 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
showSearchField(field, filter);
} else {
StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.ID_PLUGIN,
- "Ignoring invalid search filter: " + filter));
+ "Ignoring invalid search filter: " + filter)); //$NON-NLS-1$
}
}
}
@@ -144,26 +144,26 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
composite.setLayoutData(gd);
Label label = new Label(composite, SWT.LEFT);
- label.setText("Select to add filter: ");
+ label.setText(Messages.TracFilterQueryPage_Select_to_add_filter);
// condition
final Combo filterCombo = new Combo(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
searchFields = new ArrayList<SearchField>();
- searchFields.add(new TextSearchField("summary", "Summary"));
- searchFields.add(new TextSearchField("reporter", "Reporter"));
- searchFields.add(new TextSearchField("owner", "Owner"));
- searchFields.add(new TextSearchField("type", "Type"));
- searchFields.add(new TextSearchField("status", "Status"));
- searchFields.add(new TextSearchField("priority", "Priority"));
- searchFields.add(new TextSearchField("milestone", "Milestone"));
- searchFields.add(new TextSearchField("component", "Component"));
- searchFields.add(new TextSearchField("version", "Version"));
- searchFields.add(new TextSearchField("resoution", "Resolution"));
- searchFields.add(new TextSearchField("keywords", "Keywords"));
- searchFields.add(new TextSearchField("cc", "CC"));
-
- filterCombo.add("");
+ searchFields.add(new TextSearchField("summary", Messages.TracFilterQueryPage_Summary)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("reporter", Messages.TracFilterQueryPage_Reporter)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("owner", Messages.TracFilterQueryPage_Owner)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("type", Messages.TracFilterQueryPage_Type)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("status", Messages.TracFilterQueryPage_Status)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("priority", Messages.TracFilterQueryPage_Priority)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("milestone", Messages.TracFilterQueryPage_Milestone)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("component", Messages.TracFilterQueryPage_Component)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("version", Messages.TracFilterQueryPage_Version)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("resoution", Messages.TracFilterQueryPage_Resolution)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("keywords", Messages.TracFilterQueryPage_Keywords)); //$NON-NLS-1$
+ searchFields.add(new TextSearchField("cc", Messages.TracFilterQueryPage_CC)); //$NON-NLS-1$
+
+ filterCombo.add(""); //$NON-NLS-1$
for (SearchField field : searchFields) {
filterCombo.add(field.getDisplayName());
}
@@ -173,7 +173,7 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
if (filterCombo.getText().length() > 0) {
SearchField field = searchFields.get(filterCombo.getSelectionIndex() - 1);
showSearchField(field, null);
- filterCombo.setText("");
+ filterCombo.setText(""); //$NON-NLS-1$
}
}
});
@@ -368,7 +368,7 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
public void createControl(Composite parent) {
label = new Label(parent, SWT.LEFT);
- label.setText(getDisplayName() + ": ");
+ label.setText(getDisplayName() + ": "); //$NON-NLS-1$
conditionCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
for (CompareOperator op : compareOperators) {
@@ -385,7 +385,7 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
gd.horizontalAlignment = SWT.END;
gd.horizontalSpan = 2;
label.setLayoutData(gd);
- label.setText("or");
+ label.setText(Messages.TracFilterQueryPage_or);
createSearchTextAndRemoveButton(parent);
@@ -400,7 +400,7 @@ public class TracFilterQueryPage extends AbstractRepositoryQueryPage {
searchText.setLayoutData(gd);
removeButton = new Button(parent, SWT.PUSH);
- removeButton.setText("-");
+ removeButton.setText("-"); //$NON-NLS-1$
removeButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java
index ea6bd41a9..2e6217492 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java
@@ -61,12 +61,6 @@ import org.eclipse.ui.progress.IProgressService;
*/
public class TracQueryPage extends AbstractRepositoryQueryPage {
- private static final String TITLE = "Enter query parameters";
-
- private static final String DESCRIPTION = "If attributes are blank or stale press the Update button.";
-
- private static final String TITLE_QUERY_TITLE = "Query Title:";
-
private Text titleText;
private static final int PRODUCT_HEIGHT = 60;
@@ -75,7 +69,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
protected final static String PAGE_NAME = "TracSearchPage"; //$NON-NLS-1$
- private static final String SEARCH_URL_ID = PAGE_NAME + ".SEARCHURL";
+ private static final String SEARCH_URL_ID = PAGE_NAME + ".SEARCHURL"; //$NON-NLS-1$
protected Combo summaryText = null;
@@ -114,9 +108,9 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
// private UserSearchField ccField;
public TracQueryPage(TaskRepository repository, IRepositoryQuery query) {
- super(TITLE, repository, query);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
+ super(Messages.TracQueryPage_Enter_query_parameters, repository, query);
+ setTitle(Messages.TracQueryPage_Enter_query_parameters);
+ setDescription(Messages.TracQueryPage_If_attributes_are_blank_or_stale_press_the_Update_button);
}
public TracQueryPage(TaskRepository repository) {
@@ -136,14 +130,14 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
createTitleGroup(control);
- summaryField = new TextSearchField("summary");
- summaryField.createControls(control, "Summary");
+ summaryField = new TextSearchField("summary"); //$NON-NLS-1$
+ summaryField.createControls(control, Messages.TracQueryPage_Summary);
- descriptionField = new TextSearchField("description");
- descriptionField.createControls(control, "Description");
+ descriptionField = new TextSearchField("description"); //$NON-NLS-1$
+ descriptionField.createControls(control, Messages.TracQueryPage_Description);
- keywordsField = new TextSearchField("keywords");
- keywordsField.createControls(control, "Keywords");
+ keywordsField = new TextSearchField("keywords"); //$NON-NLS-1$
+ keywordsField.createControls(control, Messages.TracQueryPage_Keywords);
createOptionsGroup(control);
@@ -173,7 +167,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
field.setFilter(filter);
} else {
StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.ID_PLUGIN,
- "Ignoring invalid search filter: " + filter));
+ "Ignoring invalid search filter: " + filter)); //$NON-NLS-1$
}
}
}
@@ -184,7 +178,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
}
Label titleLabel = new Label(control, SWT.NONE);
- titleLabel.setText(TITLE_QUERY_TITLE);
+ titleLabel.setText(Messages.TracQueryPage_Query_Title);
titleText = new Text(control, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
@@ -236,21 +230,21 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
group.setLayoutData(gd);
Label label = new Label(group, SWT.LEFT);
- label.setText("Component");
+ label.setText(Messages.TracQueryPage_Component);
label = new Label(group, SWT.LEFT);
- label.setText("Version");
+ label.setText(Messages.TracQueryPage_Version);
label = new Label(group, SWT.LEFT);
- label.setText("Milestone");
+ label.setText(Messages.TracQueryPage_Milestone);
- componentField = new ListSearchField("component");
+ componentField = new ListSearchField("component"); //$NON-NLS-1$
componentField.createControls(group, PRODUCT_HEIGHT);
- versionField = new ListSearchField("version");
+ versionField = new ListSearchField("version"); //$NON-NLS-1$
versionField.createControls(group, PRODUCT_HEIGHT);
- milestoneField = new ListSearchField("milestone");
+ milestoneField = new ListSearchField("milestone"); //$NON-NLS-1$
milestoneField.createControls(group, PRODUCT_HEIGHT);
return group;
@@ -269,27 +263,27 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
group.setLayoutData(gd);
Label label = new Label(group, SWT.LEFT);
- label.setText("Status");
+ label.setText(Messages.TracQueryPage_Status);
label = new Label(group, SWT.LEFT);
- label.setText("Resolution");
+ label.setText(Messages.TracQueryPage_Resolution);
label = new Label(group, SWT.LEFT);
- label.setText("Type");
+ label.setText(Messages.TracQueryPage_Type);
label = new Label(group, SWT.LEFT);
- label.setText("Priority");
+ label.setText(Messages.TracQueryPage_Priority);
- statusField = new ListSearchField("status");
+ statusField = new ListSearchField("status"); //$NON-NLS-1$
statusField.createControls(group, STATUS_HEIGHT);
- resolutionField = new ListSearchField("resolution");
+ resolutionField = new ListSearchField("resolution"); //$NON-NLS-1$
resolutionField.createControls(group, STATUS_HEIGHT);
- typeField = new ListSearchField("type");
+ typeField = new ListSearchField("type"); //$NON-NLS-1$
typeField.createControls(group, STATUS_HEIGHT);
- priorityField = new ListSearchField("priority");
+ priorityField = new ListSearchField("priority"); //$NON-NLS-1$
priorityField.createControls(group, STATUS_HEIGHT);
return group;
@@ -302,7 +296,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
updateButton = new Button(group, SWT.PUSH);
- updateButton.setText("Update Attributes from Repository");
+ updateButton.setText(Messages.TracQueryPage_Update_Attributes_from_Repository);
updateButton.setLayoutData(new GridData());
updateButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -310,8 +304,8 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
if (getTaskRepository() != null) {
updateAttributesFromRepository(true);
} else {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Update Attributes Failed",
- "No repository available, please add one using the Task Repositories view.");
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), Messages.TracQueryPage_Update_Attributes_Failed,
+ Messages.TracQueryPage_No_repository_available);
}
}
});
@@ -470,7 +464,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
private boolean restoreWidgetValues() {
IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
+ String repoId = "." + getTaskRepository().getRepositoryUrl(); //$NON-NLS-1$
String searchUrl = settings.get(SEARCH_URL_ID + repoId);
if (searchUrl == null) {
@@ -483,7 +477,7 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
@Override
public void saveState() {
- String repoId = "." + getTaskRepository().getRepositoryUrl();
+ String repoId = "." + getTaskRepository().getRepositoryUrl(); //$NON-NLS-1$
IDialogSettings settings = getDialogSettings();
settings.put(SEARCH_URL_ID + repoId, getTracSearch().toUrl());
}
@@ -684,18 +678,18 @@ public class TracQueryPage extends AbstractRepositoryQueryPage {
textField = new TextSearchField(null);
- new UserSelectionSearchField("owner", 0);
+ new UserSelectionSearchField("owner", 0); //$NON-NLS-1$
- new UserSelectionSearchField("reporter", 1);
+ new UserSelectionSearchField("reporter", 1); //$NON-NLS-1$
- new UserSelectionSearchField("cc", 2);
+ new UserSelectionSearchField("cc", 2); //$NON-NLS-1$
}
public void createControls(Composite parent) {
userCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- userCombo.add("Owner");
- userCombo.add("Reporter");
- userCombo.add("CC");
+ userCombo.add(Messages.TracQueryPage_Owner);
+ userCombo.add(Messages.TracQueryPage_Reporter);
+ userCombo.add(Messages.TracQueryPage_CC);
userCombo.select(0);
textField.createControls(parent, null);
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
index 9a31b2720..2eecdceaf 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
@@ -43,9 +43,9 @@ import org.eclipse.swt.widgets.Label;
*/
public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
- private static final String TITLE = "Trac Repository Settings";
+ private static final String TITLE = Messages.TracRepositorySettingsPage_Trac_Repository_Settings;
- private static final String DESCRIPTION = "Example: http://trac.edgewall.org";
+ private static final String DESCRIPTION = Messages.TracRepositorySettingsPage_EXAMPLE_HTTP_TRAC_EDGEWALL_ORG;
private Combo accessTypeCombo;
@@ -80,10 +80,10 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
addRepositoryTemplatesToServerUrlCombo();
Label accessTypeLabel = new Label(parent, SWT.NONE);
- accessTypeLabel.setText("Access Type: ");
+ accessTypeLabel.setText(Messages.TracRepositorySettingsPage_Access_Type_);
accessTypeCombo = new Combo(parent, SWT.READ_ONLY);
- accessTypeCombo.add("Automatic (Use Validate Settings)");
+ accessTypeCombo.add(Messages.TracRepositorySettingsPage_Automatic__Use_Validate_Settings_);
versions = Version.values();
for (Version version : versions) {
accessTypeCombo.add(version.toString());
@@ -115,7 +115,7 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
@Override
protected boolean isValidUrl(String name) {
- if ((name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) && !name.endsWith("/")) {
+ if ((name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) && !name.endsWith("/")) { //$NON-NLS-1$
try {
new URL(name);
return true;
@@ -185,11 +185,11 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
TracUiPlugin.ID_PLUGIN, INVALID_LOGIN));
} catch (TracPermissionDeniedException e) {
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
- TracUiPlugin.ID_PLUGIN, "Insufficient permissions for selected access type."));
+ TracUiPlugin.ID_PLUGIN, "Insufficient permissions for selected access type.")); //$NON-NLS-1$
} catch (TracException e) {
- String message = "No Trac repository found at url";
+ String message = Messages.TracRepositorySettingsPage_No_Trac_repository_found_at_url;
if (e.getMessage() != null) {
- message += ": " + e.getMessage();
+ message += ": " + e.getMessage(); //$NON-NLS-1$
}
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
TracUiPlugin.ID_PLUGIN, message));
@@ -218,7 +218,7 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
if (e instanceof TracPermissionDeniedException) {
setStatus(RepositoryStatus.createStatus(repositoryUrl, IStatus.INFO,
TracUiPlugin.ID_PLUGIN,
- "Authentication credentials are valid. Note: Insufficient permissions for XML-RPC access, falling back to web access."));
+ Messages.TracRepositorySettingsPage_Authentication_credentials_are_valid));
}
} catch (TracLoginException e2) {
throw e;
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
new file mode 100644
index 000000000..5d39ba92d
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
@@ -0,0 +1,44 @@
+TracFilterQueryPage_Add_search_filters_to_define_query=Add search filters to define query.
+TracFilterQueryPage_CC=CC
+TracFilterQueryPage_Component=Component
+TracFilterQueryPage_Keywords=Keywords
+TracFilterQueryPage_Milestone=Milestone
+TracFilterQueryPage_New_Trac_Query=New Trac Query
+TracFilterQueryPage_or=or
+TracFilterQueryPage_Owner=Owner
+TracFilterQueryPage_Priority=Priority
+TracFilterQueryPage_Query_Title=Query Title
+TracFilterQueryPage_Reporter=Reporter
+TracFilterQueryPage_Resolution=Resolution
+TracFilterQueryPage_Select_to_add_filter=Select to add filter:
+TracFilterQueryPage_Status=Status
+TracFilterQueryPage_Summary=Summary
+TracFilterQueryPage_Type=Type
+TracFilterQueryPage_Version=Version
+
+TracQueryPage_CC=CC
+TracQueryPage_Component=Component
+TracQueryPage_Description=Description
+TracQueryPage_Enter_query_parameters=Enter query parameters
+TracQueryPage_If_attributes_are_blank_or_stale_press_the_Update_button=If attributes are blank or stale press the Update button.
+TracQueryPage_Keywords=Keywords
+TracQueryPage_Milestone=Milestone
+TracQueryPage_No_repository_available=No repository available, please add one using the Task Repositories view.
+TracQueryPage_Owner=Owner
+TracQueryPage_Priority=Priority
+TracQueryPage_Query_Title=Query Title:
+TracQueryPage_Reporter=Reporter
+TracQueryPage_Resolution=Resolution
+TracQueryPage_Status=Status
+TracQueryPage_Summary=Summary
+TracQueryPage_Type=Type
+TracQueryPage_Update_Attributes_Failed=Update Attributes Failed
+TracQueryPage_Update_Attributes_from_Repository=Update Attributes from Repository
+TracQueryPage_Version=Version
+
+TracRepositorySettingsPage_Access_Type_=Access Type:
+TracRepositorySettingsPage_Authentication_credentials_are_valid=Authentication credentials are valid. Note: Insufficient permissions for XML-RPC access, falling back to web access.
+TracRepositorySettingsPage_Automatic__Use_Validate_Settings_=Automatic (Use Validate Settings)
+TracRepositorySettingsPage_EXAMPLE_HTTP_TRAC_EDGEWALL_ORG=Example: http://trac.edgewall.org
+TracRepositorySettingsPage_No_Trac_repository_found_at_url=No Trac repository found at url
+TracRepositorySettingsPage_Trac_Repository_Settings=Trac Repository Settings

Back to the top