Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-05-17 18:49:39 -0400
committerspingel2011-05-17 18:49:39 -0400
commit02d2d18e59ddea9d2f68d13bdb2a515514c150d2 (patch)
tree37278ccee97323d6abc05b86d00f7586053edb09
parentca74f06c279b54cf535017d512cb76af3e096492 (diff)
downloadorg.eclipse.mylyn.incubator-02d2d18e59ddea9d2f68d13bdb2a515514c150d2.tar.gz
org.eclipse.mylyn.incubator-02d2d18e59ddea9d2f68d13bdb2a515514c150d2.tar.xz
org.eclipse.mylyn.incubator-02d2d18e59ddea9d2f68d13bdb2a515514c150d2.zip
NEW - bug 262365: [patch][web connector] externalize strings for org.eclipse.mylyn.web.tasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=262365
-rw-r--r--org.eclipse.mylyn.web.tasks/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.web.tasks/build.properties5
-rw-r--r--org.eclipse.mylyn.web.tasks/plugin.properties3
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Messages.java119
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/NamedPattern.java2
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParameterEditorDialog.java16
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParametersEditor.java14
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/TasksWebPlugin.java2
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Util.java2
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebContentProposalProvider.java28
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebImages.java10
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebQueryWizardPage.java52
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositoryConnector.java110
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java29
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskEditorPageFactory.java4
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskListMigrator.java12
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/messages.properties47
17 files changed, 319 insertions, 141 deletions
diff --git a/org.eclipse.mylyn.web.tasks/META-INF/MANIFEST.MF b/org.eclipse.mylyn.web.tasks/META-INF/MANIFEST.MF
index bb8a4d58..836d9fec 100644
--- a/org.eclipse.mylyn.web.tasks/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.web.tasks/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Web Templates Connector (Incubation)
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.web.tasks;singleton:=true
Bundle-Version: 3.6.0.qualifier
Bundle-Activator: org.eclipse.mylyn.internal.web.tasks.TasksWebPlugin
-Bundle-Vendor: Eclipse Mylyn
+Bundle-Vendor: %Bundle-Vendor
Require-Bundle: com.sun.syndication;bundle-version="0.9.0",
org.jdom;bundle-version="1.0.0",
org.eclipse.core.runtime,
@@ -18,3 +18,4 @@ Require-Bundle: com.sun.syndication;bundle-version="0.9.0",
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.mylyn.internal.web.tasks;x-internal:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
diff --git a/org.eclipse.mylyn.web.tasks/build.properties b/org.eclipse.mylyn.web.tasks/build.properties
index 3701a2e8..91a17592 100644
--- a/org.eclipse.mylyn.web.tasks/build.properties
+++ b/org.eclipse.mylyn.web.tasks/build.properties
@@ -11,5 +11,6 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
icons/,\
- about.html
-src.includes = about.html
+ about.html,\
+ plugin.properties
+src.includes = about.html \ No newline at end of file
diff --git a/org.eclipse.mylyn.web.tasks/plugin.properties b/org.eclipse.mylyn.web.tasks/plugin.properties
new file mode 100644
index 00000000..ade762b0
--- /dev/null
+++ b/org.eclipse.mylyn.web.tasks/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.mylyn.web.tasks
+Bundle-Vendor = Eclipse Mylyn
+Bundle-Name = Mylyn Web Templates Connector (Incubation)
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Messages.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Messages.java
new file mode 100644
index 00000000..0775c99e
--- /dev/null
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Messages.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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.web.tasks;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.web.tasks.messages"; //$NON-NLS-1$
+
+ public static String ParameterEditorDialog_New_Property;
+
+ public static String ParameterEditorDialog_Edit_Property;
+
+ public static String ParameterEditorDialog_Name_;
+
+ public static String ParameterEditorDialog_Value_;
+
+ public static String ParameterEditorDialog_Name_should_be_Java_identifier;
+
+ public static String ParametersEditor_Parameter;
+
+ public static String ParametersEditor_Value;
+
+ public static String ParametersEditor_Add_;
+
+ public static String ParametersEditor_Remove_;
+
+ public static String ParametersEditor_Edit_;
+
+ public static String WebQueryWizardPage_Advanced_Configuration;
+
+ public static String WebQueryWizardPage_complete;
+
+ public static String WebQueryWizardPage_Create_web_query;
+
+ public static String WebQueryWizardPage_Description;
+
+ public static String WebQueryWizardPage_Id;
+
+ public static String WebQueryWizardPage_incomplete;
+
+ public static String WebQueryWizardPage_New_web_query;
+
+ public static String WebQueryWizardPage_No_matching_results_Check_query_regexp;
+
+ public static String WebQueryWizardPage_Open;
+
+ public static String WebQueryWizardPage_Opening_Browser;
+
+ public static String WebQueryWizardPage_Owner;
+
+ public static String WebQueryWizardPage_Parsing_error_;
+
+ public static String WebQueryWizardPage_Preview;
+
+ public static String WebQueryWizardPage_Query_Pattern_;
+
+ public static String WebQueryWizardPage_Query_result;
+
+ public static String WebQueryWizardPage_Query_Title_;
+
+ public static String WebQueryWizardPage_Query_URL_;
+
+ public static String WebQueryWizardPage_Specify_query_parameters_for_X;
+
+ public static String WebQueryWizardPage_Status;
+
+ public static String WebQueryWizardPage_Type;
+
+ public static String WebQueryWizardPage_Unable_to_fetch_resource_;
+
+ public static String WebQueryWizardPage_Updating_preview;
+
+ public static String WebRepositoryConnector_Require_two_matching_groups;
+
+ public static String WebRepositoryConnector_Web_Template_Advanced_;
+
+ public static String WebRepositoryConnector_Failed_to_parse_RSS_feed;
+
+ public static String WebRepositoryConnector_Could_not_fetch_resource;
+
+ public static String WebRepositorySettingsPage_Web_Repository_Settings;
+
+ public static String WebRepositorySettingsPage_Select_server_template_example_and_modify_to_match_settings_for_your_project;
+
+ public static String WebRepositorySettingsPage_Login_Form_URL_;
+
+ public static String WebRepositorySettingsPage_Login_Token_Pattern;
+
+ public static String WebRepositorySettingsPage_Advanced_Configuration;
+
+ public static String WebRepositorySettingsPage_Task_URL_;
+
+ public static String WebRepositorySettingsPage_New_Task_URL_;
+
+ public static String WebRepositorySettingsPage_Query_Request_URL_;
+
+ public static String WebRepositorySettingsPage_Query_Pattern_;
+
+ public static String WebRepositorySettingsPage_Login_Request_URL_;
+
+ public static String WebTaskEditorPageFactory_Browser;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/NamedPattern.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/NamedPattern.java
index 12dcbb53..6cd64782 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/NamedPattern.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/NamedPattern.java
@@ -51,7 +51,7 @@ public class NamedPattern {
private String prepare(String namedRegex) {
StringBuilder regex = new StringBuilder();
- Matcher m = Pattern.compile("\\((\\{(\\S+?)})").matcher(namedRegex);
+ Matcher m = Pattern.compile("\\((\\{(\\S+?)})").matcher(namedRegex); //$NON-NLS-1$
int pos = 0;
while (m.find()) {
groups.add(m.group(2));
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParameterEditorDialog.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParameterEditorDialog.java
index e02c959c..ce9fba30 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParameterEditorDialog.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParameterEditorDialog.java
@@ -44,12 +44,12 @@ public class ParameterEditorDialog extends Dialog {
public ParameterEditorDialog(Shell parent) {
super(parent);
- this.title = "New Property";
+ this.title = Messages.ParameterEditorDialog_New_Property;
}
public ParameterEditorDialog(Shell parent, String name, String value) {
super(parent);
- this.title = "Edit Property";
+ this.title = Messages.ParameterEditorDialog_Edit_Property;
this.name = name;
this.value = value;
}
@@ -62,7 +62,7 @@ public class ParameterEditorDialog extends Dialog {
composite.setLayout(gridLayout);
Label nameLabel = new Label(composite, SWT.NONE);
- nameLabel.setText("&Name:");
+ nameLabel.setText(Messages.ParameterEditorDialog_Name_);
nameText = new Text(composite, SWT.BORDER);
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
@@ -71,7 +71,7 @@ public class ParameterEditorDialog extends Dialog {
Label valueLabel = new Label(composite, SWT.NONE);
valueLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
- valueLabel.setText("&Value:");
+ valueLabel.setText(Messages.ParameterEditorDialog_Value_);
valueText = new Text(composite, SWT.BORDER);
GridData gridData_1 = new GridData(SWT.FILL, SWT.CENTER, true, false);
@@ -99,6 +99,8 @@ public class ParameterEditorDialog extends Dialog {
status = new Text(composite, SWT.READ_ONLY);
status.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ applyDialogFont(composite);
+
return composite;
}
@@ -125,7 +127,7 @@ public class ParameterEditorDialog extends Dialog {
private boolean isValid() {
if (name.length() == 0 || !Character.isLetter(name.charAt(0))) {
- status.setText("Name should be a Java identifier");
+ status.setText(Messages.ParameterEditorDialog_Name_should_be_Java_identifier);
return false;
}
for (int i = 1; i < name.length(); i++) {
@@ -133,10 +135,10 @@ public class ParameterEditorDialog extends Dialog {
if (Character.isLetterOrDigit(c) || c == '_' || c == '-') {
continue;
}
- status.setText("Name should be a Java identifier");
+ status.setText(Messages.ParameterEditorDialog_Name_should_be_Java_identifier);
return false;
}
- status.setText("");
+ status.setText(""); //$NON-NLS-1$
return true;
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParametersEditor.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParametersEditor.java
index fec180fd..5d8fb060 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParametersEditor.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/ParametersEditor.java
@@ -53,15 +53,15 @@ public class ParametersEditor extends Composite {
TableColumn colVariable = new TableColumn(paramsTable, SWT.NONE);
colVariable.setWidth(170);
- colVariable.setText("Parameter");
+ colVariable.setText(Messages.ParametersEditor_Parameter);
TableColumn colValue = new TableColumn(paramsTable, SWT.NONE);
colValue.setWidth(280);
- colValue.setText("Value");
+ colValue.setText(Messages.ParametersEditor_Value);
Button bAdd = new Button(this, SWT.NONE);
bAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
- bAdd.setText("&Add...");
+ bAdd.setText(Messages.ParametersEditor_Add_);
bAdd.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -75,7 +75,7 @@ public class ParametersEditor extends Composite {
final Button bRemove = new Button(this, SWT.NONE);
bRemove.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
- bRemove.setText("&Remove");
+ bRemove.setText(Messages.ParametersEditor_Remove_);
bRemove.setEnabled(false);
bRemove.addSelectionListener(new SelectionAdapter() {
@Override
@@ -87,7 +87,7 @@ public class ParametersEditor extends Composite {
final Button bEdit = new Button(this, SWT.NONE);
bEdit.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, true));
- bEdit.setText("&Edit...");
+ bEdit.setText(Messages.ParametersEditor_Edit_);
bEdit.setEnabled(false);
bEdit.addSelectionListener(new SelectionAdapter() {
@Override
@@ -137,7 +137,7 @@ public class ParametersEditor extends Composite {
params.put(key.substring(WebRepositoryConnector.PARAM_PREFIX.length()), value);
}
for (String var : WebRepositoryConnector.getTemplateVariables(value)) {
- variables.put(var, "");
+ variables.put(var, ""); //$NON-NLS-1$
}
}
@@ -147,7 +147,7 @@ public class ParametersEditor extends Composite {
for (String var : variables.keySet()) {
if (!params.containsKey(var)) {
- params.put(var, "");
+ params.put(var, ""); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/TasksWebPlugin.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/TasksWebPlugin.java
index d42d8b85..38a1dd80 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/TasksWebPlugin.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/TasksWebPlugin.java
@@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
*/
public class TasksWebPlugin extends AbstractUIPlugin {
- public static final String ID_PLUGIN = "org.eclipse.mylyn.tasks.web";
+ public static final String ID_PLUGIN = "org.eclipse.mylyn.tasks.web"; //$NON-NLS-1$
private static TasksWebPlugin plugin;
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Util.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Util.java
index c60331ce..5721dfc5 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Util.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/Util.java
@@ -23,7 +23,7 @@ public class Util {
}
public static String nvl(String value) {
- return value == null ? "" : value;
+ return value == null ? "" : value; //$NON-NLS-1$
}
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebContentProposalProvider.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebContentProposalProvider.java
index 5a4ee88c..142b10ee 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebContentProposalProvider.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebContentProposalProvider.java
@@ -47,25 +47,25 @@ public class WebContentProposalProvider implements IContentProposalProvider {
public IContentProposal[] getProposals(String contents, int position) {
ArrayList<IContentProposal> proposals = new ArrayList<IContentProposal>();
if (includeTemplates) {
- addProposal(proposals, "({Id}.+?)");
- addProposal(proposals, "({Description}.+?)");
- addProposal(proposals, "({Owner}.+?)");
- addProposal(proposals, "({Type}.+?)");
- addProposal(proposals, "({Status}.+?)");
+ addProposal(proposals, "({Id}.+?)"); //$NON-NLS-1$
+ addProposal(proposals, "({Description}.+?)"); //$NON-NLS-1$
+ addProposal(proposals, "({Owner}.+?)"); //$NON-NLS-1$
+ addProposal(proposals, "({Type}.+?)"); //$NON-NLS-1$
+ addProposal(proposals, "({Status}.+?)"); //$NON-NLS-1$
// proposals.add("({Due}.+?)");
// proposals.add("({Updated}.+?)");
// proposals.add("({Created}.+?)");
- addProposal(proposals, "(.+?)");
- addProposal(proposals, ".+?");
+ addProposal(proposals, "(.+?)"); //$NON-NLS-1$
+ addProposal(proposals, ".+?"); //$NON-NLS-1$
}
- addProposal(proposals, "${" + WebRepositoryConnector.PARAM_SERVER_URL + "}");
- addProposal(proposals, "${" + WebRepositoryConnector.PARAM_USER_ID + "}");
- addProposal(proposals, "${" + WebRepositoryConnector.PARAM_PASSWORD + "}");
- addProposal(proposals, "${" + WebRepositoryConnector.PARAM_LOGIN_TOKEN + "}");
+ addProposal(proposals, "${" + WebRepositoryConnector.PARAM_SERVER_URL + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ addProposal(proposals, "${" + WebRepositoryConnector.PARAM_USER_ID + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ addProposal(proposals, "${" + WebRepositoryConnector.PARAM_PASSWORD + "}"); //$NON-NLS-1$//$NON-NLS-2$
+ addProposal(proposals, "${" + WebRepositoryConnector.PARAM_LOGIN_TOKEN + "}"); //$NON-NLS-1$ //$NON-NLS-2$
for (String param : parametersEditor.getParameters().keySet()) {
- addProposal(proposals, "${" + param.substring(WebRepositoryConnector.PARAM_PREFIX.length()) + "}");
+ addProposal(proposals, "${" + param.substring(WebRepositoryConnector.PARAM_PREFIX.length()) + "}"); //$NON-NLS-1$ //$NON-NLS-2$
}
- addProposal(proposals, "${}");
+ addProposal(proposals, "${}"); //$NON-NLS-1$
return proposals.toArray(new IContentProposal[proposals.size()]);
}
@@ -104,7 +104,7 @@ public class WebContentProposalProvider implements IContentProposalProvider {
KeyStroke keystroke = null;
try {
- keystroke = KeyStroke.getInstance("Ctrl" + KeyStroke.KEY_DELIMITER + "Space");
+ keystroke = KeyStroke.getInstance("Ctrl" + KeyStroke.KEY_DELIMITER + "Space"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (ParseException e) {
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebImages.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebImages.java
index 33dbfd39..b27a105d 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebImages.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebImages.java
@@ -25,11 +25,11 @@ public class WebImages {
private static ImageRegistry imageRegistry;
- private static final String T_OBJ = "obj16";
+ private static final String T_OBJ = "obj16"; //$NON-NLS-1$
- private static final URL baseURL = TasksWebPlugin.getDefault().getBundle().getEntry("/icons/");
+ private static final URL baseURL = TasksWebPlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
- public static final ImageDescriptor OVERLAY_TASK_WEB = create(T_OBJ, "overlay-web.gif");
+ public static final ImageDescriptor OVERLAY_TASK_WEB = create(T_OBJ, "overlay-web.gif"); //$NON-NLS-1$
public static ImageDescriptor create(String prefix, String name) {
try {
@@ -64,10 +64,10 @@ public class WebImages {
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.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebQueryWizardPage.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebQueryWizardPage.java
index 6bb109ac..e5971449 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebQueryWizardPage.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebQueryWizardPage.java
@@ -92,9 +92,10 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
private Text title;
public WebQueryWizardPage(TaskRepository repository, IRepositoryQuery query) {
- super("New web query", repository, query);
- setTitle("Create web query");
- setDescription("Specify query parameters for " + repository.getRepositoryUrl());
+ super(Messages.WebQueryWizardPage_New_web_query, repository, query);
+ setTitle(Messages.WebQueryWizardPage_Create_web_query);
+ setDescription(Messages.bind(Messages.WebQueryWizardPage_Specify_query_parameters_for_X,
+ repository.getRepositoryUrl()));
}
@Override
@@ -137,7 +138,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
group.setLayoutData(gd);
Label label = new Label(group, SWT.NONE);
- label.setText("Query Title:");
+ label.setText(Messages.WebQueryWizardPage_Query_Title_);
title = new Text(group, SWT.BORDER);
title.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
@@ -181,7 +182,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
gridData_1.minimumHeight = 150;
expComposite.setLayoutData(gridData_1);
expComposite.setBackground(parent.getBackground());
- expComposite.setText("Advanced &Configuration");
+ expComposite.setText(Messages.WebQueryWizardPage_Advanced_Configuration);
expComposite.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
@@ -194,7 +195,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
composite1.setLayout(new GridLayout(3, false));
expComposite.setClient(composite1);
- toolkit.createLabel(composite1, "&Query URL:", SWT.NONE);
+ toolkit.createLabel(composite1, Messages.WebQueryWizardPage_Query_URL_, SWT.NONE);
queryUrlText = new Text(composite1, SWT.BORDER);
final GridData gridData_2 = new GridData(SWT.FILL, SWT.CENTER, true, false);
@@ -209,7 +210,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
Button button = new Button(composite1, SWT.NONE);
button.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- button.setText("&Open");
+ button.setText(Messages.WebQueryWizardPage_Open);
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -217,7 +218,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
}
});
- Label queryPatternLabel = toolkit.createLabel(composite1, "Query &Pattern:", SWT.NONE);
+ Label queryPatternLabel = toolkit.createLabel(composite1, Messages.WebQueryWizardPage_Query_Pattern_, SWT.NONE);
queryPatternLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
queryPatternText = new Text(composite1, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.WRAP);
@@ -229,7 +230,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
Button preview = new Button(composite1, SWT.NONE);
preview.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
- preview.setText("Previe&w");
+ preview.setText(Messages.WebQueryWizardPage_Preview);
preview.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
@@ -250,25 +251,25 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
TableColumn colId = new TableColumn(table, SWT.NONE);
colId.setWidth(100);
- colId.setText("Id");
+ colId.setText(Messages.WebQueryWizardPage_Id);
TableColumn colDescription = new TableColumn(table, SWT.NONE);
colDescription.setWidth(200);
- colDescription.setText("Description");
+ colDescription.setText(Messages.WebQueryWizardPage_Description);
TableColumn colStatus = new TableColumn(table, SWT.NONE);
- colStatus.setText("Status");
+ colStatus.setText(Messages.WebQueryWizardPage_Status);
colStatus.setWidth(80);
TableColumn colType = new TableColumn(table, SWT.NONE);
- colType.setText("Type");
+ colType.setText(Messages.WebQueryWizardPage_Type);
colType.setWidth(80);
TableColumn colOwner = new TableColumn(table, SWT.NONE);
- colOwner.setText("Owner");
+ colOwner.setText(Messages.WebQueryWizardPage_Owner);
colOwner.setWidth(120);
- previewTable.setColumnProperties(new String[] { "Id", "Description", "Status", "Type", "Owner" });
+ previewTable.setColumnProperties(new String[] { "Id", "Description", "Status", "Type", "Owner" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
previewTable.setContentProvider(new IStructuredContentProvider() {
public void dispose() {
@@ -295,7 +296,8 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
case 1:
return task.getSummary();
case 2:
- return task.getCompletionDate() != null ? "complete" : "incomplete";
+ return task.getCompletionDate() != null ? Messages.WebQueryWizardPage_complete
+ : Messages.WebQueryWizardPage_incomplete;
case 3:
return task.getTaskKind();
case 4:
@@ -349,17 +351,17 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
private static String addVars(LinkedHashMap<String, String> vars, String property) {
if (property == null) {
- return "";
+ return ""; //$NON-NLS-1$
}
for (String var : WebRepositoryConnector.getTemplateVariables(property)) {
- vars.put(var, "");
+ vars.put(var, ""); //$NON-NLS-1$
}
return property;
}
synchronized void updatePreview() {
if (updatePreviewJob == null) {
- updatePreviewJob = new UpdatePreviewJob("Updating preview");
+ updatePreviewJob = new UpdatePreviewJob(Messages.WebQueryWizardPage_Updating_preview);
updatePreviewJob.setPriority(Job.DECORATE);
}
updatePreviewJob.setParams(queryUrlText.getText(), queryPatternText.getText(), parametersEditor.getParameters());
@@ -422,7 +424,7 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
} else {
StringBuffer sb = new StringBuffer();
for (IStatus status : queryStatus.getChildren()) {
- sb.append(status.getMessage()).append("\n");
+ sb.append(status.getMessage()).append("\n"); //$NON-NLS-1$
}
setMessage(sb.toString(), IMessageProvider.WARNING);
}
@@ -460,8 +462,8 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
WebRepositoryConnector.PROPERTY_TASK_URL), params, getTaskRepository());
active = true;
do {
- final MultiStatus queryStatus = new MultiStatus(TasksWebPlugin.ID_PLUGIN, IStatus.OK, "Query result",
- null);
+ final MultiStatus queryStatus = new MultiStatus(TasksWebPlugin.ID_PLUGIN, IStatus.OK,
+ Messages.WebQueryWizardPage_Query_result, null);
final List<TaskMapper> queryHits = new ArrayList<TaskMapper>();
try {
if (webPage == null) {
@@ -487,15 +489,15 @@ public class WebQueryWizardPage extends AbstractRepositoryQueryPage {
queryStatus.add(status);
} else if (queryHits.size() == 0) {
queryStatus.add(new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, 0,
- "No matching results. Check query regexp", null));
+ Messages.WebQueryWizardPage_No_matching_results_Check_query_regexp, null));
}
} catch (IOException ex) {
queryStatus.add(new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, IStatus.ERROR, //
- "Unable to fetch resource: " + ex.getMessage(), null));
+ Messages.WebQueryWizardPage_Unable_to_fetch_resource_ + ex.getMessage(), null));
} catch (Exception ex) {
queryStatus.add(new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, IStatus.ERROR, //
- "Parsing error: " + ex.getMessage(), null));
+ Messages.WebQueryWizardPage_Parsing_error_ + ex.getMessage(), null));
}
Display.getDefault().asyncExec(new Runnable() {
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositoryConnector.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositoryConnector.java
index 7e2130b2..16f0b49d 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositoryConnector.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositoryConnector.java
@@ -72,49 +72,49 @@ import com.sun.syndication.io.XmlReader;
*/
public class WebRepositoryConnector extends AbstractRepositoryConnector {
- public static final String REPOSITORY_TYPE = "web";
+ public static final String REPOSITORY_TYPE = "web"; //$NON-NLS-1$
- public static final String PROPERTY_TASK_CREATION_URL = "taskCreationUrl";
+ public static final String PROPERTY_TASK_CREATION_URL = "taskCreationUrl"; //$NON-NLS-1$
- public static final String PROPERTY_TASK_URL = "taskUrl";
+ public static final String PROPERTY_TASK_URL = "taskUrl"; //$NON-NLS-1$
- public static final String PROPERTY_QUERY_URL = "queryUrl";
+ public static final String PROPERTY_QUERY_URL = "queryUrl"; //$NON-NLS-1$
- public static final String PROPERTY_QUERY_METHOD = "queryMethod";
+ public static final String PROPERTY_QUERY_METHOD = "queryMethod"; //$NON-NLS-1$
- public static final String PROPERTY_QUERY_REGEXP = "queryPattern";
+ public static final String PROPERTY_QUERY_REGEXP = "queryPattern"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_FORM_URL = "loginFormUrl";
+ public static final String PROPERTY_LOGIN_FORM_URL = "loginFormUrl"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_TOKEN_REGEXP = "loginTokenPattern";
+ public static final String PROPERTY_LOGIN_TOKEN_REGEXP = "loginTokenPattern"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_REQUEST_METHOD = "loginRequestMethod";
+ public static final String PROPERTY_LOGIN_REQUEST_METHOD = "loginRequestMethod"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_REQUEST_URL = "loginRequestUrl";
+ public static final String PROPERTY_LOGIN_REQUEST_URL = "loginRequestUrl"; //$NON-NLS-1$
- public static final String PARAM_PREFIX = "param_";
+ public static final String PARAM_PREFIX = "param_"; //$NON-NLS-1$
- public static final String PARAM_SERVER_URL = "serverUrl";
+ public static final String PARAM_SERVER_URL = "serverUrl"; //$NON-NLS-1$
- public static final String PARAM_USER_ID = "userId";
+ public static final String PARAM_USER_ID = "userId"; //$NON-NLS-1$
- public static final String PARAM_PASSWORD = "password";
+ public static final String PARAM_PASSWORD = "password"; //$NON-NLS-1$
- public static final String PARAM_LOGIN_TOKEN = "loginToken";
+ public static final String PARAM_LOGIN_TOKEN = "loginToken"; //$NON-NLS-1$
- public static final String REQUEST_POST = "POST";
+ public static final String REQUEST_POST = "POST"; //$NON-NLS-1$
- public static final String REQUEST_GET = "GET";
+ public static final String REQUEST_GET = "GET"; //$NON-NLS-1$
- private static final String COMPLETED_STATUSES = "completed|fixed|resolved|invalid|verified|deleted|closed|done";
+ private static final String COMPLETED_STATUSES = "completed|fixed|resolved|invalid|verified|deleted|closed|done"; //$NON-NLS-1$
- public static final String KEY_TASK_PREFIX = "taskPrefix";
+ public static final String KEY_TASK_PREFIX = "taskPrefix"; //$NON-NLS-1$
- public static final String KEY_QUERY_TEMPLATE = "UrlTemplate";
+ public static final String KEY_QUERY_TEMPLATE = "UrlTemplate"; //$NON-NLS-1$
- public static final String KEY_QUERY_PATTERN = "Regexp";
+ public static final String KEY_QUERY_PATTERN = "Regexp"; //$NON-NLS-1$
- private static final String USER_AGENT = "WebTemplatesConnector";
+ private static final String USER_AGENT = "WebTemplatesConnector"; //$NON-NLS-1$
private final static Date DEFAULT_DATE = new Date(0);
@@ -125,7 +125,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
@Override
public String getLabel() {
- return "Web Template (Advanced)";
+ return Messages.WebRepositoryConnector_Web_Template_Advanced_;
}
@Override
@@ -203,7 +203,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
IRepositoryManager repositoryManager = TasksUi.getRepositoryManager();
for (TaskRepository repository : repositoryManager.getRepositories(getConnectorKind())) {
String taskUrl = evaluateParams(repository.getProperty(PROPERTY_TASK_URL), repository);
- if (taskUrl != null && !taskUrl.equals("") && url.startsWith(taskUrl)) {
+ if (taskUrl != null && !taskUrl.equals("") && url.startsWith(taskUrl)) { //$NON-NLS-1$
return repository.getRepositoryUrl();
}
}
@@ -215,7 +215,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
if (repository != null) {
String queryUrl = evaluateParams(query.getAttribute(KEY_TASK_PREFIX), //
getQueryParams(query), repository);
- if (queryUrl != null && !queryUrl.equals("") && url.startsWith(queryUrl)) {
+ if (queryUrl != null && !queryUrl.equals("") && url.startsWith(queryUrl)) { //$NON-NLS-1$
return query.getRepositoryUrl();
}
}
@@ -280,7 +280,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
} catch (IOException e) {
String msg = e.getMessage() == null ? e.toString() : e.getMessage();
return new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, IStatus.ERROR, //
- "Could not fetch resource: " + queryUrl + "\n" + msg, e);
+ Messages.WebRepositoryConnector_Could_not_fetch_resource + queryUrl + "\n" + msg, e); //$NON-NLS-1$
}
}
@@ -351,16 +351,16 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
resultCollector.accept(data);
}
} else {
- String id = p.group("Id", matcher);
- String description = p.group("Description", matcher);
+ String id = p.group("Id", matcher); //$NON-NLS-1$
+ String description = p.group("Description", matcher); //$NON-NLS-1$
if (id == null || description == null) {
isCorrect = false;
}
if (id != null) {
description = unescapeHtml(description);
- String owner = unescapeHtml(cleanup(p.group("Owner", matcher), repository));
- String type = unescapeHtml(cleanup(p.group("Type", matcher), repository));
+ String owner = unescapeHtml(cleanup(p.group("Owner", matcher), repository)); //$NON-NLS-1$
+ String type = unescapeHtml(cleanup(p.group("Type", matcher), repository)); //$NON-NLS-1$
TaskData data = createTaskData(repository, id);
TaskMapper mapper = new TaskMapper(data, true);
@@ -371,7 +371,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
mapper.setOwner(owner);
mapper.setTaskKind(type);
- String status = p.group("Status", matcher);
+ String status = p.group("Status", matcher); //$NON-NLS-1$
if (status != null) {
if (COMPLETED_STATUSES.contains(status.toLowerCase())) {
// TODO set actual completion date here
@@ -388,7 +388,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
return Status.OK_STATUS;
} else {
return new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, IStatus.ERROR,
- "Require two matching groups (taskId and summary). Check query regexp", null);
+ Messages.WebRepositoryConnector_Require_two_matching_groups, null);
}
}
}
@@ -402,7 +402,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
private static String unescapeHtml(String text) {
if (text == null) {
- return "";
+ return ""; //$NON-NLS-1$
}
return StringEscapeUtils.unescapeHtml(text);
}
@@ -419,15 +419,15 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
// // ignore
// }
- text = text.replaceAll("<!--.+?-->", "");
+ text = text.replaceAll("<!--.+?-->", ""); //$NON-NLS-1$ //$NON-NLS-2$
- String[] tokens = text.split(" |\\t|\\n|\\r");
+ String[] tokens = text.split(" |\\t|\\n|\\r"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
- String sep = "";
+ String sep = ""; //$NON-NLS-1$
for (String token : tokens) {
if (token.length() > 0) {
sb.append(sep).append(token);
- sep = " ";
+ sep = " "; //$NON-NLS-1$
}
}
@@ -440,7 +440,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
try {
SyndFeed feed = input.build(new XmlReader(new ByteArrayInputStream(content.getBytes())));
- SimpleDateFormat df = new SimpleDateFormat("yy-MM-dd HH:mm");
+ SimpleDateFormat df = new SimpleDateFormat("yy-MM-dd HH:mm"); //$NON-NLS-1$
Iterator<?> it;
for (it = feed.getEntries().iterator(); it.hasNext();) {
@@ -448,7 +448,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
String author = entry.getAuthor();
if (author == null) {
- DCModule module = (DCModule) entry.getModule("http://purl.org/dc/elements/1.1/");
+ DCModule module = (DCModule) entry.getModule("http://purl.org/dc/elements/1.1/"); //$NON-NLS-1$
author = module.getCreator();
}
@@ -457,7 +457,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
date = entry.getPublishedDate();
}
if (date == null) {
- DCModule module = (DCModule) entry.getModule("http://purl.org/dc/elements/1.1/");
+ DCModule module = (DCModule) entry.getModule("http://purl.org/dc/elements/1.1/"); //$NON-NLS-1$
date = module.getDate();
}
@@ -468,9 +468,9 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
String entrTitle = entry.getTitle();
- TaskData data = createTaskData(repository, entryUri.replaceAll("-", "%2D"));
+ TaskData data = createTaskData(repository, entryUri.replaceAll("-", "%2D")); //$NON-NLS-1$ //$NON-NLS-2$
TaskMapper schema = new TaskMapper(data, true);
- schema.setSummary(((date == null ? "" : df.format(date) + " - ") + entrTitle));
+ schema.setSummary(((date == null ? "" : df.format(date) + " - ") + entrTitle)); //$NON-NLS-1$ //$NON-NLS-2$
schema.setCreationDate(date);
schema.setOwner(author);
schema.setTaskUrl(entryUri);
@@ -480,7 +480,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
} catch (Exception e) {
String msg = e.getMessage() == null ? e.toString() : e.getMessage();
return new Status(IStatus.ERROR, TasksWebPlugin.ID_PLUGIN, IStatus.ERROR, //
- "Failed to parse RSS feed: \"" + msg + "\"", e);
+ Messages.WebRepositoryConnector_Failed_to_parse_RSS_feed + "\"" + msg + "\"", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -542,11 +542,11 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
PostMethod postMethod = new PostMethod(requestUrl.substring(0, n));
// TODO this does not take into account escaped values
n = requestTemplate.indexOf('?');
- String[] requestParams = requestTemplate.substring(n + 1).split("&");
+ String[] requestParams = requestTemplate.substring(n + 1).split("&"); //$NON-NLS-1$
for (String requestParam : requestParams) {
- String[] nv = requestParam.split("=");
+ String[] nv = requestParam.split("="); //$NON-NLS-1$
if (nv.length == 1) {
- postMethod.addParameter(nv[0], "");
+ postMethod.addParameter(nv[0], ""); //$NON-NLS-1$
} else {
String value = evaluateParams(nv[1], getParams(repository, params), false);
postMethod.addParameter(nv[0], value);
@@ -589,19 +589,19 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
}
private static String getRefreshUrl(String url, HttpMethod method) {
- Header refreshHeader = method.getResponseHeader("Refresh");
+ Header refreshHeader = method.getResponseHeader("Refresh"); //$NON-NLS-1$
if (refreshHeader == null) {
return null;
}
String value = refreshHeader.getValue();
- int n = value.indexOf(";url=");
+ int n = value.indexOf(";url="); //$NON-NLS-1$
if (n == -1) {
return null;
}
value = value.substring(n + 5);
int requestPath;
if (value.charAt(0) == '/') {
- int colonSlashSlash = url.indexOf("://");
+ int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
requestPath = url.indexOf('/', colonSlashSlash + 3);
} else {
requestPath = url.lastIndexOf('/');
@@ -609,7 +609,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
String refreshUrl;
if (requestPath == -1) {
- refreshUrl = url + "/" + value;
+ refreshUrl = url + "/" + value; //$NON-NLS-1$
} else {
refreshUrl = url.substring(0, requestPath + 1) + value;
}
@@ -625,16 +625,16 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
}
private static String evaluateParams(String value, Map<String, String> params, boolean encode) {
- if (value == null || value.indexOf("${") == -1) {
+ if (value == null || value.indexOf("${") == -1) { //$NON-NLS-1$
return value;
}
int n = 0;
- int n1 = value.indexOf("${");
+ int n1 = value.indexOf("${"); //$NON-NLS-1$
StringBuilder evaluatedValue = new StringBuilder(value.length());
while (n1 > -1) {
evaluatedValue.append(value.substring(n, n1));
- int n2 = value.indexOf("}", n1);
+ int n2 = value.indexOf("}", n1); //$NON-NLS-1$
if (n2 > -1) {
String key = value.substring(n1 + 2, n2);
if (PARAM_SERVER_URL.equals(key) || PARAM_USER_ID.equals(key) || PARAM_PASSWORD.equals(key)) {
@@ -645,7 +645,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
}
}
n = n2 + 1;
- n1 = value.indexOf("${", n2);
+ n1 = value.indexOf("${", n2); //$NON-NLS-1$
}
if (n > -1) {
evaluatedValue.append(value.substring(n));
@@ -681,7 +681,7 @@ public class WebRepositoryConnector extends AbstractRepositoryConnector {
}
List<String> vars = new ArrayList<String>();
- Matcher m = Pattern.compile("\\$\\{(.+?)\\}").matcher(value);
+ Matcher m = Pattern.compile("\\$\\{(.+?)\\}").matcher(value); //$NON-NLS-1$
while (m.find()) {
vars.add(m.group(1));
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
index 539a01f2..7e3c7661 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
@@ -49,10 +49,9 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
*/
public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage implements IPropertyChangeListener {
- private static final String TITLE = "Web Repository Settings";
+ private static final String TITLE = Messages.WebRepositorySettingsPage_Web_Repository_Settings;
- private static final String DESCRIPTION = "Select a server template example and modify to match the settings for "
- + "your project, \nusually found in the query URL. For more connectors see http://eclipse.org/mylyn";
+ private static final String DESCRIPTION = Messages.WebRepositorySettingsPage_Select_server_template_example_and_modify_to_match_settings_for_your_project;
private ParametersEditor parametersEditor;
@@ -204,7 +203,7 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
expComposite.setLayoutData(gridData_2);
expComposite.setFont(composite.getFont());
expComposite.setBackground(composite.getBackground());
- expComposite.setText("Advanced &Configuration");
+ expComposite.setText(Messages.WebRepositorySettingsPage_Advanced_Configuration);
expComposite.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
@@ -220,14 +219,14 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
composite2.setLayout(gridLayout2);
expComposite.setClient(composite2);
- Label taskUrlLabel = toolkit.createLabel(composite2, "&Task URL:", SWT.NONE);
+ Label taskUrlLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_Task_URL_, SWT.NONE);
taskUrlLabel.setLayoutData(new GridData());
taskUrlText = new Text(composite2, SWT.BORDER);
taskUrlText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
decorations.add(WebContentProposalProvider.createDecoration(taskUrlText, parametersEditor, false));
- Label newTaskLabel = toolkit.createLabel(composite2, "&New Task URL:", SWT.NONE);
+ Label newTaskLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_New_Task_URL_, SWT.NONE);
newTaskLabel.setLayoutData(new GridData());
newTaskText = new Text(composite2, SWT.BORDER);
@@ -241,7 +240,8 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
separatorLabel2.setLayoutData(gridData_4);
toolkit.adapt(separatorLabel2, true, true);
- Label queryUrlLabel = toolkit.createLabel(composite2, "&Query Request URL:", SWT.NONE);
+ Label queryUrlLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_Query_Request_URL_,
+ SWT.NONE);
queryUrlLabel.setLayoutData(new GridData());
queryUrlText = new Text(composite2, SWT.BORDER);
@@ -250,14 +250,15 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
queryRequestMethod = new ComboViewer(composite2, SWT.BORDER | SWT.READ_ONLY);
queryRequestMethod.setContentProvider(new MethodTypeContentProvider());
- queryRequestMethod.setInput("");
+ queryRequestMethod.setInput(""); //$NON-NLS-1$
{
Combo combo = queryRequestMethod.getCombo();
toolkit.adapt(combo, true, true);
combo.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
}
- Label queryPatternLabel = toolkit.createLabel(composite2, "Query &Pattern:", SWT.NONE);
+ Label queryPatternLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_Query_Pattern_,
+ SWT.NONE);
queryPatternLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true));
queryPatternText = new Text(composite2, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.WRAP);
@@ -277,7 +278,7 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
final Label loginrequestUrlLabel = new Label(composite2, SWT.NONE);
loginrequestUrlLabel.setLayoutData(new GridData());
toolkit.adapt(loginrequestUrlLabel, true, true);
- loginrequestUrlLabel.setText("Login &Request URL:");
+ loginrequestUrlLabel.setText(Messages.WebRepositorySettingsPage_Login_Request_URL_);
loginRequestUrlText = new Text(composite2, SWT.BORDER);
toolkit.adapt(loginRequestUrlText, true, true);
@@ -286,21 +287,23 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
loginRequestMethod = new ComboViewer(composite2, SWT.BORDER | SWT.READ_ONLY);
loginRequestMethod.setContentProvider(new MethodTypeContentProvider());
- loginRequestMethod.setInput("");
+ loginRequestMethod.setInput(""); //$NON-NLS-1$
{
Combo combo = loginRequestMethod.getCombo();
toolkit.adapt(combo, true, true);
combo.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
}
- Label loginPageLabel = toolkit.createLabel(composite2, "Login &Form URL:", SWT.NONE);
+ Label loginPageLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_Login_Form_URL_,
+ SWT.NONE);
loginPageLabel.setLayoutData(new GridData());
loginFormUrlText = new Text(composite2, SWT.BORDER);
loginFormUrlText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
decorations.add(WebContentProposalProvider.createDecoration(loginFormUrlText, parametersEditor, false));
- Label loginTokenLabel = toolkit.createLabel(composite2, "Login T&oken Pattern:", SWT.NONE);
+ Label loginTokenLabel = toolkit.createLabel(composite2, Messages.WebRepositorySettingsPage_Login_Token_Pattern,
+ SWT.NONE);
loginTokenLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true));
loginTokenPatternText = new Text(composite2, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.WRAP);
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskEditorPageFactory.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskEditorPageFactory.java
index 8aa0cafb..45f76133 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskEditorPageFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+* 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
@@ -25,7 +25,7 @@ import org.eclipse.ui.forms.editor.IFormPage;
*/
public class WebTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
- private static final String TITLE = "Browser";
+ private static final String TITLE = Messages.WebTaskEditorPageFactory_Browser;
@Override
public boolean canCreatePageFor(TaskEditorInput input) {
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskListMigrator.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskListMigrator.java
index 7ac4ad66..28d6d3d9 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskListMigrator.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebTaskListMigrator.java
@@ -30,17 +30,17 @@ import org.w3c.dom.NamedNodeMap;
*/
public class WebTaskListMigrator extends AbstractTaskListMigrator {
- private static final String KEY_WEB = "Web";
+ private static final String KEY_WEB = "Web"; //$NON-NLS-1$
private static final String KEY_WEB_QUERY = KEY_WEB + KEY_QUERY;
- private static final String KEY_WEB_ISSUE = "WebIssue";
+ private static final String KEY_WEB_ISSUE = "WebIssue"; //$NON-NLS-1$
- private static final String KEY_URL_TEMPLATE = "UrlTemplate";
+ private static final String KEY_URL_TEMPLATE = "UrlTemplate"; //$NON-NLS-1$
- private static final String KEY_REGEXP = "Regexp";
+ private static final String KEY_REGEXP = "Regexp"; //$NON-NLS-1$
- private static final String KEY_PREFIX = "TaskPrefix";
+ private static final String KEY_PREFIX = "TaskPrefix"; //$NON-NLS-1$
@Override
public String getConnectorKind() {
@@ -62,7 +62,7 @@ public class WebTaskListMigrator extends AbstractTaskListMigrator {
if (element.hasAttribute(KEY_PREFIX)) {
task.setAttribute(WebRepositoryConnector.KEY_TASK_PREFIX, element.getAttribute(KEY_PREFIX));
} else {
- task.setTaskKind("RSS");
+ task.setTaskKind("RSS"); //$NON-NLS-1$
task.setTaskKey(null);
}
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/messages.properties b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/messages.properties
new file mode 100644
index 00000000..7f28cbc8
--- /dev/null
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/messages.properties
@@ -0,0 +1,47 @@
+ParameterEditorDialog_New_Property=New Property
+ParameterEditorDialog_Edit_Property=Edit Property
+ParameterEditorDialog_Name_=&Name:
+ParameterEditorDialog_Value_=&Value:
+ParameterEditorDialog_Name_should_be_Java_identifier=Name should be a Java identifier
+ParametersEditor_Parameter=Parameter
+ParametersEditor_Value=Value
+ParametersEditor_Add_=&Add...
+ParametersEditor_Remove_=&Remove
+ParametersEditor_Edit_=&Edit...
+WebQueryWizardPage_Advanced_Configuration=Advanced &Configuration
+WebQueryWizardPage_complete=complete
+WebQueryWizardPage_Create_web_query=Create web query
+WebQueryWizardPage_Description=Description
+WebQueryWizardPage_Id=Id
+WebQueryWizardPage_incomplete=incomplete
+WebQueryWizardPage_New_web_query=New web query
+WebQueryWizardPage_No_matching_results_Check_query_regexp=No matching results. Check query regexp
+WebQueryWizardPage_Open=&Open
+WebQueryWizardPage_Opening_Browser=Opening Browser
+WebQueryWizardPage_Owner=Owner
+WebQueryWizardPage_Parsing_error_=Parsing error:
+WebQueryWizardPage_Preview=Previe&w
+WebQueryWizardPage_Query_Pattern_=Query &Pattern:
+WebQueryWizardPage_Query_result=Query result
+WebQueryWizardPage_Query_Title_=Query Title:
+WebQueryWizardPage_Query_URL_=&Query URL:
+WebQueryWizardPage_Specify_query_parameters_for_X=Specify query parameters for {0}
+WebQueryWizardPage_Status=Status
+WebQueryWizardPage_Type=Type
+WebQueryWizardPage_Unable_to_fetch_resource_=Unable to fetch resource:
+WebQueryWizardPage_Updating_preview=Updating preview
+WebRepositoryConnector_Require_two_matching_groups=Require two matching groups (taskId and summary). Check query regexp
+WebRepositoryConnector_Web_Template_Advanced_=Web Template (Advanced)
+WebRepositoryConnector_Failed_to_parse_RSS_feed=Failed to parse RSS feed:
+WebRepositoryConnector_Could_not_fetch_resource=Could not fetch resource:
+WebRepositorySettingsPage_Web_Repository_Settings=Web Repository Settings
+WebRepositorySettingsPage_Select_server_template_example_and_modify_to_match_settings_for_your_project=Select a server template example and modify to match the settings for your project, \nusually found in the query URL. For more connectors see http://eclipse.org/mylyn
+WebRepositorySettingsPage_Login_Form_URL_=Login &Form URL:
+WebRepositorySettingsPage_Login_Token_Pattern=Login T&oken Pattern:
+WebRepositorySettingsPage_Advanced_Configuration=Advanced &Configuration
+WebRepositorySettingsPage_Task_URL_=&Task URL:
+WebRepositorySettingsPage_New_Task_URL_=&New Task URL:
+WebRepositorySettingsPage_Query_Request_URL_=&Query Request URL:
+WebRepositorySettingsPage_Query_Pattern_=Query &Pattern:
+WebRepositorySettingsPage_Login_Request_URL_=Login &Request URL:
+WebTaskEditorPageFactory_Browser=Browser

Back to the top