Bug 83348 - Automatic I18N doesn't create locale files for other bundles
Automatic I18N doesn't create locale files for other bundles
Status: NEW
Product: guibuilder
Classification: Unclassified
Component: Code
6.x
All Windows XP
: P3 (vote)
: TBD
Assigned To: issues@guibuilder
issues@guibuilder
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-24 10:04 UTC by arittner
Modified: 2007-04-27 03:12 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arittner 2006-08-24 10:04:33 UTC
First, it works without problems:
1. I've created a sample form and changed the Property-Bundle file to a new
empty bundle in a different project. 
2. I enable the Automatic I18N
3. Enter all default Labels, save
4. Change the local to "de"
5. Enter all german Labels, save
6. Change the local to "en"
7. Enter all english Labels, save

The bundle contains all different labels for default, de and en.

1. I open an existing form and change the Layout from "Absolute Layout" to "Free
Design" and set the property bundle to the same bundle and activate Automatic I18N.

2. In the combo box "Design local" I choose "de".
3. I enter all german labels and save
4. I change to "en"
5. I enter all english labels and save.

Now I see the bundle is only changed in the default language with the last
entered english translation. The "de" and "en" part is not changed.

An additional comment: I need two "save all" to get the "Save all" toolbar
button disabled. On the first click the "Save All" button disables and enables
again. With the second click the button finally disables.

best regards,
  josh.
Comment 1 Tomas Pavek 2006-08-24 10:33:33 UTC
What exact IDE build number do you use? And JDK?

"Save all" is a different problem, see issue 81132.
Comment 2 arittner 2006-08-24 11:00:45 UTC
Hello, I'm again.

It's much more complicated. With changing the bundle languange and entering the
translated words I get no changes in my bundles. 

If I change from "en" to "de" and enter "Geburtstag" for birthday and "save all"
I can't find the word "Geburtstag" in formulars.properties,
formulars_de.properties and formulars_en.properties. I can't find the literal in
the XML form file, too. But the matisse gui editor shows me the label with the
String "Geburtstag".

The default bundle file contains only "*.name" key/value pairs. I miss all
"*.text" key/value pairs. The "de" and "en" bundles contains no ".name" and no
".text" key/value pairs. 

I don't know what's going wrong...

best regards,
  josh.

Comment 3 arittner 2006-08-24 11:04:36 UTC
Sorry, I use JDK 1.4.2_12 and IDE Dev 200608141200 (M2) with swing-layout 1.0.1.

best regards,
  josh.
Comment 4 arittner 2006-08-24 11:44:32 UTC
Ok, I think I've found the main problem.

The form I've changed to "Free Design" contains legacy L18N command:

jLB_BIRTHDAY.setText(Pool.getFldLoc ("BIRTHDAY")); // NOI18N
jTF_BIRTHDAY.setName(bundle.getString("jFrmAdrAnsprPartner.jTF_BIRTHDAY.name"));
// NOI18N

The .setText(Pool.getFldLoc ("BIRTHDAY")) is my old L18N connection from NB5.x.
Matisse ignores this non-literals, gives me no error and no warning. But I can
edit in "Automatic L18N" Mode the labels (and nothing changes the new connected
bundle).

best regards,
  josh.
Comment 5 Tomas Pavek 2006-08-24 14:18:40 UTC
Any chance you could attach your forms and properties files here (or send it to
me privately) so I could better reproduce it? Or could you distill the gist of
the problem, or provide a simpler example? 

I've just tried to follow your steps but everything worked fine for me. I might
not do everything as you did... E.g. have you really used the bundle file from
another project? I doubt it is possible with auto i18n... Thanks
Comment 6 Tomas Pavek 2006-08-25 10:41:17 UTC
I missed your last comment, sorry. I think I understand now. The locale files 
are created automatically only for the main bundle file which set for the 
automatic internationalization. If you have some string set manually to another 
bundle file then creating new locale does not create the locale file for this 
bundle. If you create the locale file manually then it works and the locale 
specific texts are placed correctly.

I don't think this is a defect - automatic internationalization is supposed to 
care only about the automatically created bundle. But perhaps we could make 
this particular case work and create the locale files for all bundle files 
referenced in given GUI form.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo