diff options
author | relves | 2008-12-16 00:21:39 +0000 |
---|---|---|
committer | relves | 2008-12-16 00:21:39 +0000 |
commit | 6d439fe9d4289415d6bfe8f8f7e7f75f23cf0b5f (patch) | |
tree | 27452c9ec15dd7699ced161ca2352123972e8910 /org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist | |
parent | e891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c (diff) | |
download | org.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
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist')
10 files changed, 228 insertions, 84 deletions
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 |