diff options
author | spingel | 2008-12-05 01:12:49 +0000 |
---|---|---|
committer | spingel | 2008-12-05 01:12:49 +0000 |
commit | aa39da48090be568d5cda725edd1f70857d097b4 (patch) | |
tree | ceaf9a8aadd7f5c7a2c93451b97138311a10991a /org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs | |
parent | d019ea93f2eb584561f7a47735249cf76427eb1b (diff) | |
download | org.eclipse.mylyn.tasks-aa39da48090be568d5cda725edd1f70857d097b4.tar.gz org.eclipse.mylyn.tasks-aa39da48090be568d5cda725edd1f70857d097b4.tar.xz org.eclipse.mylyn.tasks-aa39da48090be568d5cda725edd1f70857d097b4.zip |
NEW - bug 253125: externalize strings for org.eclipse.mylyn.tasks.*
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253125
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs')
6 files changed, 281 insertions, 95 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java new file mode 100644 index 000000000..eda40ecfd --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/Messages.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * 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.tasks.ui.dialogs; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.ui.dialogs.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 TaskListSortDialog_Ascending; + + public static String TaskListSortDialog_Date_Created; + + public static String TaskListSortDialog_Descending; + + public static String TaskListSortDialog_Priority; + + public static String TaskListSortDialog_Sort_order; + + public static String TaskListSortDialog_Sorting; + + public static String TaskListSortDialog_Summary; + + public static String TaskRepositoryCredentialsDialog_Enter_Credentials; + + public static String TaskRepositoryCredentialsDialog_Enter_repository_credentials; + + public static String TaskRepositoryCredentialsDialog_HTML_Open_Repository_Properties; + + public static String TaskRepositoryCredentialsDialog_Password; + + public static String TaskRepositoryCredentialsDialog_Repository_Authentication; + + public static String TaskRepositoryCredentialsDialog_Save_Password; + + public static String TaskRepositoryCredentialsDialog_Saved_passwords_are_stored_that_is_difficult; + + public static String TaskRepositoryCredentialsDialog_Task_Repository; + + public static String TaskRepositoryCredentialsDialog_User_ID; + + public static String UiLegendControl_Active_task; + + public static String UiLegendControl_Adjust_Colors_and_Fonts_; + + public static String UiLegendControl_Also_see_the_Getting_Started_documentation_online; + + public static String UiLegendControl_Category; + + public static String UiLegendControl_Completed; + + public static String UiLegendControl_Completed_today; + + public static String UiLegendControl_Conflicting_changes; + + public static String UiLegendControl_Date_range; + + public static String UiLegendControl__default_; + + public static String UiLegendControl_Focus_view_on_active_task; + + public static String UiLegendControl_Has_due_date; + + public static String UiLegendControl_http_www_eclipse_org_mylyn_start; + + public static String UiLegendControl_Inactive_task_with_context; + + public static String UiLegendControl_Inactive_task_with_no_context; + + public static String UiLegendControl_Incoming_changes; + + public static String UiLegendControl_New_task; + + public static String UiLegendControl_Open_Task_List_; + + public static String UiLegendControl_Outgoing_changes; + + public static String UiLegendControl_Past_Due_date; + + public static String UiLegendControl_Past_scheduled_date; + + public static String UiLegendControl_Priorities; + + public static String UiLegendControl_Query; + + public static String UiLegendControl_Scheduled_for_today; + + public static String UiLegendControl_Synchronization; + + public static String UiLegendControl_Synchronization_failed; + + public static String UiLegendControl_Task; + + public static String UiLegendControl_Task_Activity; + + public static String UiLegendControl_Task_Context; + + public static String UiLegendControl_Tasks; + + public static String UiLegendControl_Tasks_UI_Legend; + + public static String UiLegendControl_Unsubmitted_outgoing_changes; + + public static String UiLegendDialog_Close_Dialog; +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java index df3346736..1729d75a5 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.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 @@ -46,11 +46,11 @@ public class TaskListSortDialog extends SelectionDialog { public TaskListSortDialog(IShellProvider parentShell, TaskListView taskListView) { super(parentShell.getShell()); propertyText = new String[3]; - propertyText[0] = "Priority"; - propertyText[1] = "Summary"; - propertyText[2] = "Date Created"; + propertyText[0] = Messages.TaskListSortDialog_Priority; + propertyText[1] = Messages.TaskListSortDialog_Summary; + propertyText[2] = Messages.TaskListSortDialog_Date_Created; this.taskListView = taskListView; - setTitle(TaskListView.LABEL_VIEW + " Sorting"); + setTitle(TaskListView.LABEL_VIEW + Messages.TaskListSortDialog_Sorting); } @Override @@ -63,7 +63,7 @@ public class TaskListSortDialog extends SelectionDialog { prioritiesArea.setLayout(new GridLayout(3, false)); Label sortByLabel = new Label(prioritiesArea, SWT.NULL); - sortByLabel.setText("Sort order:"); + sortByLabel.setText(Messages.TaskListSortDialog_Sort_order); GridData data = new GridData(); data.horizontalSpan = 3; sortByLabel.setLayoutData(data); @@ -75,14 +75,14 @@ public class TaskListSortDialog extends SelectionDialog { for (int i = 0; i < 2; i++) { final int index = i; Label numberLabel = new Label(prioritiesArea, SWT.NULL); - numberLabel.setText("" + (i + 1) + "."); + numberLabel.setText("" + (i + 1) + "."); //$NON-NLS-1$ //$NON-NLS-2$ priorityCombos[i] = new Combo(prioritiesArea, SWT.READ_ONLY); priorityCombos[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite directionGroup = new Composite(prioritiesArea, SWT.NONE); directionGroup.setLayout(new GridLayout(2, false)); ascendingButtons[i] = new Button(directionGroup, SWT.RADIO); - ascendingButtons[i].setText("Ascending"); + ascendingButtons[i].setText(Messages.TaskListSortDialog_Ascending); ascendingButtons[i].addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -90,7 +90,7 @@ public class TaskListSortDialog extends SelectionDialog { } }); descendingButtons[i] = new Button(directionGroup, SWT.RADIO); - descendingButtons[i].setText("Descending"); + descendingButtons[i].setText(Messages.TaskListSortDialog_Descending); descendingButtons[i].addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -191,18 +191,32 @@ public class TaskListSortDialog extends SelectionDialog { b[0] = taskListView.getSorter().getSortDirection(); b[1] = taskListView.getSorter().getSortDirection2(); updateUI(a, b); + + applyDialogFont(composite); return composite; } @Override protected void okPressed() { if (isDirty()) { - taskListView.getSorter().setSortByIndex( - SortByIndex.valueOf(priorityCombos[0].getItem(priorityCombos[0].getSelectionIndex()).replace(' ', - '_').toUpperCase())); - taskListView.getSorter().setSortByIndex2( - SortByIndex.valueOf(priorityCombos[1].getItem(priorityCombos[1].getSelectionIndex()).replace(' ', - '_').toUpperCase())); + String select; + select = priorityCombos[0].getItem(priorityCombos[0].getSelectionIndex()); + if (propertyText[0].equals(select)) { + taskListView.getSorter().setSortByIndex(SortByIndex.PRIORITY); + } else if (propertyText[1].equals(select)) { + taskListView.getSorter().setSortByIndex(SortByIndex.SUMMARY); + } else { + taskListView.getSorter().setSortByIndex(SortByIndex.DATE_CREATED); + } + select = priorityCombos[1].getItem(priorityCombos[1].getSelectionIndex()); + if (propertyText[0].equals(select)) { + taskListView.getSorter().setSortByIndex2(SortByIndex.PRIORITY); + } else if (propertyText[1].equals(select)) { + taskListView.getSorter().setSortByIndex2(SortByIndex.SUMMARY); + } else { + taskListView.getSorter().setSortByIndex2(SortByIndex.DATE_CREATED); + } + if (descendingButtons[0].getSelection()) { taskListView.getSorter().setSortDirection(-1); } else { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java index df3a82819..e9231fbd5 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java @@ -46,15 +46,15 @@ import org.eclipse.ui.plugin.AbstractUIPlugin; */ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { - private static final String DIALOG_TITLE = "Enter Credentials"; + private static final String DIALOG_TITLE = Messages.TaskRepositoryCredentialsDialog_Enter_Credentials; - private static final String IMAGE_FILE_KEYLOCK = "icons/wizban/secur_role_wiz.gif"; + private static final String IMAGE_FILE_KEYLOCK = "icons/wizban/secur_role_wiz.gif"; //$NON-NLS-1$ public static final int TASK_REPOSITORY_CHANGED = 1000; - private static final String MESSAGE = "Enter repository credentials"; + private static final String MESSAGE = Messages.TaskRepositoryCredentialsDialog_Enter_repository_credentials; - private static final String TITLE = "Repository Authentication"; + private static final String TITLE = Messages.TaskRepositoryCredentialsDialog_Repository_Authentication; public static TaskRepositoryCredentialsDialog createDialog(Shell shell) { return new TaskRepositoryCredentialsDialog(shell); @@ -64,13 +64,13 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { private String message; - private String password = ""; + private String password = ""; //$NON-NLS-1$ private boolean savePassword; private TaskRepository taskRepository; - private String username = ""; + private String username = ""; //$NON-NLS-1$ private TaskRepositoryCredentialsDialog(Shell parentShell) { super(parentShell); @@ -90,7 +90,7 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Link link = new Link(composite, SWT.WRAP); - link.setText("<a href=\"properties\">Open Repository Properties</a> to disable background synchronization by disconnecting the repository."); + link.setText(Messages.TaskRepositoryCredentialsDialog_HTML_Open_Repository_Properties); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -126,13 +126,13 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { label.setImage(TasksUiPlugin.getDefault().getBrandingIcon(taskRepository.getConnectorKind())); label = new Label(labelComposite, SWT.NONE); - label.setText("Task Repository:"); + label.setText(Messages.TaskRepositoryCredentialsDialog_Task_Repository); label = new Label(labelComposite, SWT.NONE); label.setText(taskRepository.getRepositoryLabel()); } - new Label(composite, SWT.NONE).setText("&User ID:"); + new Label(composite, SWT.NONE).setText(Messages.TaskRepositoryCredentialsDialog_User_ID); final Text usernameField = new Text(composite, SWT.BORDER); usernameField.addModifyListener(new ModifyListener() { @@ -150,7 +150,7 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { .grab(true, false) .applyTo(usernameField); - new Label(composite, SWT.NONE).setText("&Password:"); + new Label(composite, SWT.NONE).setText(Messages.TaskRepositoryCredentialsDialog_Password); final Text passwordField = new Text(composite, SWT.BORDER | SWT.PASSWORD); passwordField.addModifyListener(new ModifyListener() { @@ -169,7 +169,7 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { .applyTo(passwordField); final Button savePasswordButton = new Button(composite, SWT.CHECK); - savePasswordButton.setText("&Save Password"); + savePasswordButton.setText(Messages.TaskRepositoryCredentialsDialog_Save_Password); savePasswordButton.setSelection(savePassword); savePasswordButton.addSelectionListener(new SelectionAdapter() { @Override @@ -192,7 +192,7 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector( taskRepository.getConnectorKind()); if (connector != null) { - setTitle(connector.getShortLabel() + " " + TITLE); + setTitle(connector.getShortLabel() + " " + TITLE); //$NON-NLS-1$ } } @@ -241,7 +241,7 @@ public class TaskRepositoryCredentialsDialog extends TitleAreaDialog { label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING)); label = new Label(composite, SWT.WRAP); - label.setText("Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read."); + label.setText(Messages.TaskRepositoryCredentialsDialog_Saved_passwords_are_stored_that_is_difficult); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).hint( convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT).grab(true, false).applyTo(label); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java index bdcd63461..bfa6fa7b6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendControl.java @@ -54,8 +54,6 @@ import org.eclipse.ui.themes.IThemeManager; */ public class UiLegendControl extends Composite { - public static final String TITLE = "Tasks UI Legend"; - private final FormToolkit toolkit; private Window window = null; @@ -178,7 +176,7 @@ public class UiLegendControl extends Composite { private void createTasksSection(Composite parent) { Section tasksSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); - tasksSection.setText("Tasks"); + tasksSection.setText(Messages.UiLegendControl_Tasks); tasksSection.setLayout(new TableWrapLayout()); tasksSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); @@ -195,26 +193,26 @@ public class UiLegendControl extends Composite { tasksSection.setClient(tasksClient); Label imageLabel; - imageLabel = toolkit.createLabel(tasksClient, ""); + imageLabel = toolkit.createLabel(tasksClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK)); - toolkit.createLabel(tasksClient, "Task"); + toolkit.createLabel(tasksClient, Messages.UiLegendControl_Task); - imageLabel = toolkit.createLabel(tasksClient, ""); + imageLabel = toolkit.createLabel(tasksClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.CATEGORY)); - toolkit.createLabel(tasksClient, "Category"); + toolkit.createLabel(tasksClient, Messages.UiLegendControl_Category); - imageLabel = toolkit.createLabel(tasksClient, ""); + imageLabel = toolkit.createLabel(tasksClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.QUERY)); - toolkit.createLabel(tasksClient, "Query"); + toolkit.createLabel(tasksClient, Messages.UiLegendControl_Query); - imageLabel = toolkit.createLabel(tasksClient, ""); + imageLabel = toolkit.createLabel(tasksClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.CALENDAR)); - toolkit.createLabel(tasksClient, "Date range"); + toolkit.createLabel(tasksClient, Messages.UiLegendControl_Date_range); - imageLabel = toolkit.createLabel(tasksClient, ""); + imageLabel = toolkit.createLabel(tasksClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK)); - Hyperlink openView = toolkit.createHyperlink(tasksClient, "Open Task List...", SWT.WRAP); + Hyperlink openView = toolkit.createHyperlink(tasksClient, Messages.UiLegendControl_Open_Task_List_, SWT.WRAP); openView.addHyperlinkListener(new IHyperlinkListener() { public void linkActivated(HyperlinkEvent e) { close(); @@ -233,7 +231,7 @@ public class UiLegendControl extends Composite { private void createPrioritiesSection(Composite parent) { Section prioritiesSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); - prioritiesSection.setText("Priorities"); + prioritiesSection.setText(Messages.UiLegendControl_Priorities); prioritiesSection.setLayout(new TableWrapLayout()); prioritiesSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); @@ -250,30 +248,30 @@ public class UiLegendControl extends Composite { prioritiesSection.setClient(prioritiesClient); Label imageLabel; - imageLabel = toolkit.createLabel(prioritiesClient, ""); + imageLabel = toolkit.createLabel(prioritiesClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_1)); toolkit.createLabel(prioritiesClient, PriorityLevel.P1.getDescription()); - imageLabel = toolkit.createLabel(prioritiesClient, ""); + imageLabel = toolkit.createLabel(prioritiesClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_2)); toolkit.createLabel(prioritiesClient, PriorityLevel.P2.getDescription()); - imageLabel = toolkit.createLabel(prioritiesClient, ""); + imageLabel = toolkit.createLabel(prioritiesClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_3)); - toolkit.createLabel(prioritiesClient, PriorityLevel.P3.getDescription() + " (default)"); + toolkit.createLabel(prioritiesClient, PriorityLevel.P3.getDescription() + Messages.UiLegendControl__default_); - imageLabel = toolkit.createLabel(prioritiesClient, ""); + imageLabel = toolkit.createLabel(prioritiesClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_4)); toolkit.createLabel(prioritiesClient, PriorityLevel.P4.getDescription()); - imageLabel = toolkit.createLabel(prioritiesClient, ""); + imageLabel = toolkit.createLabel(prioritiesClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_5)); toolkit.createLabel(prioritiesClient, PriorityLevel.P5.getDescription()); } private void createActivitySection(Composite parent) { Section activitySection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); - activitySection.setText("Task Activity"); + activitySection.setText(Messages.UiLegendControl_Task_Activity); activitySection.setLayout(new TableWrapLayout()); activitySection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); @@ -289,15 +287,15 @@ public class UiLegendControl extends Composite { activityClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); activitySection.setClient(activityClient); - Label imageLabel = toolkit.createLabel(activityClient, ""); + Label imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK)); - Label labelToday = toolkit.createLabel(activityClient, "Scheduled for today"); + Label labelToday = toolkit.createLabel(activityClient, Messages.UiLegendControl_Scheduled_for_today); labelToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get( CommonThemes.COLOR_SCHEDULED_TODAY)); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK)); - Label labelOverdue = toolkit.createLabel(activityClient, "Past scheduled date"); + Label labelOverdue = toolkit.createLabel(activityClient, Messages.UiLegendControl_Past_scheduled_date); labelOverdue.setForeground(themeManager.getCurrentTheme().getColorRegistry().get( CommonThemes.COLOR_SCHEDULED_PAST)); @@ -308,34 +306,34 @@ public class UiLegendControl extends Composite { // labelThisWeek.setForeground(themeManager.getCurrentTheme().getColorRegistry().get( // TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED)); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK)); - Label labelCompleted = toolkit.createLabel(activityClient, "Completed"); + Label labelCompleted = toolkit.createLabel(activityClient, Messages.UiLegendControl_Completed); labelCompleted.setFont(CommonFonts.STRIKETHROUGH); // labelCompleted.setForeground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED); labelCompleted.setForeground(themeManager.getCurrentTheme() .getColorRegistry() .get(CommonThemes.COLOR_COMPLETED)); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK)); - Label labelCompletedToday = toolkit.createLabel(activityClient, "Completed today"); + Label labelCompletedToday = toolkit.createLabel(activityClient, Messages.UiLegendControl_Completed_today); labelCompletedToday.setFont(CommonFonts.STRIKETHROUGH); labelCompletedToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get( CommonThemes.COLOR_COMPLETED_TODAY)); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_DUE)); - toolkit.createLabel(activityClient, "Has due date"); + toolkit.createLabel(activityClient, Messages.UiLegendControl_Has_due_date); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_OVERDUE)); - Label textLabel = toolkit.createLabel(activityClient, "Past Due date"); + Label textLabel = toolkit.createLabel(activityClient, Messages.UiLegendControl_Past_Due_date); textLabel.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE)); - imageLabel = toolkit.createLabel(activityClient, ""); + imageLabel = toolkit.createLabel(activityClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK)); - Hyperlink adjust = toolkit.createHyperlink(activityClient, "Adjust Colors and Fonts...", SWT.WRAP); + Hyperlink adjust = toolkit.createHyperlink(activityClient, Messages.UiLegendControl_Adjust_Colors_and_Fonts_, SWT.WRAP); adjust.addHyperlinkListener(new IHyperlinkListener() { public void linkActivated(HyperlinkEvent e) { PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench() @@ -357,7 +355,7 @@ public class UiLegendControl extends Composite { private void createContextSection(Composite parent) { Section contextSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); - contextSection.setText("Task Context"); + contextSection.setText(Messages.UiLegendControl_Task_Context); contextSection.setLayout(new TableWrapLayout()); contextSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); @@ -374,26 +372,26 @@ public class UiLegendControl extends Composite { contextSection.setClient(contextClient); Label imageLabel; - imageLabel = toolkit.createLabel(contextClient, ""); + imageLabel = toolkit.createLabel(contextClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_FOCUS)); - toolkit.createLabel(contextClient, "Focus view on active task"); + toolkit.createLabel(contextClient, Messages.UiLegendControl_Focus_view_on_active_task); - imageLabel = toolkit.createLabel(contextClient, ""); + imageLabel = toolkit.createLabel(contextClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY)); - toolkit.createLabel(contextClient, "Inactive task with no context"); + toolkit.createLabel(contextClient, Messages.UiLegendControl_Inactive_task_with_no_context); - imageLabel = toolkit.createLabel(contextClient, ""); + imageLabel = toolkit.createLabel(contextClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE)); - toolkit.createLabel(contextClient, "Inactive task with context"); + toolkit.createLabel(contextClient, Messages.UiLegendControl_Inactive_task_with_context); - imageLabel = toolkit.createLabel(contextClient, ""); + imageLabel = toolkit.createLabel(contextClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ACTIVE)); - toolkit.createLabel(contextClient, "Active task"); + toolkit.createLabel(contextClient, Messages.UiLegendControl_Active_task); } private void createSynchronizationSection(Composite parent) { Section synchroSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); - synchroSection.setText("Synchronization"); + synchroSection.setText(Messages.UiLegendControl_Synchronization); synchroSection.setLayout(new TableWrapLayout()); synchroSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); @@ -410,29 +408,29 @@ public class UiLegendControl extends Composite { synchroSection.setClient(synchroClient); Label imageLabel; - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW)); - toolkit.createLabel(synchroClient, "New task, open to view"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_New_task); - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING)); - toolkit.createLabel(synchroClient, "Incoming changes, open to view"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_Incoming_changes); - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING)); - toolkit.createLabel(synchroClient, "Outgoing changes"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_Outgoing_changes); - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING_NEW)); - toolkit.createLabel(synchroClient, "Unsubmitted outgoing changes"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_Unsubmitted_outgoing_changes); - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_WARNING)); - toolkit.createLabel(synchroClient, "Synchronization failed, mouse over for details"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_Synchronization_failed); - imageLabel = toolkit.createLabel(synchroClient, ""); + imageLabel = toolkit.createLabel(synchroClient, ""); //$NON-NLS-1$ imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_CONFLICT)); - toolkit.createLabel(synchroClient, "Conflicting changes, need to synchronize"); + toolkit.createLabel(synchroClient, Messages.UiLegendControl_Conflicting_changes); } @SuppressWarnings("deprecation") @@ -494,14 +492,14 @@ public class UiLegendControl extends Composite { Label imageLabel; for (LegendElement element : elements) { - imageLabel = toolkit.createLabel(connectorClient, ""); + imageLabel = toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ imageLabel.setImage(element.getImage()); toolkit.createLabel(connectorClient, element.getLabel()); } if (elements.size() < 4) { - imageLabel = toolkit.createLabel(connectorClient, ""); - toolkit.createLabel(connectorClient, ""); + imageLabel = toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ + toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ } } @@ -531,14 +529,14 @@ public class UiLegendControl extends Composite { Label imageLabel; for (IRepositoryElement taskListElement : elements) { - imageLabel = toolkit.createLabel(connectorClient, ""); + imageLabel = toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ imageLabel.setImage(labelProvider.getImage(taskListElement)); toolkit.createLabel(connectorClient, taskListElement.getSummary()); } if (elements.size() < 4) { - imageLabel = toolkit.createLabel(connectorClient, ""); - toolkit.createLabel(connectorClient, ""); + imageLabel = toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ + toolkit.createLabel(connectorClient, ""); //$NON-NLS-1$ } } @@ -555,11 +553,11 @@ public class UiLegendControl extends Composite { hyperlinkClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB)); Hyperlink gettingStartedLink = toolkit.createHyperlink(hyperlinkClient, - "Also see the Getting Started documentation online", SWT.WRAP); + Messages.UiLegendControl_Also_see_the_Getting_Started_documentation_online, SWT.WRAP); gettingStartedLink.addHyperlinkListener(new IHyperlinkListener() { public void linkActivated(HyperlinkEvent e) { close(); - TasksUiUtil.openUrl("http://www.eclipse.org/mylyn/start/"); + TasksUiUtil.openUrl(Messages.UiLegendControl_http_www_eclipse_org_mylyn_start); } public void linkEntered(HyperlinkEvent e) { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendDialog.java index 431a28a92..49627c4f5 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/UiLegendDialog.java @@ -77,7 +77,7 @@ public class UiLegendDialog extends PopupDialog { protected Control createDialogArea(Composite parent) { toolkit = new FormToolkit(parent.getDisplay()); form = toolkit.createScrolledForm(parent); - form.setText(UiLegendControl.TITLE); + form.setText(Messages.UiLegendControl_Tasks_UI_Legend); form.getToolBarManager().add(new CloseDialogAction()); form.getToolBarManager().update(true); form.getBody().setLayout(new TableWrapLayout()); @@ -93,7 +93,7 @@ public class UiLegendDialog extends PopupDialog { private CloseDialogAction() { setImageDescriptor(CommonImages.NOTIFICATION_CLOSE); - setText("Close Dialog"); + setText(Messages.UiLegendDialog_Close_Dialog); } @Override diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties new file mode 100644 index 000000000..ec452df2a --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/messages.properties @@ -0,0 +1,51 @@ +TaskListSortDialog_Ascending=Ascending +TaskListSortDialog_Date_Created=Date Created +TaskListSortDialog_Descending=Descending +TaskListSortDialog_Priority=Priority +TaskListSortDialog_Sort_order=Sort order\: +TaskListSortDialog_Sorting=\ Sorting +TaskListSortDialog_Summary=Summary + +TaskRepositoryCredentialsDialog_Enter_Credentials=Enter Credentials +TaskRepositoryCredentialsDialog_Enter_repository_credentials=Enter repository credentials +TaskRepositoryCredentialsDialog_HTML_Open_Repository_Properties=<a href="properties">Open Repository Properties</a> to disable background synchronization by disconnecting the repository. +TaskRepositoryCredentialsDialog_Password=&Password: +TaskRepositoryCredentialsDialog_Repository_Authentication=Repository Authentication +TaskRepositoryCredentialsDialog_Save_Password=&Save Password +TaskRepositoryCredentialsDialog_Saved_passwords_are_stored_that_is_difficult=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read. +TaskRepositoryCredentialsDialog_Task_Repository=Task Repository\: +TaskRepositoryCredentialsDialog_User_ID=&User ID: + +UiLegendControl_Active_task=Active task +UiLegendControl_Adjust_Colors_and_Fonts_=Adjust Colors and Fonts... +UiLegendControl_Also_see_the_Getting_Started_documentation_online=Also see the Getting Started documentation online +UiLegendControl_Category=Category +UiLegendControl_Completed=Completed +UiLegendControl_Completed_today=Completed today +UiLegendControl_Conflicting_changes=Conflicting changes, need to synchronize +UiLegendControl_Date_range=Date range +UiLegendControl__default_=\ (default) +UiLegendControl_Focus_view_on_active_task=Focus view on active task +UiLegendControl_Has_due_date=Has due date +UiLegendControl_http_www_eclipse_org_mylyn_start=http://www.eclipse.org/mylyn/start/ +UiLegendControl_Inactive_task_with_context=Inactive task with context +UiLegendControl_Inactive_task_with_no_context=Inactive task with no context +UiLegendControl_Incoming_changes=Incoming changes, open to view +UiLegendControl_New_task=New task, open to view +UiLegendControl_Open_Task_List_=Open Task List... +UiLegendControl_Outgoing_changes=Outgoing changes +UiLegendControl_Past_Due_date=Past Due date +UiLegendControl_Past_scheduled_date=Past scheduled date +UiLegendControl_Priorities=Priorities +UiLegendControl_Query=Query +UiLegendControl_Scheduled_for_today=Scheduled for today +UiLegendControl_Synchronization=Synchronization +UiLegendControl_Synchronization_failed=Synchronization failed, mouse over for details +UiLegendControl_Task=Task +UiLegendControl_Task_Activity=Task Activity +UiLegendControl_Task_Context=Task Context +UiLegendControl_Tasks=Tasks +UiLegendControl_Tasks_UI_Legend=Tasks UI Legend +UiLegendControl_Unsubmitted_outgoing_changes=Unsubmitted outgoing changes + +UiLegendDialog_Close_Dialog=Close Dialog |