This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194562 - Locale variants not supported by <branding>
Summary: Locale variants not supported by <branding>
Status: RESOLVED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 195184 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-21 08:19 UTC by mkash
Modified: 2011-02-15 12:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mkash 2011-01-21 08:19:12 UTC
Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-6322-on-101214)
Java: 1.6.0_18; Java HotSpot(TM) 64-Bit Server VM 16.0-b13
System: Windows 7 version 6.1 running on amd64; Cp1250; hr_HR (nb)

Using branding editor to create modified bundle.properties of platform modules.
Branding editor creates regular bundle.properties file under the folder /branding.

I want to localize /branding/.../bundle.properties to /branding/.../bundle_hr_HR.properties.
Build system, specifically "branding" ant task, creates the file: 
bundle_hr_HR_{branding.token}.properties, but the expected result should be:
bundle_{branding.token}_hr_HR.properties.

The problem is in file:
/nbbuild/antsrc/org/netbeans/nbbuild/Branding.java

The method that packs file-s ignores the locale and just puts {branding.token} at the end of the filename.
Comment 1 mkash 2011-01-21 08:20:23 UTC
Here is another case of the same problem:

http://netbeans-org.1045718.n5.nabble.com/Netbeans-builds-wrong-locale-branding-td3044192.html
Comment 2 Jesse Glick 2011-01-21 14:00:00 UTC
The current harness does not have any solid support for localization in general. The <branding> task is not designed to manage more than one variant of resources, so placing localized and unlocalized branded resources in a single dir is a mistake.

You can create a separate dir for localized branded resources and add a special target calling <branding> into your suite's build.xml, just as you can manually set up a dir for localized but unbranded resources. http://wiki.netbeans.org/DevFaqMavenL10N also discusses how to do this sort of thing using Maven.
Comment 3 mkash 2011-01-21 16:18:01 UTC
OK. Thanx for the explanation. I'll give it a try.
Comment 4 Jesse Glick 2011-02-15 12:52:14 UTC
*** Bug 195184 has been marked as a duplicate of this bug. ***