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 33222 - Internationalize doesn't work for more than 2 strings in guarded block
Summary: Internationalize doesn't work for more than 2 strings in guarded block
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: -S1S-
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Marian Petras
URL:
Keywords:
: 36611 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-24 14:59 UTC by pfelenda
Modified: 2004-03-03 22:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff in -c format (4.07 KB, patch)
2003-08-26 09:27 UTC, Jan Kovar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pfelenda 2003-04-24 14:59:54 UTC
How to reproduce :
Prepare a Form with 3 strings.(strings should be
in guarded block)
e.g. create JFrame and add 3 JButtons and move
focus to
 generated source file.

1) Call Tools|Internationalization|Internationalize...
2) Fill appeared dialog "Internationalize..."
3) Click 'Replace'  -> first jbutton is
internationalized and corsor is moved to end of
guarded block
4) Click 'Replace' -> second jbutton is
internationalized

-> Dialog Internationalize disappeared and
jbutton3 is not internationalized.
Comment 1 Patrick Keegan 2003-04-25 13:53:02 UTC
Petr, is there a workaround?
Comment 2 pfelenda 2003-04-25 14:56:31 UTC
Yes, there is.
Workaround is easy. User just need to do these steps:
1) invoke the Internationalize dialog and continue with
Internationalization of rest strings.
(it is possible to internationalize only two strings again 
in this guarded block)
2) goto step 1 until all guarded block is internationalized
Comment 3 Patrick Keegan 2003-04-25 15:38:18 UTC
Thanks  for the info. Proposed relnote:

The Tools | Internationalization | Internationalize command only works
for two strings at a time in guarded blocks of form objects.

Workaround: Call the command again and resume internationalization of
the strings, two at a time. Repeat as many times as necessary. 
Comment 4 _ pkuzel 2003-05-12 15:43:38 UTC
I can reproduce, but cannot find reason.

Further second string to be replaced is not correcty highlighted. A
bug is probably in replacer because skipping works smoothly.
Comment 5 Jan Kovar 2003-08-26 09:26:18 UTC
I think I found a solution. See diff below.

Problem is, that the updates of guarded section are now 
postponed so all relevant code, which have to be performed 
after the guarded section is regenerated, must be 
postponed aswell.

The fix is for [release35] but diff should be identical 
for [maintrunk]. 
Petr, please review it.
Comment 6 Jan Kovar 2003-08-26 09:27:16 UTC
Created attachment 11423 [details]
diff in -c format
Comment 7 Antonin Nebuzelsky 2003-11-04 14:54:15 UTC
Fixed in Nevada Patch 1 and in Arrow.
Comment 8 ehucka 2003-11-04 15:49:12 UTC
*** Issue 36611 has been marked as a duplicate of this issue. ***
Comment 9 ehucka 2004-02-13 10:18:40 UTC
Is it so hard to commit this patch into maintrunk? I've increased
priority.
Comment 10 Marian Petras 2004-02-25 14:57:14 UTC
Fixed in the trunk.

Fixed by applying the patch provided by Jan Kovar.
Comment 11 pfelenda 2004-02-26 13:17:52 UTC
Verified in dev build 200402251900. I tried internacionalize my
samples and it works for all string in guarded block! Thanks
Comment 12 Patrick Keegan 2004-03-03 22:53:29 UTC
removing RELNOTE keyword