Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2008-12-15 19:21:39 -0500
committerrelves2008-12-15 19:21:39 -0500
commit6d439fe9d4289415d6bfe8f8f7e7f75f23cf0b5f (patch)
tree27452c9ec15dd7699ced161ca2352123972e8910
parente891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c (diff)
downloadorg.eclipse.mylyn.tasks-6d439fe9d4289415d6bfe8f8f7e7f75f23cf0b5f.tar.gz
org.eclipse.mylyn.tasks-6d439fe9d4289415d6bfe8f8f7e7f75f23cf0b5f.tar.xz
org.eclipse.mylyn.tasks-6d439fe9d4289415d6bfe8f8f7e7f75f23cf0b5f.zip
NEW - bug 253053: externalize strings for org.eclipse.mylyn.bugzilla.*
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253053
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build.properties3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.properties7
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.xml6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java36
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java30
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java42
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/Messages.java32
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/messages.properties4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java28
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java51
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties17
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java346
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java99
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties36
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java34
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java10
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java30
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java30
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java99
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java44
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties39
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java53
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java40
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties12
38 files changed, 845 insertions, 380 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
index d60b68209..b09914923 100644
--- a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Bugzilla Connector UI
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.ui; singleton:=true
Bundle-Version: 3.1.0.qualifier
Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
@@ -27,3 +27,4 @@ Export-Package: org.eclipse.mylyn.internal.bugzilla.ui;x-internal:=true,
org.eclipse.mylyn.internal.bugzilla.ui.wizard;x-internal:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
+Bundle-Localization: plugin
diff --git a/org.eclipse.mylyn.bugzilla.ui/build.properties b/org.eclipse.mylyn.bugzilla.ui/build.properties
index cfd0d4307..d4538f49c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/build.properties
+++ b/org.eclipse.mylyn.bugzilla.ui/build.properties
@@ -10,7 +10,8 @@ bin.includes = META-INF/,\
plugin.xml,\
icons/,\
about.html,\
- .
+ .,\
+ plugin.properties
src.includes = META-INF/,\
about.html
jre.compilation.profile = J2SE-1.5
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.properties b/org.eclipse.mylyn.bugzilla.ui/plugin.properties
new file mode 100644
index 000000000..793dbb8c5
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/plugin.properties
@@ -0,0 +1,7 @@
+#Properties file for org.eclipse.mylyn.bugzilla.ui
+Bundle-Vendor = Eclipse.org
+Bundle-Name = Mylyn Bugzilla Connector UI
+
+bugzilla.repository.name=Bugzilla Repository
+BugzillaRepositoryConnector.name=Bugzilla Repository Connector
+tasklist.BugzillaConnectorUi.name=Bugzilla Repository Ui
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.xml b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
index e7762c9f8..c7a0ff351 100644
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
@@ -4,18 +4,18 @@
<extension
id="org.eclipse.mylyn.bugzilla.repository"
- name="Bugzilla Repository"
+ name="%bugzilla.repository.name"
point="org.eclipse.mylyn.tasks.ui.repositories">
<connectorCore
class="org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector"
id="org.eclipse.mylyn.bugzilla.tasklist.repositories"
- name="Bugzilla Repository Connector"/>
+ name="%BugzillaRepositoryConnector.name"/>
<connectorUi
brandingIcon="icons/eview16/bugzilla-logo.gif"
class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaConnectorUi"
- name="Bugzilla Repository Ui"
+ name="%tasklist.BugzillaConnectorUi.name"
overlayIcon="icons/eview16/overlay-bugzilla.gif"/>
<taskListMigrator
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
index eb504d815..b49311aee 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
@@ -26,35 +26,35 @@ public class BugzillaImages {
private static ImageRegistry imageRegistry;
- private static final URL baseURL = BugzillaUiPlugin.getDefault().getBundle().getEntry("/icons/");
+ private static final URL baseURL = BugzillaUiPlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
- public static final String T_ELCL = "elcl16";
+ public static final String T_ELCL = "elcl16"; //$NON-NLS-1$
- public static final String T_TOOL = "etool16";
+ public static final String T_TOOL = "etool16"; //$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_BUGZILLA = create(T_VIEW, "overlay-bugzilla.gif");
+ public static final ImageDescriptor OVERLAY_BUGZILLA = create(T_VIEW, "overlay-bugzilla.gif"); //$NON-NLS-1$
- public static final ImageDescriptor BUG = create(T_ELCL, "bug.gif");
+ public static final ImageDescriptor BUG = create(T_ELCL, "bug.gif"); //$NON-NLS-1$
- public static final ImageDescriptor BUG_COMMENT = create(T_ELCL, "bug-comment.gif");
+ public static final ImageDescriptor BUG_COMMENT = create(T_ELCL, "bug-comment.gif"); //$NON-NLS-1$
- public static final ImageDescriptor REMOVE_ALL = create("", "remove-all.gif");
+ public static final ImageDescriptor REMOVE_ALL = create("", "remove-all.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final ImageDescriptor REMOVE = create("", "remove.gif");
+ public static final ImageDescriptor REMOVE = create("", "remove.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final ImageDescriptor SELECT_ALL = create("", "selectAll.gif");
+ public static final ImageDescriptor SELECT_ALL = create("", "selectAll.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final ImageDescriptor OPEN = create("", "openresult.gif");
+ public static final ImageDescriptor OPEN = create("", "openresult.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- public static final ImageDescriptor OVERLAY_CRITICAL = create(T_VIEW, "overlay-critical.gif");
+ public static final ImageDescriptor OVERLAY_CRITICAL = create(T_VIEW, "overlay-critical.gif"); //$NON-NLS-1$
- public static final ImageDescriptor OVERLAY_MAJOR = create(T_VIEW, "overlay-major.gif");
+ public static final ImageDescriptor OVERLAY_MAJOR = create(T_VIEW, "overlay-major.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$
- public static final ImageDescriptor OVERLAY_MINOR = create(T_VIEW, "overlay-minor.gif");
+ public static final ImageDescriptor OVERLAY_MINOR = create(T_VIEW, "overlay-minor.gif"); //$NON-NLS-1$
private static ImageDescriptor create(String prefix, String name) {
try {
@@ -70,7 +70,7 @@ public class BugzillaImages {
}
StringBuffer buffer = new StringBuffer(prefix);
- if (prefix != "") {
+ if (prefix != "") { //$NON-NLS-1$
buffer.append('/');
}
buffer.append(name);
@@ -90,10 +90,10 @@ public class BugzillaImages {
*/
public static Image getImage(ImageDescriptor imageDescriptor) {
ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get("" + imageDescriptor.hashCode());
+ Image image = imageRegistry.get("" + imageDescriptor.hashCode()); //$NON-NLS-1$
if (image == null) {
image = imageDescriptor.createImage();
- imageRegistry.put("" + imageDescriptor.hashCode(), image);
+ imageRegistry.put("" + imageDescriptor.hashCode(), image); //$NON-NLS-1$
}
return image;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java
index 8582dd376..ee80ad0d4 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java
@@ -36,7 +36,7 @@ public class BugzillaSearchHandler extends AbstractSearchHandler {
String searchString) {
try {
String queryUrl = taskRepository.getRepositoryUrl()
- + "/buglist.cgi?long_desc_type=allwordssubstr&long_desc="
+ + "/buglist.cgi?long_desc_type=allwordssubstr&long_desc=" //$NON-NLS-1$
+ URLEncoder.encode(searchString, taskRepository.getCharacterEncoding());
query.setUrl(queryUrl);
} catch (UnsupportedEncodingException e) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
index 748284c35..26bfa2dd3 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
@@ -27,27 +27,27 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
*/
public class BugzillaUiExtensionReader {
- public static final String EXTENSION_LANGUAGES = "org.eclipse.mylyn.bugzilla.core.languages";
+ public static final String EXTENSION_LANGUAGES = "org.eclipse.mylyn.bugzilla.core.languages"; //$NON-NLS-1$
- public static final String EXTENSION_TMPL_LANGUAGE = "language";
+ public static final String EXTENSION_TMPL_LANGUAGE = "language"; //$NON-NLS-1$
- public static final String ATTR_LANG_VALUE = "value";
+ public static final String ATTR_LANG_VALUE = "value"; //$NON-NLS-1$
- public static final String ELMNT_LANG_NAME = "name";
+ public static final String ELMNT_LANG_NAME = "name"; //$NON-NLS-1$
- public static final String ELMNT_LANG_ERROR_LOGIN = "error_login";
+ public static final String ELMNT_LANG_ERROR_LOGIN = "error_login"; //$NON-NLS-1$
- public static final String ELMNT_LANG_ERROR_COLLISION = "error_collision";
+ public static final String ELMNT_LANG_ERROR_COLLISION = "error_collision"; //$NON-NLS-1$
- public static final String ELMNT_LANG_ERROR_COMMENT_REQIRED = "error_comment_required";
+ public static final String ELMNT_LANG_ERROR_COMMENT_REQIRED = "error_comment_required"; //$NON-NLS-1$
- public static final String ELMNT_LANG_ERROR_LOGGED_OUT = "error_logged_out";
+ public static final String ELMNT_LANG_ERROR_LOGGED_OUT = "error_logged_out"; //$NON-NLS-1$
- public static final String ELMNT_LANG_BAD_LOGIN = "bad_login";
+ public static final String ELMNT_LANG_BAD_LOGIN = "bad_login"; //$NON-NLS-1$
- public static final String ELMNT_LANG_PROCESSED = "processed";
+ public static final String ELMNT_LANG_PROCESSED = "processed"; //$NON-NLS-1$
- public static final String ELMNT_LANG_CHANGES_SUBMITTED = "changes_submitted";
+ public static final String ELMNT_LANG_CHANGES_SUBMITTED = "changes_submitted"; //$NON-NLS-1$
private static boolean coreExtensionsRead = false;
@@ -78,16 +78,16 @@ public class BugzillaUiExtensionReader {
for (IConfigurationElement configElement : element.getChildren()) {
String name = configElement.getName();
- if (name != null && name.equals("languageAttribute")) {
- String command = configElement.getAttribute("command");
- String response = configElement.getAttribute("response");
+ if (name != null && name.equals("languageAttribute")) { //$NON-NLS-1$
+ String command = configElement.getAttribute("command"); //$NON-NLS-1$
+ String response = configElement.getAttribute("response"); //$NON-NLS-1$
bugzillaLanguageSettings.addLanguageAttribute(command, response);
}
}
BugzillaRepositoryConnector.addLanguageSetting(bugzillaLanguageSettings);
} else {
StatusHandler.log(new Status(IStatus.WARNING, BugzillaUiPlugin.ID_PLUGIN,
- "Could not load language template extension " + element.getName()));
+ "Could not load language template extension " + element.getName())); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
index f9da94427..4c5248a69 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
@@ -33,43 +33,43 @@ import org.osgi.framework.BundleContext;
*/
public class BugzillaUiPlugin extends AbstractUIPlugin {
- public static final String ID_PLUGIN = "org.eclipse.mylyn.bugzilla.ui";
+ public static final String ID_PLUGIN = "org.eclipse.mylyn.bugzilla.ui"; //$NON-NLS-1$
- public static final String SEARCH_PAGE_ID = BugzillaUiPlugin.ID_PLUGIN + ".search.bugzillaSearchPage";
+ public static final String SEARCH_PAGE_ID = BugzillaUiPlugin.ID_PLUGIN + ".search.bugzillaSearchPage"; //$NON-NLS-1$
- public static final String SEARCH_PAGE_CONTEXT = BugzillaUiPlugin.ID_PLUGIN + ".bugzillaSearchContext";
+ public static final String SEARCH_PAGE_CONTEXT = BugzillaUiPlugin.ID_PLUGIN + ".bugzillaSearchContext"; //$NON-NLS-1$
- public static final String EDITOR_PAGE_CONTEXT = BugzillaUiPlugin.ID_PLUGIN + ".bugzillaEditorContext";
+ public static final String EDITOR_PAGE_CONTEXT = BugzillaUiPlugin.ID_PLUGIN + ".bugzillaEditorContext"; //$NON-NLS-1$
// The is's for hit markers used in the label provider and sorters
- public static final String HIT_MARKER_ATTR_ID = "taskId";
+ public static final String HIT_MARKER_ATTR_ID = "taskId"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_REPOSITORY = "repository";
+ public static final String HIT_MARKER_ATTR_REPOSITORY = "repository"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_HREF = "href";
+ public static final String HIT_MARKER_ATTR_HREF = "href"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_DESC = "summary";
+ public static final String HIT_MARKER_ATTR_DESC = "summary"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_LABEL = "label";
+ public static final String HIT_MARKER_ATTR_LABEL = "label"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_SEVERITY = "severity";
+ public static final String HIT_MARKER_ATTR_SEVERITY = "severity"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_PRIORITY = "priority";
+ public static final String HIT_MARKER_ATTR_PRIORITY = "priority"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_PLATFORM = "platform";
+ public static final String HIT_MARKER_ATTR_PLATFORM = "platform"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_STATE = "state";
+ public static final String HIT_MARKER_ATTR_STATE = "state"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_RESULT = "result";
+ public static final String HIT_MARKER_ATTR_RESULT = "result"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_OWNER = "owner";
+ public static final String HIT_MARKER_ATTR_OWNER = "owner"; //$NON-NLS-1$
- public static final String HIT_MARKER_ATTR_QUERY = "query";
+ public static final String HIT_MARKER_ATTR_QUERY = "query"; //$NON-NLS-1$
/**
* XXX: remove?
*/
- public static final String HIT_MARKER_ID = BugzillaUiPlugin.ID_PLUGIN + ".searchHit";
+ public static final String HIT_MARKER_ID = BugzillaUiPlugin.ID_PLUGIN + ".searchHit"; //$NON-NLS-1$
private static BugzillaUiPlugin plugin;
@@ -108,7 +108,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
*/
private static IPath getProductConfigurationCachePath() {
IPath stateLocation = Platform.getStateLocation(BugzillaCorePlugin.getDefault().getBundle());
- IPath configFile = stateLocation.append("repositoryConfigurations");
+ IPath configFile = stateLocation.append("repositoryConfigurations"); //$NON-NLS-1$
return configFile;
}
@@ -218,7 +218,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
}
int j = 0;
while (true) {
- int spaceIndex = origText.indexOf(" ", WRAP_LENGTH - 5);
+ int spaceIndex = origText.indexOf(" ", WRAP_LENGTH - 5); //$NON-NLS-1$
if (spaceIndex == origText.length() || spaceIndex == -1) {
textArray[j] = origText;
break;
@@ -228,13 +228,13 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
j++;
}
- String newText = "";
+ String newText = ""; //$NON-NLS-1$
for (String element : textArray) {
if (element == null) {
break;
}
- newText += element + "\n";
+ newText += element + "\n"; //$NON-NLS-1$
}
return newText;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java
index be7c1131e..d107b893d 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java
@@ -34,7 +34,7 @@ public class BugzillaUpdateAttachmentAction extends BaseSelectionListenerAction
private ISelection currentSelection;
public BugzillaUpdateAttachmentAction() {
- super("UPdateAttachmentAction");
+ super("UpdateAttachmentAction"); //$NON-NLS-1$
}
protected BugzillaUpdateAttachmentAction(String text) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/Messages.java
new file mode 100644
index 000000000..69d760655
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/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.bugzilla.ui.action;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.ui.action.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java
index fa88fa894..657ccc218 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java
@@ -47,7 +47,7 @@ public class UpdateAttachmentJob extends Job {
private final TaskEditor editor;
public UpdateAttachmentJob(List<ITaskAttachment> attachment, TaskEditor editor) {
- super("Update attachment");
+ super(Messages.getString("UpdateAttachmentJob.update_attachment")); //$NON-NLS-1$
this.attachment = attachment;
this.editor = editor;
}
@@ -63,19 +63,19 @@ public class UpdateAttachmentJob extends Job {
}
AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
task.getConnectorKind());
- monitor.beginTask("Update attachments", attachment.size() * 10 + 10);
+ monitor.beginTask(Messages.getString("UpdateAttachmentJob.update_attachments"), attachment.size() * 10 + 10); //$NON-NLS-1$
try {
for (ITaskAttachment taskAttachment : attachment) {
TaskAttribute taskAttribute = taskAttachment.getTaskAttribute();
TaskAttribute deprecated = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_DEPRECATED);
- if (deprecated.getValue().equals("1")) {
- deprecated.setValue("0");
+ if (deprecated.getValue().equals("1")) { //$NON-NLS-1$
+ deprecated.setValue("0"); //$NON-NLS-1$
} else {
- deprecated.setValue("1");
+ deprecated.setValue("1"); //$NON-NLS-1$
}
monitor.worked(10);
((BugzillaTaskDataHandler) connector.getTaskDataHandler()).postUpdateAttachment(
- taskAttachment.getTaskRepository(), taskAttribute, "update", monitor);
+ taskAttachment.getTaskRepository(), taskAttribute, "update", monitor); //$NON-NLS-1$
}
if (task != null) {
if (connector != null) {
@@ -97,7 +97,7 @@ public class UpdateAttachmentJob extends Job {
Section section = (Section) control;
EditorUtil.toggleExpandableComposite(true, section);
}
- bugzillaPage.getTaskEditor().setMessage("Obsolete toggeled successful",
+ bugzillaPage.getTaskEditor().setMessage(Messages.getString("UpdateAttachmentJob.obsolete_toggled_successful"), //$NON-NLS-1$
IMessageProvider.INFORMATION);
}
@@ -127,7 +127,7 @@ public class UpdateAttachmentJob extends Job {
final BugzillaTaskEditorPage bugzillaPage = (BugzillaTaskEditorPage) formPage;
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- bugzillaPage.getTaskEditor().setMessage("Obsolete toggeled was not successful",
+ bugzillaPage.getTaskEditor().setMessage(Messages.getString("UpdateAttachmentJob.obsolete_not_toggled"), //$NON-NLS-1$
IMessageProvider.ERROR);
}
});
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/messages.properties
new file mode 100644
index 000000000..4d39f3e14
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/messages.properties
@@ -0,0 +1,4 @@
+UpdateAttachmentJob.obsolete_not_toggled=Obsolete toggeled was not successful
+UpdateAttachmentJob.obsolete_toggled_successful=Obsolete toggeled successful
+UpdateAttachmentJob.update_attachment=Update attachment
+UpdateAttachmentJob.update_attachments=Update attachments
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java
index 5515686f1..d3a1b5ea9 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java
@@ -60,7 +60,7 @@ public class BugzillaKeywordAttributeEditor extends AbstractAttributeEditor {
keywordsText.setLayoutData(keywordsData);
keywordsText.setEditable(false);
- Button changeKeywordsButton = toolkit.createButton(keywordComposite, "Edit...", SWT.FLAT);
+ Button changeKeywordsButton = toolkit.createButton(keywordComposite, Messages.BugzillaKeywordAttributeEditor_Edit_, SWT.FLAT);
GridData keyWordsButtonData = new GridData();
changeKeywordsButton.setLayoutData(keyWordsButtonData);
changeKeywordsButton.addSelectionListener(new SelectionListener() {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java
index 586505b8f..dab471107 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java
@@ -33,7 +33,7 @@ public class BugzillaPeoplePart extends AbstractTaskEditorPart {
private static final int COLUMN_MARGIN = 5;
public BugzillaPeoplePart() {
- setPartName("People");
+ setPartName(Messages.BugzillaPeoplePart_People);
}
private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute) {
@@ -79,8 +79,8 @@ public class BugzillaPeoplePart extends AbstractTaskEditorPart {
TaskAttribute cc = getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey());
if (cc != 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.BugzillaPeoplePart__Select_to_remove_);
GridDataFactory.fillDefaults().indent(0, 5).align(SWT.CENTER, SWT.CENTER).applyTo(label);
}
@@ -206,4 +206,4 @@ public class BugzillaPeoplePart extends AbstractTaskEditorPart {
// }
// }
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java
index 427612ed7..5dde706bf 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java
@@ -43,7 +43,7 @@ public class BugzillaPlanningEditorPart extends AbstractTaskEditorPart {
BugzillaAttribute.DEADLINE);
public BugzillaPlanningEditorPart() {
- setPartName("Team Planning");
+ setPartName(Messages.BugzillaPlanningEditorPart_Team_Planning);
}
@Override
@@ -78,7 +78,7 @@ public class BugzillaPlanningEditorPart extends AbstractTaskEditorPart {
attributeEditor.createControl(timeComposite, toolkit);
getTaskEditorPage().getAttributeEditorToolkit().adapt(attributeEditor);
- Label label = toolkit.createLabel(timeComposite, "Current Estimate:");
+ Label label = toolkit.createLabel(timeComposite, Messages.BugzillaPlanningEditorPart_Current_Estimate);
label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
float total = 0;
try {
@@ -99,7 +99,7 @@ public class BugzillaPlanningEditorPart extends AbstractTaskEditorPart {
// ignore NumberFormatException
}
- Text currentEstimate = toolkit.createText(timeComposite, "" + total, SWT.FLAT | SWT.READ_ONLY);
+ Text currentEstimate = toolkit.createText(timeComposite, "" + total, SWT.FLAT | SWT.READ_ONLY); //$NON-NLS-1$
currentEstimate.setFont(TEXT_FONT);
toolkit.adapt(currentEstimate, false, false);
currentEstimate.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
@@ -121,7 +121,7 @@ public class BugzillaPlanningEditorPart extends AbstractTaskEditorPart {
}
if (addTimeAttribute != null) {
- addTimeAttribute.setValue("0");
+ addTimeAttribute.setValue("0"); //$NON-NLS-1$
attributeEditor = createAttributeEditor(addTimeAttribute);
attributeEditor.createLabelControl(timeComposite, toolkit);
attributeEditor.createControl(timeComposite, toolkit);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
index 62c2eb2bf..490fcc98e 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
@@ -36,7 +36,7 @@ import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
*/
public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
- public static final String ID_PART_BUGZILLA_PLANNING = "org.eclipse.mylyn.bugzilla.ui.editors.part.planning";
+ public static final String ID_PART_BUGZILLA_PLANNING = "org.eclipse.mylyn.bugzilla.ui.editors.part.planning"; //$NON-NLS-1$
public BugzillaTaskEditorPage(TaskEditor editor) {
super(editor, BugzillaCorePlugin.CONNECTOR_KIND);
@@ -136,7 +136,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
TaskAttribute summaryAttribute = getModel().getTaskData().getRoot().getMappedAttribute(TaskAttribute.SUMMARY);
if (summaryAttribute != null && summaryAttribute.getValue().length() == 0) {
- getTaskEditor().setMessage("Please enter a short summary before submitting", IMessageProvider.ERROR);
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting, IMessageProvider.ERROR);
AbstractTaskEditorPart part = getPart(ID_PART_SUMMARY);
if (part != null) {
part.setFocus();
@@ -147,7 +147,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
TaskAttribute componentAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
BugzillaAttribute.COMPONENT.getKey());
if (componentAttribute != null && componentAttribute.getValue().length() == 0) {
- getTaskEditor().setMessage("Please select a component before submitting", IMessageProvider.ERROR);
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_select_a_component_before_submitting, IMessageProvider.ERROR);
AbstractTaskEditorPart part = getPart(ID_PART_ATTRIBUTES);
if (part != null) {
part.setFocus();
@@ -158,7 +158,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
TaskAttribute descriptionAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
TaskAttribute.DESCRIPTION);
if (descriptionAttribute != null && descriptionAttribute.getValue().length() == 0) {
- getTaskEditor().setMessage("Please enter a description before submitting", IMessageProvider.ERROR);
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_description_before_submitting, IMessageProvider.ERROR);
AbstractTaskEditorPart descriptionPart = getPart(ID_PART_DESCRIPTION);
if (descriptionPart != null) {
descriptionPart.setFocus();
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java
index 8bee393f7..23b977679 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java
@@ -61,7 +61,7 @@ public class BugzillaTaskEditorPageFactory extends AbstractTaskEditorPageFactory
@Override
public String getPageText() {
- return "Bugzilla";
+ return "Bugzilla"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
index 54b69b4c1..d2ba620e2 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
@@ -54,7 +54,7 @@ public class BugzillaVotesEditor extends AbstractAttributeEditor {
((GridData) getLabelControl().getLayoutData()).exclude = true;
showVotes = toolkit.createHyperlink(parent, getTaskAttribute().getValue(), SWT.NONE);
showVotes.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- showVotes.setToolTipText("Show votes");
+ showVotes.setToolTipText(Messages.BugzillaVotesEditor_Show_votes);
showVotes.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -69,7 +69,7 @@ public class BugzillaVotesEditor extends AbstractAttributeEditor {
public void createLabelControl(Composite composite, FormToolkit toolkit) {
voteControl = toolkit.createHyperlink(composite, getLabel(), SWT.NONE);
voteControl.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- voteControl.setToolTipText("Vote");
+ voteControl.setToolTipText(Messages.BugzillaVotesEditor_Vote);
voteControl.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -88,7 +88,7 @@ public class BugzillaVotesEditor extends AbstractAttributeEditor {
voteControl.setLayoutData(gd);
- hiddenLabel = toolkit.createLabel(composite, "");
+ hiddenLabel = toolkit.createLabel(composite, ""); //$NON-NLS-1$
GridData data = new GridData();
data.exclude = true;
hiddenLabel.setLayoutData(data);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
index 5db193a63..794477dc4 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
@@ -40,8 +40,8 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
public FlagAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
super(manager, taskAttribute);
- if (taskAttribute.getAttribute("state") != null) {
- setReadOnly(taskAttribute.getAttribute("state").getMetaData().isReadOnly());
+ if (taskAttribute.getAttribute("state") != null) { //$NON-NLS-1$
+ setReadOnly(taskAttribute.getAttribute("state").getMetaData().isReadOnly()); //$NON-NLS-1$
}
}
@@ -84,16 +84,16 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
Assert.isLegal(index >= 0 && index <= values.length - 1);
setValue(values[index]);
if (requesteeText != null) {
- requesteeText.setEnabled(values[index].equals("?"));
+ requesteeText.setEnabled(values[index].equals("?")); //$NON-NLS-1$
}
}
}
});
}
- TaskAttribute requestee = getTaskAttribute().getAttribute("requestee");
+ TaskAttribute requestee = getTaskAttribute().getAttribute("requestee"); //$NON-NLS-1$
if (requestee != null && !requestee.getMetaData().isReadOnly()) {
requesteeText = toolkit.createText(composite, requestee.getValue());
- requesteeText.setEnabled("?".equals(getValueLabel()));
+ requesteeText.setEnabled("?".equals(getValueLabel())); //$NON-NLS-1$
GridData requesteeData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
requesteeData.widthHint = 78;
requesteeText.setLayoutData(requesteeData);
@@ -136,9 +136,9 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
}
public void setRequestee(String value) {
- TaskAttribute requestee = getTaskAttribute().getAttribute("requestee");
+ TaskAttribute requestee = getTaskAttribute().getAttribute("requestee"); //$NON-NLS-1$
if (requestee != null) {
- getAttributeMapper().setValue(getTaskAttribute().getAttribute("requestee"), value);
+ getAttributeMapper().setValue(getTaskAttribute().getAttribute("requestee"), value); //$NON-NLS-1$
attributeChanged();
}
}
@@ -152,19 +152,19 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
public String getLabel() {
String label = getAttributeMapper().getLabel(getAttributeMapper().getAssoctiatedAttribute(getTaskAttribute()));
if (label != null) {
- label.replace("&", "&&");
+ label.replace("&", "&&"); //$NON-NLS-1$//$NON-NLS-2$
} else {
- label = "";
+ label = ""; //$NON-NLS-1$
}
- TaskAttribute setter = getTaskAttribute().getAttribute("setter");
+ TaskAttribute setter = getTaskAttribute().getAttribute("setter"); //$NON-NLS-1$
if (setter != null) {
String setterValue = setter.getValue();
- if (setterValue != null && !setterValue.equals("")) {
- if (setterValue.indexOf("@") != 0) {
- setterValue = setterValue.substring(0, setterValue.indexOf("@"));
+ if (setterValue != null && !setterValue.equals("")) { //$NON-NLS-1$
+ if (setterValue.indexOf("@") != 0) { //$NON-NLS-1$
+ setterValue = setterValue.substring(0, setterValue.indexOf("@")); //$NON-NLS-1$
}
- label = setterValue + ": " + label;
+ label = setterValue + ": " + label; //$NON-NLS-1$
}
}
return label;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
index 3d9894430..b7215d6d4 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
@@ -45,7 +45,7 @@ public class KeywordsDialog extends Dialog {
public KeywordsDialog(Shell shell, String selectedKeywords, java.util.List<String> validKeywords) {
super(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
- StringTokenizer st = new StringTokenizer(selectedKeywords, ",", false);
+ StringTokenizer st = new StringTokenizer(selectedKeywords, ",", false); //$NON-NLS-1$
this.selectedKeywords = new ArrayList<String>();
while (st.hasMoreTokens()) {
String s = st.nextToken().trim();
@@ -57,7 +57,7 @@ public class KeywordsDialog extends Dialog {
@Override
protected Control createDialogArea(Composite parent) {
- getShell().setText("Select Keywords");
+ getShell().setText(Messages.KeywordsDialog_Select_Keywords);
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
@@ -125,6 +125,8 @@ public class KeywordsDialog extends Dialog {
parent.pack();
+ applyDialogFont(composite);
+
return composite;
}
@@ -149,16 +151,16 @@ public class KeywordsDialog extends Dialog {
for (String sel : selectedKeywords) {
keywords.append(sel);
- keywords.append(",");
+ keywords.append(","); //$NON-NLS-1$
}
String keywordsString = keywords.toString();
- if (keywordsString.endsWith(",")) {
+ if (keywordsString.endsWith(",")) { //$NON-NLS-1$
keywordsString = keywordsString.substring(0, keywordsString.length() - 1);
}
return keywordsString;
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java
new file mode 100644
index 000000000..a587f2796
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.bugzilla.ui.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.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 BugzillaKeywordAttributeEditor_Edit_;
+
+ public static String BugzillaPeoplePart_People;
+
+ public static String BugzillaPeoplePart__Select_to_remove_;
+
+ public static String BugzillaPlanningEditorPart_Current_Estimate;
+
+ public static String BugzillaPlanningEditorPart_Team_Planning;
+
+ public static String BugzillaTaskEditorPage_Please_enter_a_description_before_submitting;
+
+ public static String BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting;
+
+ public static String BugzillaTaskEditorPage_Please_select_a_component_before_submitting;
+
+ public static String BugzillaTaskEditorPage_Task_Submit_Error;
+
+ public static String BugzillaVotesEditor_Show_votes;
+
+ public static String BugzillaVotesEditor_Vote;
+
+ public static String KeywordsDialog_Select_Keywords;
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
new file mode 100644
index 000000000..ffdf646e1
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
@@ -0,0 +1,17 @@
+BugzillaKeywordAttributeEditor_Edit_=Edit...
+
+BugzillaPeoplePart_People=People
+BugzillaPeoplePart__Select_to_remove_=(Select to remove)
+
+BugzillaPlanningEditorPart_Current_Estimate=Current Estimate:
+BugzillaPlanningEditorPart_Team_Planning=Team Planning
+
+BugzillaTaskEditorPage_Please_enter_a_description_before_submitting=Please enter a description before submitting
+BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting=Please enter a short summary before submitting
+BugzillaTaskEditorPage_Please_select_a_component_before_submitting=Please select a component before submitting
+BugzillaTaskEditorPage_Task_Submit_Error=Task Submit Error
+
+BugzillaVotesEditor_Show_votes=Show votes
+BugzillaVotesEditor_Vote=Vote
+
+KeywordsDialog_Select_Keywords=Select Keywords
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index f03f0f185..2ee4c84c6 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
@@ -81,15 +82,13 @@ import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
*/
public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements Listener {
- private static final int LABEL_WIDTH = 58;
+ private static final String LABEL_VIEW_REPOSITORIES = Messages.BugzillaSearchPage_Task_Repositories;
- private static final String LABEL_VIEW_REPOSITORIES = "Task Repositories";
+ private static final String MESSAGE_NO_REPOSITORY = Messages.BugzillaSearchPage_No_repository_available;
- private static final String MESSAGE_NO_REPOSITORY = "No repository available, please add one using the Task Repositories view.";
+ private static final String NUM_DAYS_POSITIVE = Messages.BugzillaSearchPage_Number_of_days_must_be_a_positive_integer;
- private static final String NUM_DAYS_POSITIVE = "Number of days must be a positive integer. ";
-
- private static final String TITLE_BUGZILLA_QUERY = "Bugzilla Query";
+ private static final String TITLE_BUGZILLA_QUERY = Messages.BugzillaSearchPage_Bugzilla_Query;
private static final int HEIGHT_ATTRIBUTE_COMBO = 70;
@@ -109,23 +108,23 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private IDialogSettings fDialogSettings;
- private static final String[] patternOperationText = { "all words", "any word", "regexp", "notregexp" };
+ private static final String[] patternOperationText = { "all words", "any word", "regexp", "notregexp" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private static final String[] patternOperationValues = { "allwordssubstr", "anywordssubstr", "regexp", "notregexp" };
+ private static final String[] patternOperationValues = { "allwordssubstr", "anywordssubstr", "regexp", "notregexp" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private static final String[] emailOperationText = { "substring", "exact", "regexp", "notregexp" };
+ private static final String[] emailOperationText = { "substring", "exact", "regexp", "notregexp" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private static final String[] emailOperationValues = { "substring", "exact", "regexp", "notregexp" };
+ private static final String[] emailOperationValues = { "substring", "exact", "regexp", "notregexp" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- private static final String[] keywordOperationText = { "all", "any", "none" };
+ private static final String[] keywordOperationText = { "all", "any", "none" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String[] keywordOperationValues = { "allwords", "anywords", "nowords" };
+ private static final String[] keywordOperationValues = { "allwords", "anywords", "nowords" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- private static final String[] emailRoleValues = { "emailassigned_to1", "emailreporter1", "emailcc1",
- "emaillongdesc1" };
+ private static final String[] emailRoleValues = { "emailassigned_to1", "emailreporter1", "emailcc1", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "emaillongdesc1" }; //$NON-NLS-1$
- private static final String[] emailRoleValues2 = { "emailassigned_to2", "emailreporter2", "emailcc2",
- "emaillongdesc2" };
+ private static final String[] emailRoleValues2 = { "emailassigned_to2", "emailreporter2", "emailcc2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "emaillongdesc2" }; //$NON-NLS-1$
// dialog store id constants
private final static String DIALOG_BOUNDS_KEY = "ResizableDialogBounds"; //$NON-NLS-1$
@@ -210,49 +209,49 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Dialog store taskId constants
protected final static String PAGE_NAME = "BugzillaSearchPage"; //$NON-NLS-1$
- private static final String STORE_PRODUCT_ID = PAGE_NAME + ".PRODUCT";
+ private static final String STORE_PRODUCT_ID = PAGE_NAME + ".PRODUCT"; //$NON-NLS-1$
- private static final String STORE_COMPONENT_ID = PAGE_NAME + ".COMPONENT";
+ private static final String STORE_COMPONENT_ID = PAGE_NAME + ".COMPONENT"; //$NON-NLS-1$
- private static final String STORE_VERSION_ID = PAGE_NAME + ".VERSION";
+ private static final String STORE_VERSION_ID = PAGE_NAME + ".VERSION"; //$NON-NLS-1$
- private static final String STORE_MSTONE_ID = PAGE_NAME + ".MILESTONE";
+ private static final String STORE_MSTONE_ID = PAGE_NAME + ".MILESTONE"; //$NON-NLS-1$
- private static final String STORE_STATUS_ID = PAGE_NAME + ".STATUS";
+ private static final String STORE_STATUS_ID = PAGE_NAME + ".STATUS"; //$NON-NLS-1$
- private static final String STORE_RESOLUTION_ID = PAGE_NAME + ".RESOLUTION";
+ private static final String STORE_RESOLUTION_ID = PAGE_NAME + ".RESOLUTION"; //$NON-NLS-1$
- private static final String STORE_SEVERITY_ID = PAGE_NAME + ".SEVERITY";
+ private static final String STORE_SEVERITY_ID = PAGE_NAME + ".SEVERITY"; //$NON-NLS-1$
- private static final String STORE_PRIORITY_ID = PAGE_NAME + ".PRIORITY";
+ private static final String STORE_PRIORITY_ID = PAGE_NAME + ".PRIORITY"; //$NON-NLS-1$
- private static final String STORE_HARDWARE_ID = PAGE_NAME + ".HARDWARE";
+ private static final String STORE_HARDWARE_ID = PAGE_NAME + ".HARDWARE"; //$NON-NLS-1$
- private static final String STORE_OS_ID = PAGE_NAME + ".OS";
+ private static final String STORE_OS_ID = PAGE_NAME + ".OS"; //$NON-NLS-1$
- private static final String STORE_SUMMARYMATCH_ID = PAGE_NAME + ".SUMMARYMATCH";
+ private static final String STORE_SUMMARYMATCH_ID = PAGE_NAME + ".SUMMARYMATCH"; //$NON-NLS-1$
- private static final String STORE_COMMENTMATCH_ID = PAGE_NAME + ".COMMENTMATCH";
+ private static final String STORE_COMMENTMATCH_ID = PAGE_NAME + ".COMMENTMATCH"; //$NON-NLS-1$
- private static final String STORE_EMAILMATCH_ID = PAGE_NAME + ".EMAILMATCH";
+ private static final String STORE_EMAILMATCH_ID = PAGE_NAME + ".EMAILMATCH"; //$NON-NLS-1$
- private static final String STORE_EMAIL2MATCH_ID = PAGE_NAME + ".EMAIL2MATCH";
+ private static final String STORE_EMAIL2MATCH_ID = PAGE_NAME + ".EMAIL2MATCH"; //$NON-NLS-1$
- private static final String STORE_EMAILBUTTON_ID = PAGE_NAME + ".EMAILATTR";
+ private static final String STORE_EMAILBUTTON_ID = PAGE_NAME + ".EMAILATTR"; //$NON-NLS-1$
- private static final String STORE_EMAIL2BUTTON_ID = PAGE_NAME + ".EMAIL2ATTR";
+ private static final String STORE_EMAIL2BUTTON_ID = PAGE_NAME + ".EMAIL2ATTR"; //$NON-NLS-1$
- private static final String STORE_SUMMARYTEXT_ID = PAGE_NAME + ".SUMMARYTEXT";
+ private static final String STORE_SUMMARYTEXT_ID = PAGE_NAME + ".SUMMARYTEXT"; //$NON-NLS-1$
- private static final String STORE_COMMENTTEXT_ID = PAGE_NAME + ".COMMENTTEXT";
+ private static final String STORE_COMMENTTEXT_ID = PAGE_NAME + ".COMMENTTEXT"; //$NON-NLS-1$
- private static final String STORE_EMAILADDRESS_ID = PAGE_NAME + ".EMAILADDRESS";
+ private static final String STORE_EMAILADDRESS_ID = PAGE_NAME + ".EMAILADDRESS"; //$NON-NLS-1$
- private static final String STORE_EMAIL2ADDRESS_ID = PAGE_NAME + ".EMAIL2ADDRESS";
+ private static final String STORE_EMAIL2ADDRESS_ID = PAGE_NAME + ".EMAIL2ADDRESS"; //$NON-NLS-1$
- private static final String STORE_KEYWORDS_ID = PAGE_NAME + ".KEYWORDS";
+ private static final String STORE_KEYWORDS_ID = PAGE_NAME + ".KEYWORDS"; //$NON-NLS-1$
- private static final String STORE_KEYWORDSMATCH_ID = PAGE_NAME + ".KEYWORDSMATCH";
+ private static final String STORE_KEYWORDSMATCH_ID = PAGE_NAME + ".KEYWORDSMATCH"; //$NON-NLS-1$
// private static final String STORE_REPO_ID = PAGE_NAME + ".REPO";
@@ -320,8 +319,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
public BugzillaSearchPage(TaskRepository repository, IRepositoryQuery origQuery) {
super(TITLE_BUGZILLA_QUERY, repository, origQuery);
originalQuery = origQuery;
- setDescription("Select the Bugzilla query parameters. Use the Update Attributes button to retrieve "
- + "updated values from the repository.");
+ setDescription(Messages.BugzillaSearchPage_Select_the_Bugzilla_query_parameters);
// setTitle(TITLE);
// setDescription(DESCRIPTION);
// setPageComplete(false);
@@ -383,6 +381,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// // ignore
// }
// }
+ Dialog.applyDialogFont(control);
setControl(control);
PlatformUI.getWorkbench().getHelpSystem().setHelp(control, BugzillaUiPlugin.SEARCH_PAGE_CONTEXT);
restoreBounds();
@@ -406,7 +405,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (!inSearchContainer()) {
final Label queryTitleLabel = new Label(composite, SWT.NONE);
- queryTitleLabel.setText("&Query Title:");
+ queryTitleLabel.setText(Messages.BugzillaSearchPage_Query_Title);
queryTitle = new Text(composite, SWT.BORDER);
queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
@@ -419,8 +418,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Info text
Label labelSummary = new Label(composite, SWT.LEFT);
- labelSummary.setText("Summar&y:");
- labelSummary.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
+ labelSummary.setText(Messages.BugzillaSearchPage_Summary);
+// labelSummary.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
//labelSummary.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
// Pattern combo
@@ -441,7 +440,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Info text
Label labelComment = new Label(composite, SWT.LEFT);
- labelComment.setText("&Comment:");
+ labelComment.setText(Messages.BugzillaSearchPage_Comment);
//labelComment.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
// Comment pattern combo
@@ -461,7 +460,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
commentOperation.select(0);
Label labelEmail = new Label(composite, SWT.LEFT);
- labelEmail.setText("&Email:");
+ labelEmail.setText(Messages.BugzillaSearchPage_Email);
//labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
// pattern combo
@@ -494,16 +493,16 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
emailComposite.setLayout(emailLayout);
Button button0 = new Button(emailComposite, SWT.CHECK);
- button0.setText("owner");
+ button0.setText(Messages.BugzillaSearchPage_owner);
Button button1 = new Button(emailComposite, SWT.CHECK);
- button1.setText("reporter");
+ button1.setText(Messages.BugzillaSearchPage_reporter);
Button button2 = new Button(emailComposite, SWT.CHECK);
- button2.setText("cc");
+ button2.setText(Messages.BugzillaSearchPage_cc);
Button button3 = new Button(emailComposite, SWT.CHECK);
- button3.setText("commenter");
+ button3.setText(Messages.BugzillaSearchPage_commenter);
emailButtons = new Button[] { button0, button1, button2, button3 };
@@ -516,7 +515,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// Email2
Label labelEmail2 = new Label(composite, SWT.LEFT);
- labelEmail2.setText("Email &2:");
+ labelEmail2.setText(Messages.BugzillaSearchPage_Email_2);
//labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
// pattern combo
@@ -545,16 +544,16 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
emailComposite2.setLayout(emailLayout2);
Button e2button0 = new Button(emailComposite2, SWT.CHECK);
- e2button0.setText("owner");
+ e2button0.setText(Messages.BugzillaSearchPage_owner);
Button e2button1 = new Button(emailComposite2, SWT.CHECK);
- e2button1.setText("reporter");
+ e2button1.setText(Messages.BugzillaSearchPage_reporter);
Button e2button2 = new Button(emailComposite2, SWT.CHECK);
- e2button2.setText("cc");
+ e2button2.setText(Messages.BugzillaSearchPage_cc);
Button e2button3 = new Button(emailComposite2, SWT.CHECK);
- e2button3.setText("commenter");
+ e2button3.setText(Messages.BugzillaSearchPage_commenter);
emailButtons2 = new Button[] { e2button0, e2button1, e2button2, e2button3 };
@@ -567,8 +566,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
/////
Label labelKeywords = new Label(composite, SWT.NONE);
- labelKeywords.setText("&Keywords:");
- labelKeywords.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
+ labelKeywords.setText(Messages.BugzillaSearchPage_Keywords);
+// labelKeywords.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
//labelKeywords.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
Composite keywordsComposite = new Composite(composite, SWT.NONE);
@@ -609,7 +608,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
}
});
keywordsSelectButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- keywordsSelectButton.setText("Select...");
+ keywordsSelectButton.setText(Messages.BugzillaSearchPage_Select_);
SashForm sashForm = new SashForm(control, SWT.VERTICAL);
sashForm.setLayout(sashFormLayout);
final GridData gd_sashForm = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -632,7 +631,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
productComposite.setLayout(productLayout);
Label productLabel = new Label(productComposite, SWT.LEFT);
- productLabel.setText("&Product:");
+ productLabel.setText(Messages.BugzillaSearchPage_Product);
+ productLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridData productLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
productLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO;
@@ -663,7 +663,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
componentComposite.setLayout(componentLayout);
Label componentLabel = new Label(componentComposite, SWT.LEFT);
- componentLabel.setText("Compo&nent:");
+ componentLabel.setText(Messages.BugzillaSearchPage_Component);
+ componentLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
component = new List(componentComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
GridData componentLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -679,7 +680,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
versionComposite.setLayout(versionLayout);
Label versionLabel = new Label(versionComposite, SWT.LEFT);
- versionLabel.setText("Vers&ion:");
+ versionLabel.setText(Messages.BugzillaSearchPage_Version);
+ versionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
version = new List(versionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
GridData versionLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -695,7 +697,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
milestoneComposite.setLayout(milestoneLayout);
Label milestoneLabel = new Label(milestoneComposite, SWT.LEFT);
- milestoneLabel.setText("&Milestone:");
+ milestoneLabel.setText(Messages.BugzillaSearchPage_Milestone);
+ milestoneLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
target = new List(milestoneComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
GridData targetLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -721,7 +724,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
statusComposite.setLayout(statusLayout);
Label statusLabel = new Label(statusComposite, SWT.LEFT);
- statusLabel.setText("Stat&us:");
+ statusLabel.setText(Messages.BugzillaSearchPage_Status);
+ statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
status = new List(statusComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_status = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -738,7 +742,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
resolutionComposite.setLayout(resolutionLayout);
Label resolutionLabel = new Label(resolutionComposite, SWT.LEFT);
- resolutionLabel.setText("&Resolution:");
+ resolutionLabel.setText(Messages.BugzillaSearchPage_Resolution);
+ resolutionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
resolution = new List(resolutionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_resolution = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -755,7 +760,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
priorityComposite.setLayout(priorityLayout);
Label priorityLabel = new Label(priorityComposite, SWT.LEFT);
- priorityLabel.setText("Priori&ty:");
+ priorityLabel.setText(Messages.BugzillaSearchPage_PROORITY);
+ priorityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
priority = new List(priorityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_priority = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -772,7 +778,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
severityComposite.setLayout(severityLayout);
Label severityLabel = new Label(severityComposite, SWT.LEFT);
- severityLabel.setText("Se&verity:");
+ severityLabel.setText(Messages.BugzillaSearchPage_Severity);
+ severityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
severity = new List(severityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_severity = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -789,7 +796,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
hardwareComposite.setLayout(hardwareLayout);
Label hardwareLabel = new Label(hardwareComposite, SWT.LEFT);
- hardwareLabel.setText("Hard&ware:");
+ hardwareLabel.setText(Messages.BugzillaSearchPage_Hardware);
+ hardwareLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
hardware = new List(hardwareComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_hardware = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -806,7 +814,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
osComposite.setLayout(osLayout);
Label osLabel = new Label(osComposite, SWT.LEFT);
- osLabel.setText("&Operating System:");
+ osLabel.setText(Messages.BugzillaSearchPage_Operating_System);
+ osLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
os = new List(osComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
final GridData gd_os = new GridData(SWT.FILL, SWT.FILL, true, true);
@@ -828,7 +837,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
Label changedInTheLabel = new Label(composite, SWT.LEFT);
changedInTheLabel.setLayoutData(new GridData());
- changedInTheLabel.setText("Ch&anged in:");
+ changedInTheLabel.setText(Messages.BugzillaSearchPage_Changed_in);
Composite updateComposite = new Composite(composite, SWT.NONE);
updateComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
@@ -844,10 +853,10 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
daysText.addListener(SWT.Modify, this);
Label label = new Label(updateComposite, SWT.LEFT);
- label.setText(" days.");
+ label.setText(Messages.BugzillaSearchPage_days);
Button updateButton = new Button(updateComposite, SWT.PUSH);
- updateButton.setText("Up&date Attributes from Repository");
+ updateButton.setText(Messages.BugzillaSearchPage_Update_Attributes_from_Repository);
updateButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));
updateButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -1054,9 +1063,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(),
- "Bugzilla Search Page",
- "Unable to get configuration. Ensure proper repository configuration in "
- + LABEL_VIEW_REPOSITORIES + ".\n\n");
+ Messages.BugzillaSearchPage_Bugzilla_Search_Page,
+ Messages.BugzillaSearchPage_Unable_to_get_configuration
+ + LABEL_VIEW_REPOSITORIES + ".\n\n"); //$NON-NLS-1$
}
});
}
@@ -1078,7 +1087,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
*/
if (getTaskRepository() != null) {
IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
+ String repoId = "." + getTaskRepository().getRepositoryUrl(); //$NON-NLS-1$
if (getWizard() == null && restoreQueryOptions && settings.getArray(STORE_PRODUCT_ID + repoId) != null
&& product != null) {
product.setSelection(nonNullArray(settings, STORE_PRODUCT_ID + repoId));
@@ -1123,12 +1132,12 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (days.length() > 0) {
try {
if (Integer.parseInt(days) < 0) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
+ message = NUM_DAYS_POSITIVE + days + Messages.BugzillaSearchPage_is_invalid;
setErrorMessage(message);
return false;
}
} catch (NumberFormatException ex) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
+ message = NUM_DAYS_POSITIVE + days + Messages.BugzillaSearchPage_is_invalid;
setErrorMessage(message);
return false;
}
@@ -1144,7 +1153,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private BugzillaSearchData getPatternData(Combo widget, Combo operation,
ArrayList<BugzillaSearchData> previousSearchQueryData) {
String pattern = widget.getText();
- if (pattern == null || pattern.trim().equals("")) {
+ if (pattern == null || pattern.trim().equals("")) { //$NON-NLS-1$
return null;
}
BugzillaSearchData match = null;
@@ -1189,7 +1198,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// HACK make sure that the searches come back sorted by priority. This
// should be a search option though
- url.append("&order=Importance");
+ url.append("&order=Importance"); //$NON-NLS-1$
// url.append(BugzillaRepositoryUtil.contentTypeRDF);
return url.toString();
}
@@ -1205,7 +1214,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (sb.charAt(sb.length() - 1) != '/') {
sb.append('/');
}
- sb.append("buglist.cgi?");
+ sb.append("buglist.cgi?"); //$NON-NLS-1$
return sb;
}
@@ -1220,65 +1229,65 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
protected StringBuilder getQueryParameters() {
StringBuilder sb = new StringBuilder();
- sb.append("short_desc_type=");
+ sb.append("short_desc_type="); //$NON-NLS-1$
sb.append(patternOperationValues[summaryOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&short_desc=", summaryPattern.getText());
+ appendToBuffer(sb, "&short_desc=", summaryPattern.getText()); //$NON-NLS-1$
int[] selected = product.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&product=", product.getItem(element));
+ appendToBuffer(sb, "&product=", product.getItem(element)); //$NON-NLS-1$
}
selected = component.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&component=", component.getItem(element));
+ appendToBuffer(sb, "&component=", component.getItem(element)); //$NON-NLS-1$
}
selected = version.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&version=", version.getItem(element));
+ appendToBuffer(sb, "&version=", version.getItem(element)); //$NON-NLS-1$
}
selected = target.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&target_milestone=", target.getItem(element));
+ appendToBuffer(sb, "&target_milestone=", target.getItem(element)); //$NON-NLS-1$
}
- sb.append("&long_desc_type=");
+ sb.append("&long_desc_type="); //$NON-NLS-1$
sb.append(patternOperationValues[commentOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&long_desc=", commentPattern.getText());
+ appendToBuffer(sb, "&long_desc=", commentPattern.getText()); //$NON-NLS-1$
selected = status.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&bug_status=", status.getItem(element));
+ appendToBuffer(sb, "&bug_status=", status.getItem(element)); //$NON-NLS-1$
}
selected = resolution.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&resolution=", resolution.getItem(element));
+ appendToBuffer(sb, "&resolution=", resolution.getItem(element)); //$NON-NLS-1$
}
selected = severity.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&bug_severity=", severity.getItem(element));
+ appendToBuffer(sb, "&bug_severity=", severity.getItem(element)); //$NON-NLS-1$
}
selected = priority.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&priority=", priority.getItem(element));
+ appendToBuffer(sb, "&priority=", priority.getItem(element)); //$NON-NLS-1$
}
selected = hardware.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&ref_platform=", hardware.getItem(element));
+ appendToBuffer(sb, "&ref_platform=", hardware.getItem(element)); //$NON-NLS-1$
}
selected = os.getSelectionIndices();
for (int element : selected) {
- appendToBuffer(sb, "&op_sys=", os.getItem(element));
+ appendToBuffer(sb, "&op_sys=", os.getItem(element)); //$NON-NLS-1$
}
- if (emailPattern.getText() != null && !emailPattern.getText().trim().equals("")) {
+ if (emailPattern.getText() != null && !emailPattern.getText().trim().equals("")) { //$NON-NLS-1$
boolean selectionMade = false;
for (Button button : emailButtons) {
if (button.getSelection()) {
@@ -1289,18 +1298,18 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (selectionMade) {
for (int i = 0; i < emailButtons.length; i++) {
if (emailButtons[i].getSelection()) {
- sb.append("&");
+ sb.append("&"); //$NON-NLS-1$
sb.append(emailRoleValues[i]);
- sb.append("=1");
+ sb.append("=1"); //$NON-NLS-1$
}
}
- sb.append("&emailtype1=");
+ sb.append("&emailtype1="); //$NON-NLS-1$
sb.append(emailOperationValues[emailOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&email1=", emailPattern.getText());
+ appendToBuffer(sb, "&email1=", emailPattern.getText()); //$NON-NLS-1$
}
}
- if (emailPattern2.getText() != null && !emailPattern2.getText().trim().equals("")) {
+ if (emailPattern2.getText() != null && !emailPattern2.getText().trim().equals("")) { //$NON-NLS-1$
boolean selectionMade = false;
for (Button button : emailButtons2) {
if (button.getSelection()) {
@@ -1311,30 +1320,30 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (selectionMade) {
for (int i = 0; i < emailButtons2.length; i++) {
if (emailButtons2[i].getSelection()) {
- sb.append("&");
+ sb.append("&"); //$NON-NLS-1$
sb.append(emailRoleValues2[i]);
- sb.append("=1");
+ sb.append("=1"); //$NON-NLS-1$
}
}
- sb.append("&emailtype2=");
+ sb.append("&emailtype2="); //$NON-NLS-1$
sb.append(emailOperationValues[emailOperation2.getSelectionIndex()]);
- appendToBuffer(sb, "&email2=", emailPattern2.getText());
+ appendToBuffer(sb, "&email2=", emailPattern2.getText()); //$NON-NLS-1$
}
}
- if (daysText.getText() != null && !daysText.getText().equals("")) {
+ if (daysText.getText() != null && !daysText.getText().equals("")) { //$NON-NLS-1$
try {
Integer.parseInt(daysText.getText());
- appendToBuffer(sb, "&changedin=", daysText.getText());
+ appendToBuffer(sb, "&changedin=", daysText.getText()); //$NON-NLS-1$
} catch (NumberFormatException ignored) {
// this means that the days is not a number, so don't worry
}
}
- if (keywords.getText() != null && !keywords.getText().trim().equals("")) {
- sb.append("&keywords_type=");
+ if (keywords.getText() != null && !keywords.getText().trim().equals("")) { //$NON-NLS-1$
+ sb.append("&keywords_type="); //$NON-NLS-1$
sb.append(keywordOperationValues[keywordsOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&keywords=", keywords.getText().replace(',', ' '));
+ appendToBuffer(sb, "&keywords=", keywords.getText().replace(',', ' ')); //$NON-NLS-1$
}
return sb;
@@ -1349,6 +1358,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
}
}
+ @Override
public IDialogSettings getDialogSettings() {
IDialogSettings settings = BugzillaUiPlugin.getDefault().getDialogSettings();
fDialogSettings = settings.getSection(PAGE_NAME);
@@ -1417,6 +1427,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
}
}
+ @Override
public boolean canFlipToNextPage() {
// if (getErrorMessage() != null)
// return false;
@@ -1438,23 +1449,23 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// String serverName = startingUrl.substring(0,
// startingUrl.indexOf("?"));
- startingUrl = startingUrl.substring(startingUrl.indexOf("?") + 1);
- String[] options = startingUrl.split("&");
+ startingUrl = startingUrl.substring(startingUrl.indexOf("?") + 1); //$NON-NLS-1$
+ String[] options = startingUrl.split("&"); //$NON-NLS-1$
for (String option : options) {
- String key = option.substring(0, option.indexOf("="));
- String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1),
+ String key = option.substring(0, option.indexOf("=")); //$NON-NLS-1$
+ String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1), //$NON-NLS-1$
getTaskRepository().getCharacterEncoding());
if (key == null) {
continue;
}
- if (key.equals("short_desc")) {
+ if (key.equals("short_desc")) { //$NON-NLS-1$
summaryPattern.setText(value);
- } else if (key.equals("short_desc_type")) {
- if (value.equals("allwordssubstr")) {
- value = "all words";
- } else if (value.equals("anywordssubstr")) {
- value = "any word";
+ } else if (key.equals("short_desc_type")) { //$NON-NLS-1$
+ if (value.equals("allwordssubstr")) { //$NON-NLS-1$
+ value = "all words"; //$NON-NLS-1$
+ } else if (value.equals("anywordssubstr")) { //$NON-NLS-1$
+ value = "any word"; //$NON-NLS-1$
}
int index = 0;
for (String item : summaryOperation.getItems()) {
@@ -1466,7 +1477,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (index < summaryOperation.getItemCount()) {
summaryOperation.select(index);
}
- } else if (key.equals("product")) {
+ } else if (key.equals("product")) { //$NON-NLS-1$
String[] sel = product.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
@@ -1474,39 +1485,39 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
sel = new String[selList.size()];
product.setSelection(selList.toArray(sel));
updateAttributesFromConfiguration(selList.toArray(sel));
- } else if (key.equals("component")) {
+ } else if (key.equals("component")) { //$NON-NLS-1$
String[] sel = component.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
component.setSelection(selList.toArray(sel));
- } else if (key.equals("version")) {
+ } else if (key.equals("version")) { //$NON-NLS-1$
String[] sel = version.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
version.setSelection(selList.toArray(sel));
- } else if (key.equals("target_milestone")) { // XXX
+ } else if (key.equals("target_milestone")) { // XXX //$NON-NLS-1$
String[] sel = target.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
target.setSelection(selList.toArray(sel));
- } else if (key.equals("version")) {
+ } else if (key.equals("version")) { //$NON-NLS-1$
String[] sel = version.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
version.setSelection(selList.toArray(sel));
- } else if (key.equals("long_desc_type")) {
- if (value.equals("allwordssubstr")) {
- value = "all words";
- } else if (value.equals("anywordssubstr")) {
- value = "any word";
+ } else if (key.equals("long_desc_type")) { //$NON-NLS-1$
+ if (value.equals("allwordssubstr")) { //$NON-NLS-1$
+ value = "all words"; //$NON-NLS-1$
+ } else if (value.equals("anywordssubstr")) { //$NON-NLS-1$
+ value = "any word"; //$NON-NLS-1$
}
int index = 0;
for (String item : commentOperation.getItems()) {
@@ -1518,87 +1529,87 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (index < commentOperation.getItemCount()) {
commentOperation.select(index);
}
- } else if (key.equals("long_desc")) {
+ } else if (key.equals("long_desc")) { //$NON-NLS-1$
commentPattern.setText(value);
- } else if (key.equals("bug_status")) {
+ } else if (key.equals("bug_status")) { //$NON-NLS-1$
String[] sel = status.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
status.setSelection(selList.toArray(sel));
- } else if (key.equals("resolution")) {
+ } else if (key.equals("resolution")) { //$NON-NLS-1$
String[] sel = resolution.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
resolution.setSelection(selList.toArray(sel));
- } else if (key.equals("bug_severity")) {
+ } else if (key.equals("bug_severity")) { //$NON-NLS-1$
String[] sel = severity.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
severity.setSelection(selList.toArray(sel));
- } else if (key.equals("priority")) {
+ } else if (key.equals("priority")) { //$NON-NLS-1$
String[] sel = priority.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
priority.setSelection(selList.toArray(sel));
- } else if (key.equals("ref_platform")) {
+ } else if (key.equals("ref_platform")) { //$NON-NLS-1$
String[] sel = hardware.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
hardware.setSelection(selList.toArray(sel));
- } else if (key.equals("op_sys")) {
+ } else if (key.equals("op_sys")) { //$NON-NLS-1$
String[] sel = os.getSelection();
java.util.List<String> selList = Arrays.asList(sel);
selList = new ArrayList<String>(selList);
selList.add(value);
sel = new String[selList.size()];
os.setSelection(selList.toArray(sel));
- } else if (key.equals("emailassigned_to1")) { // HACK: email
+ } else if (key.equals("emailassigned_to1")) { // HACK: email //$NON-NLS-1$
// buttons
// assumed to be
// in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons[0].setSelection(true);
} else {
emailButtons[0].setSelection(false);
}
- } else if (key.equals("emailreporter1")) { // HACK: email
+ } else if (key.equals("emailreporter1")) { // HACK: email //$NON-NLS-1$
// buttons assumed
// to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons[1].setSelection(true);
} else {
emailButtons[1].setSelection(false);
}
- } else if (key.equals("emailcc1")) { // HACK: email buttons
+ } else if (key.equals("emailcc1")) { // HACK: email buttons //$NON-NLS-1$
// assumed to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons[2].setSelection(true);
} else {
emailButtons[2].setSelection(false);
}
- } else if (key.equals("emaillongdesc1")) { // HACK: email
+ } else if (key.equals("emaillongdesc1")) { // HACK: email //$NON-NLS-1$
// buttons assumed
// to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons[3].setSelection(true);
} else {
emailButtons[3].setSelection(false);
}
- } else if (key.equals("emailtype1")) {
+ } else if (key.equals("emailtype1")) { //$NON-NLS-1$
int index = 0;
for (String item : emailOperation.getItems()) {
if (item.compareTo(value) == 0) {
@@ -1609,45 +1620,45 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (index < emailOperation.getItemCount()) {
emailOperation.select(index);
}
- } else if (key.equals("email1")) {
+ } else if (key.equals("email1")) { //$NON-NLS-1$
emailPattern.setText(value);
- } else if (key.equals("emailassigned_to2")) { // HACK: email
+ } else if (key.equals("emailassigned_to2")) { // HACK: email //$NON-NLS-1$
// buttons
// assumed to be
// in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons2[0].setSelection(true);
} else {
emailButtons2[0].setSelection(false);
}
- } else if (key.equals("emailreporter2")) { // HACK: email
+ } else if (key.equals("emailreporter2")) { // HACK: email //$NON-NLS-1$
// buttons assumed
// to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons2[1].setSelection(true);
} else {
emailButtons2[1].setSelection(false);
}
- } else if (key.equals("emailcc2")) { // HACK: email buttons
+ } else if (key.equals("emailcc2")) { // HACK: email buttons //$NON-NLS-1$
// assumed to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons2[2].setSelection(true);
} else {
emailButtons2[2].setSelection(false);
}
- } else if (key.equals("emaillongdesc2")) { // HACK: email
+ } else if (key.equals("emaillongdesc2")) { // HACK: email //$NON-NLS-1$
// buttons assumed
// to be in same
// position
- if (value.equals("1")) {
+ if (value.equals("1")) { //$NON-NLS-1$
emailButtons2[3].setSelection(true);
} else {
emailButtons2[3].setSelection(false);
}
- } else if (key.equals("emailtype2")) {
+ } else if (key.equals("emailtype2")) { //$NON-NLS-1$
int index = 0;
for (String item : emailOperation2.getItems()) {
if (item.compareTo(value) == 0) {
@@ -1658,13 +1669,13 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
if (index < emailOperation2.getItemCount()) {
emailOperation2.select(index);
}
- } else if (key.equals("email2")) {
+ } else if (key.equals("email2")) { //$NON-NLS-1$
emailPattern2.setText(value);
- } else if (key.equals("changedin")) {
+ } else if (key.equals("changedin")) { //$NON-NLS-1$
daysText.setText(value);
- } else if (key.equals("keywords")) {
+ } else if (key.equals("keywords")) { //$NON-NLS-1$
keywords.setText(value.replace(' ', ','));
- } else if (key.equals("keywords_type")) {
+ } else if (key.equals("keywords_type")) { //$NON-NLS-1$
int index = 0;
for (String item : keywordOperationValues) {
if (item.equals(value)) {
@@ -1688,7 +1699,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private void restoreWidgetValues() {
try {
IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
+ String repoId = "." + getTaskRepository().getRepositoryUrl(); //$NON-NLS-1$
if (!restoreQueryOptions || settings.getArray(STORE_PRODUCT_ID + repoId) == null || product == null) {
return;
}
@@ -1731,8 +1742,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
}
}
+ @Override
public void saveState() {
- String repoId = "." + getTaskRepository().getRepositoryUrl();
+ String repoId = "." + getTaskRepository().getRepositoryUrl(); //$NON-NLS-1$
IDialogSettings settings = getDialogSettings();
settings.put(STORE_PRODUCT_ID + repoId, product.getSelection());
settings.put(STORE_COMPONENT_ID + repoId, component.getSelection());
@@ -1824,7 +1836,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
monitor = new NullProgressMonitor();
}
try {
- monitor.beginTask("Updating search options...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaSearchPage_Updating_search_options_,
+ IProgressMonitor.UNKNOWN);
repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(getTaskRepository(),
force, monitor);
} catch (final Exception e) {
@@ -1861,8 +1874,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
shell.setEnabled(false);
}
// TODO: eliminate use of internal api
- WebBrowserDialog dialog = new WebBrowserDialog(shell, "Error updating search options", null,
- cause.getStatus().getMessage(), NONE, new String[] { IDialogConstants.OK_LABEL }, 0,
+ WebBrowserDialog dialog = new WebBrowserDialog(shell,
+ Messages.BugzillaSearchPage_Error_updating_search_options, null, cause.getStatus()
+ .getMessage(), NONE, new String[] { IDialogConstants.OK_LABEL }, 0,
((RepositoryStatus) cause.getStatus()).getHtmlMessage());
dialog.setBlockOnOpen(true);
dialog.open();
@@ -1881,8 +1895,8 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
return;
}
- MessageDialog.openError(shell, "Error updating search options", "Error was: "
- + ex.getCause().getMessage());
+ MessageDialog.openError(shell, Messages.BugzillaSearchPage_Error_updating_search_options,
+ Messages.BugzillaSearchPage_Error_was_ + ex.getCause().getMessage());
return;
} catch (InterruptedException ex) {
@@ -1907,7 +1921,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
@Override
public String getQueryTitle() {
- return (queryTitle != null) ? queryTitle.getText() : "";
+ return (queryTitle != null) ? queryTitle.getText() : ""; //$NON-NLS-1$
}
private void setSelection(List listControl, String[] selection) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java
new file mode 100644
index 000000000..3d394f4e4
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.bugzilla.ui.search;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.ui.search.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 BugzillaSearchPage_Bugzilla_Query;
+
+ public static String BugzillaSearchPage_Bugzilla_Search_Page;
+
+ public static String BugzillaSearchPage_cc;
+
+ public static String BugzillaSearchPage_Changed_in;
+
+ public static String BugzillaSearchPage_Comment;
+
+ public static String BugzillaSearchPage_commenter;
+
+ public static String BugzillaSearchPage_Component;
+
+ public static String BugzillaSearchPage_Content_Assist_Available__X_;
+
+ public static String BugzillaSearchPage_days;
+
+ public static String BugzillaSearchPage_Email;
+
+ public static String BugzillaSearchPage_Email_2;
+
+ public static String BugzillaSearchPage_Error_updating_search_options;
+
+ public static String BugzillaSearchPage_Error_was_;
+
+ public static String BugzillaSearchPage_Hardware;
+
+ public static String BugzillaSearchPage_is_invalid;
+
+ public static String BugzillaSearchPage_Keywords;
+
+ public static String BugzillaSearchPage_Milestone;
+
+ public static String BugzillaSearchPage_No_repository_available;
+
+ public static String BugzillaSearchPage_Number_of_days_must_be_a_positive_integer;
+
+ public static String BugzillaSearchPage_Operating_System;
+
+ public static String BugzillaSearchPage_owner;
+
+ public static String BugzillaSearchPage_Product;
+
+ public static String BugzillaSearchPage_PROORITY;
+
+ public static String BugzillaSearchPage_Query_Title;
+
+ public static String BugzillaSearchPage_reporter;
+
+ public static String BugzillaSearchPage_Resolution;
+
+ public static String BugzillaSearchPage_Select_;
+
+ public static String BugzillaSearchPage_Select_the_Bugzilla_query_parameters;
+
+ public static String BugzillaSearchPage_Severity;
+
+ public static String BugzillaSearchPage_Status;
+
+ public static String BugzillaSearchPage_Summary;
+
+ public static String BugzillaSearchPage_Task_Repositories;
+
+ public static String BugzillaSearchPage_Unable_to_get_configuration;
+
+ public static String BugzillaSearchPage_Update_Attributes_from_Repository;
+
+ public static String BugzillaSearchPage_Updating_search_options_;
+
+ public static String BugzillaSearchPage_Version;
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties
new file mode 100644
index 000000000..d56a5897b
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties
@@ -0,0 +1,36 @@
+BugzillaSearchPage_Bugzilla_Query=Bugzilla Query
+BugzillaSearchPage_Bugzilla_Search_Page=Bugzilla Search Page
+BugzillaSearchPage_cc=cc
+BugzillaSearchPage_Changed_in=Ch&anged in:
+BugzillaSearchPage_Comment=&Comment:
+BugzillaSearchPage_commenter=commenter
+BugzillaSearchPage_Component=Compo&nent:
+BugzillaSearchPage_Content_Assist_Available__X_=Content Assist Available ({0})
+BugzillaSearchPage_days=\ days.
+BugzillaSearchPage_Email=&Email:
+BugzillaSearchPage_Email_2=Email &2:
+BugzillaSearchPage_Error_updating_search_options=Error updating search options
+BugzillaSearchPage_Error_was_=Error was:
+BugzillaSearchPage_Hardware=Hard&ware:
+BugzillaSearchPage_is_invalid=\ is invalid.
+BugzillaSearchPage_Keywords=&Keywords:
+BugzillaSearchPage_Milestone=&Milestone:
+BugzillaSearchPage_No_repository_available=No repository available, please add one using the Task Repositories view.
+BugzillaSearchPage_Number_of_days_must_be_a_positive_integer=Number of days must be a positive integer.
+BugzillaSearchPage_Operating_System=&Operating System:
+BugzillaSearchPage_owner=owner
+BugzillaSearchPage_Product=&Product:
+BugzillaSearchPage_PROORITY=Priori&ty:
+BugzillaSearchPage_Query_Title=&Query Title:
+BugzillaSearchPage_reporter=reporter
+BugzillaSearchPage_Resolution=&Resolution:
+BugzillaSearchPage_Select_=Select...
+BugzillaSearchPage_Select_the_Bugzilla_query_parameters=Select the Bugzilla query parameters. Use the Update Attributes button to retrieve updated values from the repository.
+BugzillaSearchPage_Severity=Se&verity:
+BugzillaSearchPage_Status=Stat&us:
+BugzillaSearchPage_Summary=Summar&y:
+BugzillaSearchPage_Task_Repositories=Task Repositories
+BugzillaSearchPage_Unable_to_get_configuration=Unable to get configuration. Ensure proper repository configuration in
+BugzillaSearchPage_Update_Attributes_from_Repository=Up&date Attributes from Repository
+BugzillaSearchPage_Updating_search_options_=Updating search options...
+BugzillaSearchPage_Version=Vers&ion:
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
index 263b9c6b5..70fab643d 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
@@ -12,6 +12,7 @@
package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
@@ -48,18 +49,18 @@ import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;
*/
public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
- private static final String regexp = "(duplicate of|bug|task)( ?#? ?)(\\d+)";
+ private static final String regexp = "(duplicate of|bug|task)( ?#? ?)(\\d+)"; //$NON-NLS-1$
private static final Pattern PATTERN = Pattern.compile(regexp, Pattern.CASE_INSENSITIVE);
@Override
public String getAccountCreationUrl(TaskRepository taskRepository) {
- return taskRepository.getRepositoryUrl() + "/createaccount.cgi";
+ return taskRepository.getRepositoryUrl() + "/createaccount.cgi"; //$NON-NLS-1$
}
@Override
public String getAccountManagementUrl(TaskRepository taskRepository) {
- return taskRepository.getRepositoryUrl() + "/userprefs.cgi";
+ return taskRepository.getRepositoryUrl() + "/userprefs.cgi"; //$NON-NLS-1$
}
@Override
@@ -70,11 +71,12 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
@Override
public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask) {
if (taskComment == null) {
- return "(In reply to comment #0)";
+ return Messages.BugzillaConnectorUi__In_reply_to_comment_0_;
} else if (includeTask) {
- return "(In reply to " + task.getTaskKey() + " comment #" + taskComment.getNumber() + ")";
+ return MessageFormat.format(Messages.BugzillaConnectorUi__In_reply_to_X_comment_X_, task.getTaskKey(),
+ taskComment.getNumber());
} else {
- return "(In reply to comment #" + taskComment.getNumber() + ")";
+ return MessageFormat.format(Messages.BugzillaConnectorUi__In_reply_to_comment_X_, taskComment.getNumber());
}
}
@@ -83,11 +85,11 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
@Override
public List<LegendElement> getLegendElements() {
List<LegendElement> legendItems = new ArrayList<LegendElement>();
- legendItems.add(LegendElement.createTask("blocker", BugzillaImages.OVERLAY_CRITICAL));
- legendItems.add(LegendElement.createTask("critical", BugzillaImages.OVERLAY_CRITICAL));
- legendItems.add(LegendElement.createTask("major", BugzillaImages.OVERLAY_MAJOR));
- legendItems.add(LegendElement.createTask("enhancement", BugzillaImages.OVERLAY_ENHANCEMENT));
- legendItems.add(LegendElement.createTask("trivial", BugzillaImages.OVERLAY_MINOR));
+ legendItems.add(LegendElement.createTask("blocker", BugzillaImages.OVERLAY_CRITICAL)); //$NON-NLS-1$
+ legendItems.add(LegendElement.createTask("critical", BugzillaImages.OVERLAY_CRITICAL)); //$NON-NLS-1$
+ legendItems.add(LegendElement.createTask("major", BugzillaImages.OVERLAY_MAJOR)); //$NON-NLS-1$
+ legendItems.add(LegendElement.createTask("enhancement", BugzillaImages.OVERLAY_ENHANCEMENT)); //$NON-NLS-1$
+ legendItems.add(LegendElement.createTask("trivial", BugzillaImages.OVERLAY_MINOR)); //$NON-NLS-1$
return legendItems;
}
@@ -96,13 +98,13 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
String severity = task.getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey());
if (severity != null) {
// XXX: refactor to use configuration
- if ("blocker".equals(severity) || "critical".equals(severity)) {
+ if ("blocker".equals(severity) || "critical".equals(severity)) { //$NON-NLS-1$ //$NON-NLS-2$
return BugzillaImages.OVERLAY_CRITICAL;
- } else if ("major".equals(severity)) {
+ } else if ("major".equals(severity)) { //$NON-NLS-1$
return BugzillaImages.OVERLAY_MAJOR;
- } else if ("enhancement".equals(severity)) {
+ } else if ("enhancement".equals(severity)) { //$NON-NLS-1$
return BugzillaImages.OVERLAY_ENHANCEMENT;
- } else if ("trivial".equals(severity) || "minor".equals(severity)) {
+ } else if ("trivial".equals(severity) || "minor".equals(severity)) { //$NON-NLS-1$ //$NON-NLS-2$
return BugzillaImages.OVERLAY_MINOR;
} else {
return null;
@@ -185,7 +187,7 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
int start = -1;
- if (m.group().startsWith("duplicate")) {
+ if (m.group().startsWith("duplicate")) { //$NON-NLS-1$
start = m.start() + m.group().indexOf(m.group(TASK_NUM_GROUP));
} else {
start = m.start();
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
index d789e1be0..1e309a6f7 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
@@ -29,7 +29,7 @@ import org.eclipse.swt.widgets.Text;
public class BugzillaCustomQueryDialog extends Dialog {
private String url;
- private String name = "";
+ private String name = ""; //$NON-NLS-1$
private String startingUrl = null;
@@ -67,7 +67,7 @@ public class BugzillaCustomQueryDialog extends Dialog {
custom.setLayout(gl);
Label l = new Label(custom, SWT.NONE);
- l.setText("Bugzilla Query Category Name");
+ l.setText(Messages.BugzillaCustomQueryDialog_Bugzilla_Query_Category_Name);
nameText = new Text(custom, SWT.BORDER | SWT.SINGLE);
if (name != null) {
@@ -78,7 +78,7 @@ public class BugzillaCustomQueryDialog extends Dialog {
nameText.setLayoutData(gd);
l = new Label(custom, SWT.NONE);
- l.setText("Max Hits Returned (-1 means all)");
+ l.setText(Messages.BugzillaCustomQueryDialog_Max_Hits_Returned__1_means_all_);
maxHitsText = new Text(custom, SWT.BORDER | SWT.SINGLE);
if (maxHits != null) {
@@ -89,7 +89,7 @@ public class BugzillaCustomQueryDialog extends Dialog {
maxHitsText.setLayoutData(gd);
l = new Label(custom, SWT.NONE);
- l.setText("Query URL");
+ l.setText(Messages.BugzillaCustomQueryDialog_Query_URL);
queryText = new Text(custom, SWT.BORDER | SWT.SINGLE);
if (startingUrl != null) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
index bb7782f5c..cdea8260a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
@@ -12,6 +12,7 @@
package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -33,13 +34,13 @@ import org.eclipse.swt.widgets.Text;
*/
public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
- private static final String LABEL_CUSTOM_TITLE = "&Query Title:";
+ private static final String LABEL_CUSTOM_TITLE = Messages.BugzillaCustomQueryWizardPage_Query_Title;
- private static final String LABEL_CUSTOM_QUERY = "Query &URL";
+ private static final String LABEL_CUSTOM_QUERY = Messages.BugzillaCustomQueryWizardPage_Query_URL;
- private static final String TITLE = "Create query from URL";
+ private static final String TITLE = Messages.BugzillaCustomQueryWizardPage_Create_query_from_URL;
- private static final String DESCRIPTION = "Enter the title and URL for the query";
+ private static final String DESCRIPTION = Messages.BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query;
private Text queryText;
@@ -91,6 +92,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
queryTitle.setText(query.getSummary());
queryText.setText(query.getUrl());
}
+ Dialog.applyDialogFont(composite);
}
@Override
@@ -109,7 +111,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
if (queryText.getText().length() > 0) {
return true;
}
- setErrorMessage("Please specify Query URL");
+ setErrorMessage(Messages.BugzillaCustomQueryWizardPage_Please_specify_Query_URL);
}
return false;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
index d85f9d9ba..ef43545e0 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
@@ -11,6 +11,7 @@
package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
@@ -27,13 +28,13 @@ import org.eclipse.swt.widgets.Composite;
*/
public class BugzillaQueryTypeWizardPage extends WizardPage {
- private static final String BUTTON_LABEL_QUERY = "&Create query from existing URL";
+ private static final String BUTTON_LABEL_QUERY = Messages.BugzillaQueryTypeWizardPage_Create_query_from_existing_URL;
- private static final String BUTTON_LABEL_FORM = "Cre&ate query using form";
+ private static final String BUTTON_LABEL_FORM = Messages.BugzillaQueryTypeWizardPage_Create_query_using_form;
- private static final String TITLE = "Choose query type";
+ private static final String TITLE = Messages.BugzillaQueryTypeWizardPage_Choose_query_type;
- private static final String DESCRIPTION = "Select from the available query types.";
+ private static final String DESCRIPTION = Messages.BugzillaQueryTypeWizardPage_Select_from_the_available_query_types;
private Button buttonCustom;
@@ -71,6 +72,7 @@ public class BugzillaQueryTypeWizardPage extends WizardPage {
setPageComplete(true);
setControl(composite);
+ Dialog.applyDialogFont(composite);
}
@Override
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
index 4f9de3b6e..79147f362 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
@@ -49,18 +49,18 @@ import org.eclipse.ui.PlatformUI;
*/
public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPage {
- private static final String TOOLTIP_AUTODETECTION_ENABLED = "Override auto detection of Platform and OS for new bug reports.";
+ private static final String TOOLTIP_AUTODETECTION_ENABLED = Messages.BugzillaRepositorySettingsPage_override_auto_detection_of_platform;
- private static final String TOOLTIP_AUTODETECTION_DISABLED = "Available once repository has been created.";
+ private static final String TOOLTIP_AUTODETECTION_DISABLED = Messages.BugzillaRepositorySettingsPage_available_once_repository_created;
- private static final String LABEL_SHORT_LOGINS = "Local users enabled:";
+ private static final String LABEL_SHORT_LOGINS = Messages.BugzillaRepositorySettingsPage_local_users_enabled;
- private static final String LABEL_VERSION_NUMBER = "2.18 - 3.0";
+ private static final String LABEL_VERSION_NUMBER = "2.18 - 3.0"; //$NON-NLS-1$
- private static final String TITLE = "Bugzilla Repository Settings";
+ private static final String TITLE = Messages.BugzillaRepositorySettingsPage_bugzilla_repository_settings;
- private static final String DESCRIPTION = "Supports Bugzilla " + LABEL_VERSION_NUMBER
- + "\nExample: https://bugs.eclipse.org/bugs (do not include index.cgi)";
+ private static final String DESCRIPTION = Messages.BugzillaRepositorySettingsPage_supports_bugzilla + LABEL_VERSION_NUMBER
+ + Messages.BugzillaRepositorySettingsPage_example_do_not_include;
protected Button autodetectPlatformOS;
@@ -117,7 +117,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
}
Label defaultPlatformLabel = new Label(parent, SWT.NONE);
- defaultPlatformLabel.setText("Autodetect platform and os");
+ defaultPlatformLabel.setText(Messages.BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS);
if (null == repository) {
defaultPlatformLabel.setToolTipText(TOOLTIP_AUTODETECTION_DISABLED);
} else {
@@ -143,7 +143,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
- monitor.beginTask("Retrieving repository configuration", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaRepositorySettingsPage_Retrieving_repository_configuration, IProgressMonitor.UNKNOWN);
repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
false, monitor);
if (repositoryConfiguration != null) {
@@ -193,7 +193,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
defaultOSCombo = new Combo(platformOSContainer, SWT.READ_ONLY);
populateOsCombo();
- new Label(parent, SWT.NONE).setText("Language: ");
+ new Label(parent, SWT.NONE).setText(Messages.BugzillaRepositorySettingsPage_Language_);
languageSettingCombo = new Combo(parent, SWT.DROP_DOWN);
for (BugzillaLanguageSettings bugzillaLanguageSettings : BugzillaCorePlugin.getDefault().getLanguageSettings()) {
@@ -201,7 +201,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
}
if (repository != null) {
String language = repository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language != null && !language.equals("") && languageSettingCombo.indexOf(language) >= 0) {
+ if (language != null && !language.equals("") && languageSettingCombo.indexOf(language) >= 0) { //$NON-NLS-1$
languageSettingCombo.select(languageSettingCombo.indexOf(language));
}
}
@@ -227,7 +227,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
defaultOSCombo.select(0);
}
} else {
- defaultOSCombo.add("All");
+ defaultOSCombo.add(Messages.BugzillaRepositorySettingsPage_All);
defaultOSCombo.select(0);
}
defaultOSCombo.getParent().pack(true);
@@ -249,7 +249,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
defaultPlatformCombo.select(0);
}
} else {
- defaultPlatformCombo.add("All");
+ defaultPlatformCombo.add(Messages.BugzillaRepositorySettingsPage_All);
defaultPlatformCombo.select(0);
}
defaultPlatformCombo.getParent().pack(true);
@@ -312,7 +312,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
IStatus status;
if (e instanceof MalformedURLException) {
status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Server URL is invalid.");
+ RepositoryStatus.ERROR_NETWORK, Messages.BugzillaRepositorySettingsPage_Server_URL_is_invalid);
} else if (e instanceof CoreException) {
status = ((CoreException) e).getStatus();
} else if (e instanceof IOException) {
@@ -331,7 +331,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
monitor = new NullProgressMonitor();
}
try {
- monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaRepositorySettingsPage_Validating_server_settings, IProgressMonitor.UNKNOWN);
BugzillaClient client = null;
client = BugzillaClientFactory.createClient(repository);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
index e1d808447..dab720840 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java
@@ -73,7 +73,7 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
Composite pageComposite = (Composite) children[children.length - 1];
Composite flagComposite = null;
for (BugzillaFlag bugzillaFlag : flags) {
- if (bugzillaFlag.getType().equals("bug")) {
+ if (bugzillaFlag.getType().equals("bug")) { //$NON-NLS-1$
continue;
}
if (!bugzillaFlag.isUsedIn(productAttribute.getValue(), componentAttribute.getValue())) {
@@ -84,26 +84,26 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
flagComposite = createFlagSection(pageComposite);
}
BugzillaFlagMapper mapper = new BugzillaFlagMapper();
- mapper.setRequestee("");
- mapper.setSetter("");
- mapper.setState(" ");
+ mapper.setRequestee(""); //$NON-NLS-1$
+ mapper.setSetter(""); //$NON-NLS-1$
+ mapper.setState(" "); //$NON-NLS-1$
mapper.setFlagId(bugzillaFlag.getName());
mapper.setNumber(0);
final TaskAttribute attribute = getModel().getAttribute().createAttribute(
- "task.common.kind.flag_type" + bugzillaFlag.getFlagId());
+ "task.common.kind.flag_type" + bugzillaFlag.getFlagId()); //$NON-NLS-1$
mapper.applyTo(attribute);
Label flagLiteral = new Label(flagComposite, SWT.NONE);
- flagLiteral.setText("" + bugzillaFlag.getName());
+ flagLiteral.setText("" + bugzillaFlag.getName()); //$NON-NLS-1$
flagLiteral.setToolTipText(bugzillaFlag.getDescription());
flagAttributes.add(bugzillaFlag);
final Combo flagState = new Combo(flagComposite, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
- flagState.add(" ");
+ flagState.add(" "); //$NON-NLS-1$
if (bugzillaFlag.isRequestable()) {
- flagState.add("?");
+ flagState.add("?"); //$NON-NLS-1$
}
- flagState.add("+");
- flagState.add("-");
+ flagState.add("+"); //$NON-NLS-1$
+ flagState.add("-"); //$NON-NLS-1$
if (bugzillaFlag.isRequestable() && bugzillaFlag.isSpecifically_requestable()) {
flagState.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 1, 1));
final Text requesteeText = new Text(flagComposite, SWT.BORDER);
@@ -111,7 +111,7 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
requesteeText.setEditable(false);
requesteeText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- TaskAttribute requesteeAttribute = attribute.getAttribute("requestee");
+ TaskAttribute requesteeAttribute = attribute.getAttribute("requestee"); //$NON-NLS-1$
if (requesteeAttribute != null) {
String value = requesteeText.getText().trim();
requesteeAttribute.setValue(value);
@@ -124,11 +124,11 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
}
public void widgetSelected(SelectionEvent e) {
- TaskAttribute state = attribute.getAttribute("state");
+ TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
if (state != null) {
String value = flagState.getItem(flagState.getSelectionIndex());
state.setValue(value);
- requesteeText.setEditable(value.equals("?"));
+ requesteeText.setEditable(value.equals("?")); //$NON-NLS-1$
}
}
});
@@ -140,7 +140,7 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
}
public void widgetSelected(SelectionEvent e) {
- TaskAttribute state = attribute.getAttribute("state");
+ TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
String value = flagState.getItem(flagState.getSelectionIndex());
if (state != null && value != null) {
state.setValue(value);
@@ -157,7 +157,7 @@ public class BugzillaTaskAttachmentPage extends TaskAttachmentPage {
| ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
flagExpandComposite.setFont(container.getFont());
flagExpandComposite.setBackground(container.getBackground());
- flagExpandComposite.setText("Flags");
+ flagExpandComposite.setText(Messages.BugzillaTaskAttachmentPage_flags);
flagExpandComposite.setLayout(new GridLayout(3, false));
GridData g = new GridData(GridData.FILL_HORIZONTAL);
g.horizontalSpan = 3;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java
index 356da178d..906634829 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java
@@ -28,11 +28,11 @@ import org.w3c.dom.Element;
*/
public class BugzillaTaskListMigrator extends AbstractTaskListMigrator {
- private static final String TAG_BUGZILLA_REPORT = "BugzillaReport";
+ private static final String TAG_BUGZILLA_REPORT = "BugzillaReport"; //$NON-NLS-1$
- private static final String KEY_SEVERITY = "bugzilla.severity";
+ private static final String KEY_SEVERITY = "bugzilla.severity"; //$NON-NLS-1$
- private static final String KEY_PRODUCT = "bugzilla.product";
+ private static final String KEY_PRODUCT = "bugzilla.product"; //$NON-NLS-1$
@Override
public String getConnectorKind() {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java
new file mode 100644
index 000000000..5412bf79d
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.bugzilla.ui.tasklist;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.ui.tasklist.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 BugzillaConnectorUi__In_reply_to_comment_X_;
+
+ public static String BugzillaConnectorUi__In_reply_to_X_comment_X_;
+
+ public static String BugzillaConnectorUi__In_reply_to_comment_0_;
+
+ public static String BugzillaCustomQueryDialog_Bugzilla_Query_Category_Name;
+
+ public static String BugzillaCustomQueryDialog_Max_Hits_Returned__1_means_all_;
+
+ public static String BugzillaCustomQueryDialog_Query_URL;
+
+ public static String BugzillaCustomQueryWizardPage_Create_query_from_URL;
+
+ public static String BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query;
+
+ public static String BugzillaCustomQueryWizardPage_Please_specify_Query_URL;
+
+ public static String BugzillaCustomQueryWizardPage_Query_Title;
+
+ public static String BugzillaCustomQueryWizardPage_Query_URL;
+
+ public static String BugzillaQueryTypeWizardPage_Choose_query_type;
+
+ public static String BugzillaQueryTypeWizardPage_Create_query_from_existing_URL;
+
+ public static String BugzillaQueryTypeWizardPage_Create_query_using_form;
+
+ public static String BugzillaQueryTypeWizardPage_Select_from_the_available_query_types;
+
+ public static String BugzillaRepositorySettingsPage_All;
+
+ public static String BugzillaRepositorySettingsPage_Automatic__Use_Validate_Settings_;
+
+ public static String BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS;
+
+ public static String BugzillaRepositorySettingsPage_available_once_repository_created;
+
+ public static String BugzillaRepositorySettingsPage_Available_once_repository_has_been_created;
+
+ public static String BugzillaRepositorySettingsPage_bugzilla_repository_settings;
+
+ public static String BugzillaRepositorySettingsPage_Bugzilla_Repository_Settings;
+
+ public static String BugzillaRepositorySettingsPage_example_do_not_include;
+
+ public static String BugzillaRepositorySettingsPage_EXAMPLE_HTTP_WWW_ECLIPSE_ORG_BUGS;
+
+ public static String BugzillaRepositorySettingsPage_Language_;
+
+ public static String BugzillaRepositorySettingsPage_local_users_enabled;
+
+ public static String BugzillaRepositorySettingsPage_Local_users_enabled;
+
+ public static String BugzillaRepositorySettingsPage_override_auto_detection_of_platform;
+
+ public static String BugzillaRepositorySettingsPage_Override_auto_detection_of_Platform_and_OS_for_new_bug_reports;
+
+ public static String BugzillaRepositorySettingsPage_Repository_version_;
+
+ public static String BugzillaRepositorySettingsPage_Retrieving_repository_configuration;
+
+ public static String BugzillaRepositorySettingsPage_Server_URL_is_invalid;
+
+ public static String BugzillaRepositorySettingsPage_supports_bugzilla;
+
+ public static String BugzillaRepositorySettingsPage_Validate_Settings_or_select_repository_version_under_Additional_Settings_section;
+
+ public static String BugzillaRepositorySettingsPage_Validating_server_settings;
+
+ public static String BugzillaTaskAttachmentPage_flags;
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
index d9ad81af6..7da62a1a2 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
@@ -105,11 +105,11 @@ public class StackTrace {
// setup the regex used to determine if it looks like we are at a
// stack trace and whether it is something that should be skipped
- String regexExceptionType = "^(.*\\.)+.+(Exception|Error|Throwable).*";
- String regexSkip = ".*\\.\\..*";
+ String regexExceptionType = "^(.*\\.)+.+(Exception|Error|Throwable).*"; //$NON-NLS-1$
+ String regexSkip = ".*\\.\\..*"; //$NON-NLS-1$
// get all of the individual lines for the string
- String[] lines = s.split("\r\n|\n");
+ String[] lines = s.split("\r\n|\n"); //$NON-NLS-1$
// the character start of the current stack trace
int charStackStart = 0;
@@ -205,8 +205,8 @@ public class StackTrace {
* charPos is updated as well as i
*/
private static String getNextAt(String[] lines, int[] i, int[] charPos) {
- String regexAtString = "^at.*";
- String regexEndString = ".*:\\d+\\)$";
+ String regexAtString = "^at.*"; //$NON-NLS-1$
+ String regexEndString = ".*:\\d+\\)$"; //$NON-NLS-1$
int index = i[0];
String l1, l2, l3, l4;
l1 = l2 = l3 = l4 = null;
@@ -289,9 +289,9 @@ public class StackTrace {
* @return The StackTrace for the given data
*/
private static StackTrace getStackTrace(List<String> l, int offset, int length, Object comment) {
- String s = "";
+ String s = ""; //$NON-NLS-1$
for (String s2 : l) {
- s += s2 + "\r\n";
+ s += s2 + "\r\n"; //$NON-NLS-1$
}
return new StackTrace(s, offset, length, comment);
@@ -352,21 +352,21 @@ public class StackTrace {
String sFixed = s;
// replace all special regex characters
- sFixed = sFixed.replaceAll("\\\\", "\\\\\\\\");
- sFixed = sFixed.replaceAll("\\$", "\\\\\\$");
- sFixed = sFixed.replaceAll("\\.", "\\\\.");
- sFixed = sFixed.replaceAll("\\?", "\\\\?");
- sFixed = sFixed.replaceAll("\\{", "\\\\{");
- sFixed = sFixed.replaceAll("\\}", "\\\\}");
- sFixed = sFixed.replaceAll("\\(", "\\\\(");
- sFixed = sFixed.replaceAll("\\)", "\\\\)");
- sFixed = sFixed.replaceAll("\\[", "\\\\[");
- sFixed = sFixed.replaceAll("\\]", "\\\\]");
- sFixed = sFixed.replaceAll("\\+", "\\\\+");
- sFixed = sFixed.replaceAll("\\*", "\\\\*");
- sFixed = sFixed.replaceAll("\\|", "\\\\|");
- sFixed = sFixed.replaceAll("\\^", "\\\\^");
- sFixed = sFixed.replaceAll("\\/", "\\\\/");
+ sFixed = sFixed.replaceAll("\\\\", "\\\\\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\$", "\\\\\\$"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\.", "\\\\."); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\?", "\\\\?"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\{", "\\\\{"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\}", "\\\\}"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\(", "\\\\("); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\)", "\\\\)"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\[", "\\\\["); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\]", "\\\\]"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\+", "\\\\+"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\*", "\\\\*"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\|", "\\\\|"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\^", "\\\\^"); //$NON-NLS-1$ //$NON-NLS-2$
+ sFixed = sFixed.replaceAll("\\/", "\\\\/"); //$NON-NLS-1$ //$NON-NLS-2$
return sFixed;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties
new file mode 100644
index 000000000..f3608418b
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties
@@ -0,0 +1,39 @@
+BugzillaConnectorUi__In_reply_to_comment_X_=(In reply to comment \#{0})
+BugzillaConnectorUi__In_reply_to_X_comment_X_=(In reply to {0} comment \#{1})
+BugzillaConnectorUi__In_reply_to_comment_0_=(In reply to comment \#0)
+BugzillaCustomQueryDialog_Bugzilla_Query_Category_Name=Bugzilla Query Category Name
+BugzillaCustomQueryDialog_Max_Hits_Returned__1_means_all_=Max Hits Returned (-1 means all)
+BugzillaCustomQueryDialog_Query_URL=Query URL
+
+BugzillaCustomQueryWizardPage_Create_query_from_URL=Create query from URL
+BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query=Enter the title and URL for the query
+BugzillaCustomQueryWizardPage_Please_specify_Query_URL=Please specify Query URL
+BugzillaCustomQueryWizardPage_Query_Title=&Query Title:
+BugzillaCustomQueryWizardPage_Query_URL=Query &URL
+
+BugzillaQueryTypeWizardPage_Choose_query_type=Choose query type
+BugzillaQueryTypeWizardPage_Create_query_from_existing_URL=&Create query from existing URL
+BugzillaQueryTypeWizardPage_Create_query_using_form=Cre&ate query using form
+BugzillaQueryTypeWizardPage_Select_from_the_available_query_types=Select from the available query types.
+
+BugzillaRepositorySettingsPage_All=All
+BugzillaRepositorySettingsPage_Automatic__Use_Validate_Settings_=Automatic (Use Validate Settings)
+BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS=Autodetect platform and os
+BugzillaRepositorySettingsPage_available_once_repository_created=Available once repository has been created.
+BugzillaRepositorySettingsPage_Available_once_repository_has_been_created=Available once repository has been created.
+BugzillaRepositorySettingsPage_bugzilla_repository_settings=Bugzilla Repository Settings
+BugzillaRepositorySettingsPage_Bugzilla_Repository_Settings=Bugzilla Repository Settings
+BugzillaRepositorySettingsPage_example_do_not_include=\nExample: https://bugs.eclipse.org/bugs (do not include index.cgi)
+BugzillaRepositorySettingsPage_EXAMPLE_HTTP_WWW_ECLIPSE_ORG_BUGS=Example: https://bugs.eclipse.org/bugs (do not include index.cgi)
+BugzillaRepositorySettingsPage_Language_=Language:
+BugzillaRepositorySettingsPage_local_users_enabled=Local users enabled:
+BugzillaRepositorySettingsPage_Local_users_enabled=Local users enabled:
+BugzillaRepositorySettingsPage_override_auto_detection_of_platform=Override auto detection of Platform and OS for new bug reports.
+BugzillaRepositorySettingsPage_Override_auto_detection_of_Platform_and_OS_for_new_bug_reports=Override auto detection of Platform and OS for new bug reports.
+BugzillaRepositorySettingsPage_Repository_version_=Repository version:
+BugzillaRepositorySettingsPage_Retrieving_repository_configuration=Retrieving repository configuration
+BugzillaRepositorySettingsPage_Server_URL_is_invalid=Server URL is invalid.
+BugzillaRepositorySettingsPage_supports_bugzilla=Supports Bugzilla
+BugzillaRepositorySettingsPage_Validate_Settings_or_select_repository_version_under_Additional_Settings_section=Validate Settings or select repository version under Additional Settings section.
+BugzillaRepositorySettingsPage_Validating_server_settings=Validating server settings
+BugzillaTaskAttachmentPage_flags=Flags
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
index e44886268..b998c9aaf 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
@@ -81,12 +82,12 @@ import org.eclipse.ui.progress.UIJob;
*/
public class BugzillaProductPage extends WizardPage {
- private static final String NEW_BUGZILLA_TASK_ERROR_TITLE = "New Bugzilla Task Error";
+ private static final String NEW_BUGZILLA_TASK_ERROR_TITLE = Messages.BugzillaProductPage_New_Bugzilla_Task_Error;
- private static final String DESCRIPTION = "Pick a product to open the new bug editor.\n"
- + "Press the Update button if the product is not in the list.";
+ private static final String DESCRIPTION = Messages.BugzillaProductPage_PICK_PRODUCT_TO_OPEN_NEW_BUG_EDITOR
+ + Messages.BugzillaProductPage_PRESS_UPDATE_BUTTON;
- private static final String LABEL_UPDATE = "Update Products from Repository";
+ private static final String LABEL_UPDATE = Messages.BugzillaProductPage_Update_Products_from_Repository;
/** The list of products to submit a bug report for */
private List<String> products = null;
@@ -110,12 +111,12 @@ public class BugzillaProductPage extends WizardPage {
* @param selection
*/
public BugzillaProductPage(TaskRepository repository) {
- super("Page1");
+ super(Messages.BugzillaProductPage_PAGE_1);
setTitle(IBugzillaConstants.TITLE_NEW_BUG);
setDescription(DESCRIPTION);
this.repository = repository;
- setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.ui",
- "icons/wizban/bug-wizard.gif"));
+ setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.ui", //$NON-NLS-1$
+ "icons/wizban/bug-wizard.gif")); //$NON-NLS-1$
}
@@ -176,9 +177,10 @@ public class BugzillaProductPage extends WizardPage {
public void selectionChanged(SelectionChangedEvent event) {
// Initialize a variable with the no error status
- Status status = new Status(IStatus.OK, BugzillaUiPlugin.ID_PLUGIN, 0, "", null);
+ Status status = new Status(IStatus.OK, BugzillaUiPlugin.ID_PLUGIN, 0, "", null); //$NON-NLS-1$
if (productViewer.getSelection().isEmpty()) {
- status = new Status(IStatus.ERROR, BugzillaUiPlugin.ID_PLUGIN, 0, "You must select a product", null);
+ status = new Status(IStatus.ERROR, BugzillaUiPlugin.ID_PLUGIN, 0,
+ Messages.BugzillaProductPage_YOU_MUST_SELECT_PRODUCT, null);
}
// Show the most serious error
@@ -192,7 +194,7 @@ public class BugzillaProductPage extends WizardPage {
// HACK: waiting on delayed refresh of filtered tree
final String[] selectedProducts = getSelectedProducts();
if (selectedProducts.length > 0) {
- new UIJob("") {
+ new UIJob("") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
if (BugzillaProductPage.this.getControl() != null
@@ -221,6 +223,7 @@ public class BugzillaProductPage extends WizardPage {
}
});
+ Dialog.applyDialogFont(composite);
// set the composite as the control for this page
setControl(composite);
@@ -242,7 +245,7 @@ public class BugzillaProductPage extends WizardPage {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(), NEW_BUGZILLA_TASK_ERROR_TITLE,
- "Unable to get products. Ensure proper repository configuration in task Repositories.");
+ Messages.BugzillaProductPage_Unable_to_get_products);
}
});
}
@@ -270,14 +273,14 @@ public class BugzillaProductPage extends WizardPage {
if (query != null && query.getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)) {
String queryUrl = query.getUrl();
- queryUrl = queryUrl.substring(queryUrl.indexOf("?") + 1);
- String[] options = queryUrl.split("&");
+ queryUrl = queryUrl.substring(queryUrl.indexOf("?") + 1); //$NON-NLS-1$
+ String[] options = queryUrl.split("&"); //$NON-NLS-1$
for (String option : options) {
- int index = option.indexOf("=");
+ int index = option.indexOf("="); //$NON-NLS-1$
if (index != -1) {
String key = option.substring(0, index);
- if ("product".equals(key)) {
+ if ("product".equals(key)) { //$NON-NLS-1$
try {
products.add(URLDecoder.decode(option.substring(index + 1),
repository.getCharacterEncoding()));
@@ -386,21 +389,22 @@ public class BugzillaProductPage extends WizardPage {
try {
getContainer().run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Updating repository report options...", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaProductPage_Updating_repository_report_options_,
+ IProgressMonitor.UNKNOWN);
try {
connector.updateRepositoryConfiguration(repository, monitor);
} catch (CoreException e) {
// TODO: remove exceptions from communication of connectivity errors to the user
if (e.getStatus().getException() instanceof GeneralSecurityException) {
StatusHandler.fail(new Status(IStatus.WARNING, BugzillaUiPlugin.ID_PLUGIN,
- "Bugzilla could not log you in to get the information you requested since login name or password is incorrect.\n"
- + "Please ensure your task repository is properly configured.", e));
+ "Bugzilla could not log you in to get the information you requested since login name or password is incorrect.\n" //$NON-NLS-1$
+ + "Please ensure your task repository is properly configured.", e)); //$NON-NLS-1$
} else if (e.getStatus().getException() instanceof IOException) {
StatusHandler.fail(new Status(IStatus.WARNING, BugzillaUiPlugin.ID_PLUGIN,
- "Connection Error, please ensure your task repository is properly configured.", e));
+ "Connection Error, please ensure your task repository is properly configured.", e)); //$NON-NLS-1$
} else {
StatusHandler.fail(new Status(IStatus.WARNING, BugzillaUiPlugin.ID_PLUGIN,
- "Error updating repository attributes for " + repository.getRepositoryUrl(), e));
+ "Error updating repository attributes for " + repository.getRepositoryUrl(), e)); //$NON-NLS-1$
}
return;
}
@@ -412,8 +416,9 @@ public class BugzillaProductPage extends WizardPage {
} catch (final CoreException e) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page",
- "Unable to get configuration. Ensure proper repository configuration in Task Repositories");
+ MessageDialog.openError(Display.getDefault().getActiveShell(),
+ Messages.BugzillaProductPage_Bugzilla_Search_Page,
+ Messages.BugzillaProductPage_Unable_to_get_configuration);
}
});
}
@@ -427,8 +432,8 @@ public class BugzillaProductPage extends WizardPage {
});
} catch (InvocationTargetException ex) {
- MessageDialog.openError(null, "Error updating product list", "Error reported:\n"
- + ex.getCause().getMessage());
+ MessageDialog.openError(null, Messages.BugzillaProductPage_Error_updating_product_list,
+ Messages.BugzillaProductPage_Error_reported + ex.getCause().getMessage());
} catch (InterruptedException ex) {
// canceled
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java
new file mode 100644
index 000000000..971007644
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.bugzilla.ui.wizard;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.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 BugzillaProductPage_Bugzilla_Search_Page;
+ public static String BugzillaProductPage_Error_reported;
+ public static String BugzillaProductPage_Error_updating_product_list;
+ public static String BugzillaProductPage_New_Bugzilla_Task_Error;
+ public static String BugzillaProductPage_PAGE_1;
+ public static String BugzillaProductPage_PICK_PRODUCT_TO_OPEN_NEW_BUG_EDITOR;
+ public static String BugzillaProductPage_PRESS_UPDATE_BUTTON;
+ public static String BugzillaProductPage_Unable_to_get_configuration;
+ public static String BugzillaProductPage_Unable_to_get_products;
+ public static String BugzillaProductPage_Update_Products_from_Repository;
+ public static String BugzillaProductPage_Updating_repository_report_options_;
+ public static String BugzillaProductPage_YOU_MUST_SELECT_PRODUCT;
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties
new file mode 100644
index 000000000..078235251
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties
@@ -0,0 +1,12 @@
+BugzillaProductPage_Bugzilla_Search_Page=Bugzilla Search Page
+BugzillaProductPage_Error_reported=Error reported:\n
+BugzillaProductPage_Error_updating_product_list=Error updating product list
+BugzillaProductPage_New_Bugzilla_Task_Error=New Bugzilla Task Error
+BugzillaProductPage_PAGE_1=Page1
+BugzillaProductPage_PICK_PRODUCT_TO_OPEN_NEW_BUG_EDITOR=Pick a product to open the new bug editor.\n
+BugzillaProductPage_PRESS_UPDATE_BUTTON=Press the Update button if the product is not in the list.
+BugzillaProductPage_Unable_to_get_configuration=Unable to get configuration. Ensure proper repository configuration in Task Repositories
+BugzillaProductPage_Unable_to_get_products=Unable to get products. Ensure proper repository configuration in task Repositories.
+BugzillaProductPage_Update_Products_from_Repository=Update Products from Repository
+BugzillaProductPage_Updating_repository_report_options_=Updating repository report options...
+BugzillaProductPage_YOU_MUST_SELECT_PRODUCT=You must select a product

Back to the top