Bug 222793 - Bundle-ContactAddress should generate warning if not translated
Summary: Bundle-ContactAddress should generate warning if not translated
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5 M1   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-03-14 14:43 EDT by Philipp Kursawe CLA
Modified: 2008-07-24 10:57 EDT (History)
5 users (show)

See Also:


Attachments
Patch (1.31 KB, patch)
2008-03-14 15:08 EDT, Benjamin Cabé CLA
caniszczyk: iplog+
Details | Diff
mylyn/context/zip (774 bytes, application/octet-stream)
2008-07-24 10:57 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Kursawe CLA 2008-03-14 14:43:08 EDT
I heard Bundle-ContactAddress is not included in the list of translatable headers in PDE. However I think it should, as the contact address for each locale could be different.
Comment 1 Benjamin Cabé CLA 2008-03-14 15:08:50 EDT
Created attachment 92590 [details]
Patch

My 0.02$...
Comment 2 Benjamin Cabé CLA 2008-03-14 15:17:11 EDT
BTW it is a UI bug rather than a Build one! :)
Comment 3 Andrew Niefer CLA 2008-03-14 15:47:12 EDT
As Benjamin says, this is UI.

However, consider the generation of individual source bundles.  When generating a source bundle, we copy the Bundle-Vendor and Bundle-Name from the original bundle.  If you think that Bundle-ContactAddress should also be copied into the generated source bundle, please open another bug on pde/build.

Comment 4 Chris Aniszczyk CLA 2008-03-14 16:12:50 EDT
Thanks for the quick patch.

Har, this is one of those obscure OSGi header that I bet Simon doesn't even use ;)
Comment 5 Chris Aniszczyk CLA 2008-03-14 16:15:03 EDT
waaaaaaittttt a minute.

Shouldn't Bundle-ContactAddress be an email address? how is an email address translatable? 

Tom, what's the status quo from OSGi land?
Comment 6 Andrew Niefer CLA 2008-03-14 16:19:06 EDT
perhaps it is a different email address in different countries?
ie @us.ibm.com vs @fr.ibm.com or something
Comment 7 Simon Archer CLA 2008-03-14 16:26:06 EDT
Obscure indeed, Chris; I never use it.

Regarding the value... section 3.2.1.4 of the spec has this to say:

  Bundle-ContactAddress: 2400 Oswego Road, Austin, TX 74563
  The Bundle-ContactAddress header provides the contact address of the vendor.

But then, section 6.1.12.4 has this to say:

  public static final String BUNDLE_CONTACTADDRESS
     = “Bundle-ContactAddress”
  Manifest header (named “Bundle-ContactAddress”) identifying the contact
  address where problems with the bundle may be reported; for example, an
  email address.

There's the chance that people want a different contact address (physical or email) for each locale, but I've never heard of anyone doing that.
Comment 8 Chris Aniszczyk CLA 2008-03-14 16:29:46 EDT
omg Austin, TX? Is that BJ's old address ;p?
Comment 9 Benjamin Cabé CLA 2008-03-14 16:37:38 EDT
(In reply to comment #7)

> There's the chance that people want a different contact address (physical or
> email) for each locale, but I've never heard of anyone doing that.
> 

There's a chance that noo-ne will ever use it (if Simon don't, who will!), but it seems reasonable to allow translation for this header :)
Comment 10 Simon Archer CLA 2008-03-14 16:52:07 EDT
I'm clearly the yard-stick regarding the use of PDE/OSGi features.  The reality being that I'm just an enthusiastic user that's found that if you ask nicely you'll often get what you want, especially from the PDE team.  But, as they say, "In PDE we do tooling, but our business is people!"
Comment 11 Philipp Kursawe CLA 2008-03-15 05:22:07 EDT
Thanks guys for the effort. But the more I think about it, I should maybe not have filed this request. You can always provide a translated value for that header without PDE putting a rather annoying warning symbol on your project just because you did not localize this text. I always wondered why I should have to translate the Bundle-Vendor name. 

And then the quick-fix will create a plugin.properties instead of using the Bundle-Localization default OSGI-INF/l10n/bundle.properties that already exists in the project. But that might be another bug.

Anyway thanks for the quick response :)

As for usage of this header. We use it in case of an error to create an automatic email sending it to the address given in the bundles header without user interaction.
Comment 12 Thomas Watson CLA 2008-03-15 08:17:26 EDT
Thanks Philip.  I'm late to the discussion.  Any header in the bundle manifest can be translated but the specification does have the following caveat.

<spec>
All headers in a bundle's manifest can be localized. However, the Framework
must always use the non-localized versions of headers that have
Framework semantics.
</spec>

For example, Bundle-SymbolicName, Bundle-Version, Import-Package, Export-Package ... have semantic meaning and the framework must always use the non-translated values of these types of headers.  The Bundle-ContactAddress has no semantic meaning and could be translated.  I agree with Philip's last comment, PDE should not force all translatable headers to be translated.  Nothing in PDE is preventing you from providing translation keys to your headers.

Chris, is it your intent to flag all translatable headers?  If so then you will have to keep a list of headers that have semantic meaning and not flag these.  This list is relatively constant for the Framework headers, but other specifications have headers that have semantic meaning also.  For example, DS has the Service-Component header.  Developers are free to define their own headers also that may have semantic meaning.  I'm not sure if it is possible to do this without adding a way to configure the headers with semantic meaning.
Comment 13 Philipp Kursawe CLA 2008-03-15 20:31:30 EDT
Yes, maybe there could be a way in PDE to configure *which* headers it should warn you to be translated. Even project based maybe. But after all more often I turn of the translation warnings altogether if they keep annoying me and make my project look "unclean" with all the warning symbols.
Comment 14 Philipp Kursawe CLA 2008-07-02 13:01:38 EDT
What's with Benjamin's patch? Is it going to be included in one of the next I-builds?
Or do you guys have a more configurable solution planned? Like a list of headers that should be translated that can be modified in the PDE preferences rather than being hard-coded?
Comment 15 Chris Aniszczyk CLA 2008-07-02 13:04:02 EDT
It seems reasonable to include this one for 3.5M1

However, we should address the need for possibly configuring which manifest headers should be translatable... this is another enhancement IMHO
Comment 16 Philipp Kursawe CLA 2008-07-03 10:31:38 EDT
created 239445 for the configurable translatable bundle-headers
Comment 17 Chris Aniszczyk CLA 2008-07-24 10:57:00 EDT
Thanks, committed to HEAD.

> 20080724
Comment 18 Chris Aniszczyk CLA 2008-07-24 10:57:06 EDT
Created attachment 108355 [details]
mylyn/context/zip