Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 137605 Details for
Bug 278309
[publisher][build] Translation fragments do not appear in the final repository
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
clipboard.txt (text/plain), 4.48 KB, created by
Ian Bull
on 2009-05-29 02:26:34 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2009-05-29 02:26:34 EDT
Size:
4.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.metadata >Index: src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java,v >retrieving revision 1.22 >diff -u -r1.22 IInstallableUnit.java >--- src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java 29 Apr 2009 21:54:05 -0000 1.22 >+++ src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java 29 May 2009 06:15:20 -0000 >@@ -69,6 +69,12 @@ > public static final String PROP_TYPE_FRAGMENT = "org.eclipse.equinox.p2.type.fragment"; //$NON-NLS-1$ > > /** >+ * A property key (value <code>"org.eclipse.equinox.p2.type.fragment.translation"</code>) for a >+ * boolean property indicating that an installable unit is a translation fragment >+ */ >+ public static final String PROP_TYPE_FRAGMENT_TRANSLATION = "org.eclipse.equinox.p2.type.fragment.translation"; //$NON-NLS-1$ >+ >+ /** > * A property key (value <code>"org.eclipse.equinox.p2.type.group"</code>) for a > * boolean property indicating that an installable unit is a group. > * >#P org.eclipse.equinox.p2.tests >Index: src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java,v >retrieving revision 1.2 >diff -u -r1.2 LocalizationTests.java >--- src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java 11 May 2009 21:52:59 -0000 1.2 >+++ src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java 29 May 2009 06:15:22 -0000 >@@ -18,6 +18,7 @@ > import org.eclipse.core.runtime.NullProgressMonitor; > import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction; > import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; >+import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery; > import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; > import org.eclipse.equinox.internal.provisional.p2.query.Collector; > import org.eclipse.equinox.p2.publisher.PublisherInfo; >@@ -187,6 +188,18 @@ > assertEquals("1.1", "Foo English Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH)); > } > >+ public void testBundleLocalization_fragmentProperty() throws IOException { >+ File bundle = TestData.getFile("localizationtests/foobundle2", ""); >+ File fragment = TestData.getFile("localizationtests/foofragment2", ""); >+ BundlesAction action = new BundlesAction(new File[] {bundle, fragment}); >+ action.perform(info, results, monitor); >+ >+ Collector collector = results.query(new IUPropertyQuery(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString()), new Collector(), new NullProgressMonitor()); >+ assertEquals("1.0", 1, collector.size()); >+ IInstallableUnit translationFragment = (IInstallableUnit) collector.iterator().next(); >+ assertEquals("1.1", Boolean.TRUE.toString(), translationFragment.getProperty(IInstallableUnit.PROP_TYPE_FRAGMENT_TRANSLATION)); >+ } >+ > public void testBundleLocalizationDE_fragment() throws IOException { > File bundle = TestData.getFile("localizationtests/foobundle2", ""); > File fragment = TestData.getFile("localizationtests/foofragment2", ""); >#P org.eclipse.equinox.p2.publisher >Index: src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java,v >retrieving revision 1.33 >diff -u -r1.33 BundlesAction.java >--- src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java 27 May 2009 18:21:26 -0000 1.33 >+++ src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java 29 May 2009 06:15:25 -0000 >@@ -270,6 +270,7 @@ > > fragment.setSingleton(true); > fragment.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString()); >+ fragment.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT_TRANSLATION, Boolean.TRUE.toString()); > > // Create a provided capability for each locale and add the translated properties. > ArrayList providedCapabilities = new ArrayList(hostLocalizations.keySet().size());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278309
: 137605