Community
Participate
Working Groups
Build ID: I20080516-1333 Steps To Reproduce: 1.We have a category such as this in our site.xml file: <category-def name="desktop" label="%category.developer"/> 2. %category.developer is set and contained in a .properties file for purposes of translation. 3.When installing with P2, the category name is shown as %category.developer instead of using the name in the .properties file. More information:
Sue, could you please provide us a sample update site we could use to reproduce this problem?
Created attachment 102161 [details] small example to recreate the problem Created a reduced test case from our install site .zip.
Simon, please investigate.
Created attachment 102763 [details] Add localization to category IUs when generation metadata for an update site Attaching a patch that incorporates translations into IUs when using the metadata generator to p2-ize a local (file:) update site. The patch does not affect the on-the-fly generation of metadata for non-p2-ized update sites since the that would involve more substantial work to search for and read property files for the locales with translations. This additional work has some risk of bugs that might break reading sites. The workaround for such sites where category info has been translated is run metadata generation - speeding up the access to the site as well as including the translations.
Request review of the patch by John.
Created attachment 102778 [details] New example Dave's patch works for a site with one category, but it doesn't seem to work with multiple categories. I have to go home but I'll try to resume later.
Created attachment 102779 [details] Updated patch v02 Two fixes from previous patch: - Previous patch was checking for localized category name, but the name can't be translated - it's the category id - The case of loading a site from a jar was looking for a "feature.properties" instead of "site.properties". This looked like a C&P bug.
Created attachment 102793 [details] Updated patch v03 Previous patch was missing the fix to replace "feature" with "site"
I noticed a typo in the site.xml in John's example. It's on the id of "org.eclipse.releng"t".tools. After removing the "t" I see both categories in the content.jar and the UI. One thing I noticed is that each category contains the default translations for every other category in the site. Perhaps not critical however we should consider partitioning these.
I tested again with a corrected site and it works. I think we can live with the multiple category translations showing up in each category, and fix that for 3.5.
I have verified that with the patch I can see the categories properly translated.
The updatesite jar code in Generator.getFeatureToCategoryMappings doesn't look like it will ever run and could be removed. Now is probably not the right time to do this so +1 with a comment there to remind us. I also looked at pruning category translations and agree this is a 3.5 thing.
Released.