diff options
author | Vikas Chandra | 2016-01-18 05:33:44 +0000 |
---|---|---|
committer | Vikas Chandra | 2016-01-18 05:35:37 +0000 |
commit | 03d1de6f167f46cdf9866300232b054626be81bc (patch) | |
tree | 97a47aee19ddf22a30eeb77681c6f156a3445162 | |
parent | 6687192eb90dcdeeb0197695b156a59a3fcb24a6 (diff) | |
download | eclipse.pde.ui-M20160120-1000.tar.gz eclipse.pde.ui-M20160120-1000.tar.xz eclipse.pde.ui-M20160120-1000.zip |
Bug 471910 - [patch] String not correctly externalized inM20160120-1000
PreferencesSection.getWizardConfigText().
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
3 files changed, 32 insertions, 18 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java index 7ce89982d7..73eab3d4bd 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2015 IBM Corporation and others. + * Copyright (c) 2014, 2016 IBM Corporation 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 @@ -2892,15 +2892,17 @@ public class PDEUIMessages extends NLS { public static String PreferencesSection_title; public static String PreferencesSection_description; - public static String PreferencesSection_generate_overwrite; - public static String PreferencesSection_generate_merge; public static String PreferencesSection_errorNoDefiningPlugin; public static String PreferencesSection_errorNoDefiningPluginTitle; public static String PreferencesSection_errorReading; - public static String PreferencesSection_epf; - public static String PreferencesSection_customize; - public static String PreferencesSection_merge; - public static String PreferencesSection_overwrite; + public static String PreferencesSection_generate_overwrite1; + public static String PreferencesSection_generate_overwrite2; + public static String PreferencesSection_generate_overwrite3; + public static String PreferencesSection_generate_overwrite4; + public static String PreferencesSection_generate_merge1; + public static String PreferencesSection_generate_merge2; + public static String PreferencesSection_generate_merge3; + public static String PreferencesSection_generate_merge4; public static String ConvertPreferencesWizardPage_title; public static String ConvertPreferencesWizardPage_description; diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PreferencesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PreferencesSection.java index 06b2617c3e..ca2223a9f1 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PreferencesSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PreferencesSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Rapicorp Corporation and others. + * Copyright (c) 2016 Rapicorp Corporation 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 @@ -103,9 +103,19 @@ public class PreferencesSection extends PDESection { private String getWizardConfigText() { IPreferencesInfo info = getPreferencesInfo(); String[] bindings = new String[2]; - bindings[0] = info.getSourceFilePath() == null ? PDEUIMessages.PreferencesSection_epf : "<br></br><b>" + TextProcessor.process(info.getSourceFilePath()) + "</b><br></br><br></br>"; //$NON-NLS-1$ //$NON-NLS-2$ - bindings[1] = info.getPreferenceCustomizationPath() == null ? PDEUIMessages.PreferencesSection_customize : "<br></br><b>" + TextProcessor.process(info.getPreferenceCustomizationPath()) + "</b><br></br>"; //$NON-NLS-1$ //$NON-NLS-2$ - return getOverwrite() ? NLS.bind(PDEUIMessages.PreferencesSection_generate_overwrite, bindings) : NLS.bind(PDEUIMessages.PreferencesSection_generate_merge, bindings); + bindings[0] = info.getSourceFilePath() == null ? null : TextProcessor.process(info.getSourceFilePath()); + bindings[1] = info.getPreferenceCustomizationPath() == null ? null : TextProcessor.process(info.getPreferenceCustomizationPath()); + + boolean isOverwrite = getOverwrite(); + if (bindings[0] == null && bindings[1] == null) + return isOverwrite ? PDEUIMessages.PreferencesSection_generate_overwrite1 : PDEUIMessages.PreferencesSection_generate_merge1; + if (bindings[0] == null && bindings[1] != null) + return isOverwrite ? NLS.bind(PDEUIMessages.PreferencesSection_generate_overwrite2, bindings[1]) : NLS.bind(PDEUIMessages.PreferencesSection_generate_merge2, bindings[1]); + if (bindings[0] != null && bindings[1] == null) + return isOverwrite ? NLS.bind(PDEUIMessages.PreferencesSection_generate_overwrite3, bindings[0]) : NLS.bind(PDEUIMessages.PreferencesSection_generate_merge3, bindings[0]); + if (bindings[0] != null && bindings[1] != null) + return isOverwrite ? NLS.bind(PDEUIMessages.PreferencesSection_generate_overwrite4, bindings) : NLS.bind(PDEUIMessages.PreferencesSection_generate_merge4, bindings); + return null; } diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties index 28be78e869..10ec66393a 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2015 IBM Corporation and others. +# Copyright (c) 2000, 2016 IBM Corporation 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 @@ -2438,15 +2438,17 @@ UpdateTargetJob_UpdateJobName= CustomizationPage_title=Customization PreferencesSection_title=Default Preferences PreferencesSection_description=Use an Eclipse preferences (.epf) file to set the product's default preferences. -PreferencesSection_generate_overwrite=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from {0} and overwrite {1}</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> -PreferencesSection_generate_merge=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from {0} and merge them with the properties in {1}</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> PreferencesSection_errorReading=Error reading file {0}. Could not generate preferences. PreferencesSection_errorNoDefiningPlugin=The product's defining plug-in project could not be found. Cannot generate a plugin_customization.ini file. PreferencesSection_errorNoDefiningPluginTitle=Plug-in {0} Not Found -PreferencesSection_epf=an Eclipse Preferences file (*.epf) -PreferencesSection_customize=a plugin customization file. -PreferencesSection_merge=merge them with the properties in -PreferencesSection_overwrite=overwrite +PreferencesSection_generate_overwrite1=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from an Eclipse Preferences file (*.epf) and overwrite a plugin customization file.</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_overwrite2=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from an Eclipse Preferences file (*.epf) and overwrite ''{0}''.<br></br></p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_overwrite3=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from ''{0}'' and overwrite a plugin customization file.</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_overwrite4=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from ''{0}'' and overwrite ''{1}''.<br></br></p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_merge1=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from an Eclipse Preferences file (*.epf) and merge them with the properties in a plugin customization file.</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_merge2=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from an Eclipse Preferences file (*.epf) and merge them with the properties in ''{0}''.<br></br></p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_merge3=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from ''{0}'' and merge them with the properties in a plugin customization file.</p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> +PreferencesSection_generate_merge4=<form><p>Use the <a href="command.generate">Convert Preferences wizard</a> to retrieve values from ''{0}'' and merge them with the properties in ''{1}''.<br></br></p><p>Go to the <a href="navigate.overview">Overview</a> page to test or export the product.</p></form> ConvertPreferencesWizardPage_title=Convert Preferences ConvertPreferencesWizardPage_description=Convert preferences from ".epf" file format into plugin_customization.ini file format. ConvertPreferencesWizardPage_source_file=&File: |