Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 250334 - Renaming an NLS property file needs special handling with respect to the Bundle-Localization header
Summary: Renaming an NLS property file needs special handling with respect to the Bund...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 15:49 EDT by Simon Archer CLA
Modified: 2008-11-04 19:19 EST (History)
2 users (show)

See Also:


Attachments
patch to make Simon happy :) (4.04 KB, patch)
2008-11-04 17:47 EST, Benjamin Cabé CLA
caniszczyk: iplog+
Details | Diff
mylyn/context/zip (1.41 KB, application/octet-stream)
2008-11-04 17:47 EST, Benjamin Cabé CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2008-10-09 15:49:56 EDT
When an NLS properties file is renamed PDE needs to respect the fact that the value of the Bundle-Localization header is not a filename, but rather a prefix for all localization properties file.  For example, given the following:

  META-INF/
    MANIFEST.MF
      Bundle-Localization: OSGI-INF/l10n/plugin

  OSGI-INF/
    l10n/
      plugin.properties


Renaming plugin.properties to plugin_de.properties results in the manifest header changing to:

    Bundle-Localization: OSGI-INF/l10n/plugin_de

In this case the header should NOT have been changed. I am not saying that the Bundle-Localization header never needs changing in response to a rename, for example:

Renaming the file bundle.properties should result in the manifest header changing to:

    Bundle-Localization: OSGI-INF/l10n/bundle

The rename must detect the underscore followed by a country code, and an optional underscore and language code.

Tricky indeed.
Comment 1 Benjamin Cabé CLA 2008-11-04 17:47:08 EST
Created attachment 117018 [details]
patch to make Simon happy :)
Comment 2 Benjamin Cabé CLA 2008-11-04 17:47:13 EST
Created attachment 117019 [details]
mylyn/context/zip
Comment 3 Chris Aniszczyk CLA 2008-11-04 17:48:35 EST
Comment on attachment 117018 [details]
patch to make Simon happy :)

Thanks Benjamin!
Comment 4 Chris Aniszczyk CLA 2008-11-04 19:15:00 EST
done.

> 20091104

Benjamin, I had to change the sTrim.replace to sTrim.replaceAll due to the J2SE-1.4 limitation.

Thanks!
Comment 5 Benjamin Cabé CLA 2008-11-04 19:19:51 EST
Arg! See bug 244369 ... :)
Thanks for the correction, Chris!