Bug 201994 - NLS wizard should include localization file in build.properties
Summary: NLS wizard should include localization file in build.properties
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M3   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact: Brian Bauman CLA
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2007-09-01 23:32 EDT by Wassim Melhem CLA
Modified: 2011-06-20 13:42 EDT (History)
2 users (show)

See Also:
caniszczyk: review+


Attachments
mylyn/context/zip (967 bytes, application/octet-stream)
2007-09-03 11:59 EDT, Chris Aniszczyk CLA
no flags Details
Patch (2.85 KB, patch)
2007-10-03 18:02 EDT, Nobody - feel free to take it CLA
no flags Details | Diff
mylyn/context/zip (1.21 KB, application/octet-stream)
2007-10-03 22:44 EDT, Chris Aniszczyk CLA
no flags Details
org.eclipse.pde.ui.patch (1.92 KB, patch)
2007-10-03 23:51 EDT, Chris Aniszczyk CLA
no flags Details | Diff
mylyn/context/zip (1.36 KB, application/octet-stream)
2007-10-03 23:51 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 Wassim Melhem CLA 2007-09-01 23:32:02 EDT
1. Create a Hello World plug-in
2. Right-click on the plug-in project and choose PDE Tools > Externalize Strings from the context menu.
3. Accept all defaults in the NLS wizard and press Finish.

The wizard will successfully create a new plugin.properties file (great!), however it does not modify the bin.includes key in the plug-in's build.properties file to include this new file (not so great!)

This enhancement, along with bug 147621, would go a long way in ensuring a smooth NLS workflow.
Comment 1 Chris Aniszczyk CLA 2007-09-03 11:59:28 EDT
adding context, marking for bugday
Comment 2 Chris Aniszczyk CLA 2007-09-03 11:59:30 EDT
Created attachment 77591 [details]
mylyn/context/zip
Comment 3 Nobody - feel free to take it CLA 2007-09-29 10:23:11 EDT
I'll pick this one up too Chris, if that's ok?
Comment 4 Chris Aniszczyk CLA 2007-09-29 10:33:09 EDT
awesome!
Comment 5 Nobody - feel free to take it CLA 2007-10-03 05:40:56 EDT
A patch is nearly ready for this one guys. Just had a quick question...

If the project is missing a "build.properties" file should we create a default one as part of the "Externalize Strings" operation and subsequently add the "plugin.properties" file to the "bin.includes" key or just skip this part of the operation altogether?

If we should create a "build.properties" file, there is currently no clean way to do this (i.e. via a helper class/method) and i would suggest moving the code from 
"new project operation" out to such a helper class or method (its already duplicated in the "covert to plugin project operation").

Thoughts, suggestions?
Comment 6 Brian Bauman CLA 2007-10-03 10:29:40 EDT
Don't worry about creating the build.properties.  If it is missing, the user should already have a marker in their project.  We do not currently have a single piece of code which does the calculations and creates the file.  If we find this scenario causes problems, we can go ahead and refactor code at that time.  Hopefully this makes it easier on you :)
Comment 7 Nobody - feel free to take it CLA 2007-10-03 18:02:21 EDT
Created attachment 79683 [details]
Patch

Here it is guys. The updated logic is:

- We now update the "build.properties" (if present) file to include the newly generated "plugin.properties" file in the "bin.includes" key.

- If the  "build.properties" file is not present no modifications are made.
Comment 8 Chris Aniszczyk CLA 2007-10-03 18:04:55 EDT
thanks!

Targetting towards 3.4M3
Comment 9 Chris Aniszczyk CLA 2007-10-03 22:44:06 EDT
Great patch. I internalized a string but pretty much left everything the same.

very nice Gary.... we're getting fancy now ;)
Comment 10 Chris Aniszczyk CLA 2007-10-03 22:44:15 EDT
Created attachment 79689 [details]
mylyn/context/zip
Comment 11 Chris Aniszczyk CLA 2007-10-03 23:00:43 EDT
thanks again Gary!
Comment 12 Chris Aniszczyk CLA 2007-10-03 23:50:07 EDT
ooops, we forgot a case Gary.
Comment 13 Chris Aniszczyk CLA 2007-10-03 23:51:12 EDT
Created attachment 79692 [details]
org.eclipse.pde.ui.patch
Comment 14 Chris Aniszczyk CLA 2007-10-03 23:51:16 EDT
Created attachment 79693 [details]
mylyn/context/zip
Comment 15 Chris Aniszczyk CLA 2007-10-03 23:51:56 EDT
if you set the localization to be something other than 'plugin' we hardcoded it to plugin still... simply updated the code to be awary of the bundleLocalization :D
Comment 16 Brian Bauman CLA 2007-10-04 02:45:52 EDT
> ooops, we forgot a case Gary.

I was waiting to see if you would catch that :)
Comment 17 Wassim Melhem CLA 2007-10-04 02:49:02 EDT
Bauman, you are up at 1:45 a.m. CST?


Comment 18 Nobody - feel free to take it CLA 2007-10-04 06:39:12 EDT
I was sure the hard coding of "plugin.properties" was wrong and had it on my todo list to revisit and investigate but it got missed / it was 2am! Cheers for the correction Chris :)
Comment 19 Brian Bauman CLA 2007-10-04 11:34:36 EDT
> Bauman, you are up at 1:45 a.m. CST?

You know keeping track of Chris is a full time, round the clock job ;-)

Comment 20 Chris Aniszczyk CLA 2007-10-04 11:41:24 EDT
hah, my late night coding and wine tasting results in interesting things.
Comment 21 Brian Bauman CLA 2007-10-30 15:46:22 EDT
Verified on I20071030-0800