Index: org/netbeans/modules/i18n/wizard/Bundle.properties =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/Bundle.properties,v retrieving revision 1.16 diff -u -b -r1.16 Bundle.properties --- org/netbeans/modules/i18n/wizard/Bundle.properties 14 Mar 2002 10:41:06 -0000 1.16 +++ org/netbeans/modules/i18n/wizard/Bundle.properties 9 Apr 2002 13:52:43 -0000 @@ -48,7 +48,7 @@ TXT_SelectResourceHelp=Select Resource for All Sources TXT_SelectSourcesHelp=Select Sources to Internationalize -# I18nWizardDescriptor +## I18nWizardDescriptor.java CTL_Next=Next > ACSD_NEXT=Moves to next step of the wizard. CTL_Next_Mnem=N @@ -60,7 +60,7 @@ CTL_Cancel=Cancel ACSD_CANCEL=n/a -# ResourceWizardPanel +## ResourceWizardPanel.java CTL_Resource=Resource CTL_SelectResource=Select Resource CTL_SelectResource_Mnem=R @@ -77,8 +77,9 @@ TXT_SelectTestResource=Select Resource for Source Files ACS_ResourceWizardPanel=Select Resource for Sources MSG_ResourcePanel_desc=Select the resource bundle(s) where you want to store each file's internationalized strings. Click Select All to check one resource bundle for all files. +MSG_ResourcePanel_test_desc=Select the resource bundle(s) where you want to search each file's internationalized string keys. Click Select All to check one resource bundle for all files. -# SourceWizardPanel +## SourceWizardPanel.java CTL_AddSource=Add Source(s) CTL_AddSource_Mnem=A ACS_CTL_AddSource=N/A @@ -93,14 +94,17 @@ TXT_SelectSources=Select Sources to Internationalize TXT_SelecTestSources=Select sources to test their internationalized strings. ACS_SourceWizardPanel=N/A -MSG_SorcesPanel_desc=Select the source files that you want to internationalize. Use the buttons to add and remove source files. +MSG_SourcesPanel_desc=Select the source files that you want to internationalize. Use the buttons to add and remove source files. +MSG_SourcesPanel_test_desc=Select the source files that you want to test for internationalization keys existence. Use the buttons to add and remove source files. -# TestStringWizardPanel +## TestStringWizardPanel.java LBL_I18nString=Internationalized String TXT_AllI18nStrings=All internationalized strings have their resource. TXT_AllI18nStringsSource=All internationalized strings for this source have their resource. TXT_FoundMissingResource=Find Internationalized Strings With Missing Resource ACS_TestStringWizardPanel=N/A +LBL_missing_keys=Found Strings with Missing Keys: +LBL_missing_keys_mne=F ACS_ProgressWizardPanel=N/A Index: org/netbeans/modules/i18n/wizard/Bundle_ja.properties =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/Bundle_ja.properties,v retrieving revision 1.3 diff -u -b -r1.3 Bundle_ja.properties --- org/netbeans/modules/i18n/wizard/Bundle_ja.properties 13 Mar 2002 17:39:45 -0000 1.3 +++ org/netbeans/modules/i18n/wizard/Bundle_ja.properties 9 Apr 2002 13:52:43 -0000 @@ -172,3 +172,5 @@ MSG_SorcesPanel_desc=Select source files that you want to internationalize. Use buttons for this purpose. MSG_ResourcePanel_desc=Selected the resource bundle(s) to check for each file's internationalized strings. Click Select All to check one resource bundle for all files. + +LBL_missing_keys=Found Strings with Missing Keys: Index: org/netbeans/modules/i18n/wizard/I18nTestWizardAction.java =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/I18nTestWizardAction.java,v retrieving revision 1.7 diff -u -b -r1.7 I18nTestWizardAction.java --- org/netbeans/modules/i18n/wizard/I18nTestWizardAction.java 26 Feb 2002 09:59:44 -0000 1.7 +++ org/netbeans/modules/i18n/wizard/I18nTestWizardAction.java 9 Apr 2002 13:52:43 -0000 @@ -76,14 +76,14 @@ /** Gets wizard iterator thru panels used in wizard invoked by this action, * i.e I18N wizard. */ private WizardDescriptor.Iterator getWizardIterator() { - ArrayList panels = new ArrayList(3); + WizardDescriptor.Panel[] panels = new WizardDescriptor.Panel[3]; - panels.add(new SourceWizardPanel.Panel(true)); - panels.add(new ResourceWizardPanel.Panel(true)); - panels.add(new TestStringWizardPanel.Panel()); + panels[0] = new SourceWizardPanel.Panel(true); + panels[1] = new ResourceWizardPanel.Panel(true); + panels[2] = new TestStringWizardPanel.Panel(); + + return new WizardDescriptor.ArrayIterator(panels); - return new WizardDescriptor.ArrayIterator( - (WizardDescriptor.Panel[])panels.toArray(new WizardDescriptor.Panel[panels.size()])); } /** Initializes wizard descriptor. */ Index: org/netbeans/modules/i18n/wizard/ResourceWizardPanel.form =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/ResourceWizardPanel.form,v retrieving revision 1.4 diff -u -b -r1.4 ResourceWizardPanel.form --- org/netbeans/modules/i18n/wizard/ResourceWizardPanel.form 13 Mar 2002 17:39:45 -0000 1.4 +++ org/netbeans/modules/i18n/wizard/ResourceWizardPanel.form 9 Apr 2002 13:52:43 -0000 @@ -1,9 +1,9 @@
- - - + + + @@ -12,8 +12,8 @@ - - + + @@ -48,7 +48,6 @@ - @@ -64,7 +63,6 @@ - Index: org/netbeans/modules/i18n/wizard/ResourceWizardPanel.java =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/ResourceWizardPanel.java,v retrieving revision 1.12 diff -u -b -r1.12 ResourceWizardPanel.java --- org/netbeans/modules/i18n/wizard/ResourceWizardPanel.java 13 Mar 2002 17:39:45 -0000 1.12 +++ org/netbeans/modules/i18n/wizard/ResourceWizardPanel.java 9 Apr 2002 13:52:43 -0000 @@ -75,10 +75,12 @@ * @see Panel */ private final Panel descPanel; + private final boolean testMode; /** Creates new form SourceChooserPanel. */ - private ResourceWizardPanel(Panel descPanel) { + private ResourceWizardPanel(Panel descPanel, boolean testMode) { this.descPanel = descPanel; + this.testMode = testMode; initComponents(); @@ -105,6 +107,14 @@ descPanel.fireStateChanged(); } + private String getPanelDescription() { + if (testMode == false) { + return Util.getString("MSG_ResourcePanel_desc"); + } else { + return Util.getString("MSG_ResourcePanel_test_desc"); + } + } + /** Does additional components initialization. Sets mnemonics. */ private void postInitComponents() { addAllButton.setMnemonic(NbBundle.getBundle(getClass()).getString("CTL_SelectResourceAll_Mnem").charAt(0)); @@ -168,7 +178,7 @@ descTextArea.setColumns(20); descTextArea.setEditable(false); descTextArea.setLineWrap(true); - descTextArea.setText(Util.getString("MSG_ResourcePanel_desc")); + descTextArea.setText(getPanelDescription()); descTextArea.setWrapStyleWord(true); descTextArea.setOpaque(false); gridBagConstraints = new java.awt.GridBagConstraints(); @@ -368,7 +378,7 @@ public static class Panel extends I18nWizardDescriptor.Panel implements I18nWizardDescriptor.ProgressMonitor { /** Component. */ - private final ResourceWizardPanel resourcePanel = new ResourceWizardPanel(this); + private final ResourceWizardPanel resourcePanel; /** Indicates whether this panel is used in i18n test wizard or not. */ private boolean testWizard; @@ -382,6 +392,7 @@ /** Constructs panel for i18n wizard or i18n test wizard. */ public Panel(boolean testWizard) { this.testWizard = testWizard; + resourcePanel = new ResourceWizardPanel(this, testWizard); } Index: org/netbeans/modules/i18n/wizard/SourceWizardPanel.form =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/SourceWizardPanel.form,v retrieving revision 1.4 diff -u -b -r1.4 SourceWizardPanel.form --- org/netbeans/modules/i18n/wizard/SourceWizardPanel.form 13 Mar 2002 17:39:46 -0000 1.4 +++ org/netbeans/modules/i18n/wizard/SourceWizardPanel.form 9 Apr 2002 13:52:43 -0000 @@ -1,9 +1,9 @@ - - - + + + @@ -11,8 +11,8 @@ - - + + @@ -46,7 +46,6 @@ - @@ -62,7 +61,6 @@ - Index: org/netbeans/modules/i18n/wizard/SourceWizardPanel.java =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/SourceWizardPanel.java,v retrieving revision 1.12 diff -u -b -r1.12 SourceWizardPanel.java --- org/netbeans/modules/i18n/wizard/SourceWizardPanel.java 13 Mar 2002 17:39:46 -0000 1.12 +++ org/netbeans/modules/i18n/wizard/SourceWizardPanel.java 9 Apr 2002 13:52:43 -0000 @@ -46,7 +46,7 @@ /** - * First panel used in I18N Wizard. + * First panel used in I18N (test) Wizard. * * @author Peter Zavadsky * @see Panel @@ -61,11 +61,16 @@ * @see Panel */ private final Panel descPanel; + /** + * Panel role true (test wizard) false (i18n) wizard + */ + private boolean testRole = false; /** Creates new form SourceChooserPanel. * @param it's panel wizard descriptor */ - private SourceWizardPanel(Panel descPanel) { + private SourceWizardPanel(Panel descPanel, boolean testRole) { this.descPanel = descPanel; + this.testRole = testRole; initComponents(); @@ -102,6 +107,17 @@ removeButton.setMnemonic(NbBundle.getBundle(getClass()).getString("CTL_RemoveSource_Mnem").charAt(0)); } + /** + * Panel description depend of its container test or i18n role + */ + private String getPanelDescription() { + if (testRole == false) { + return Util.getString("MSG_SourcesPanel_desc"); + } else { + return Util.getString("MSG_SourcesPanel_test_desc"); + } + } + /** Init list componnet. */ private void initList() { sourcesList.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @@ -137,7 +153,7 @@ descTextArea.setEditable(false); descTextArea.setLineWrap(true); - descTextArea.setText(Util.getString("MSG_SorcesPanel_desc")); + descTextArea.setText(getPanelDescription()); descTextArea.setOpaque(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; @@ -326,7 +342,7 @@ /** Gets component to display. Implements superclass abstract method. * @return this instance */ protected Component createComponent() { - Component component = new SourceWizardPanel(this); + Component component = new SourceWizardPanel(this, testWizard); if(testWizard) component.setName(NbBundle.getBundle(SourceWizardPanel.class).getString("TXT_SelecTestSources")); else Index: org/netbeans/modules/i18n/wizard/TestStringWizardPanel.form =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/TestStringWizardPanel.form,v retrieving revision 1.4 diff -u -b -r1.4 TestStringWizardPanel.form --- org/netbeans/modules/i18n/wizard/TestStringWizardPanel.form 12 Nov 2001 10:26:45 -0000 1.4 +++ org/netbeans/modules/i18n/wizard/TestStringWizardPanel.form 9 Apr 2002 13:52:43 -0000 @@ -1,9 +1,9 @@ - - - + + + @@ -25,7 +25,6 @@ - @@ -38,7 +37,7 @@ - + Index: org/netbeans/modules/i18n/wizard/TestStringWizardPanel.java =================================================================== RCS file: /cvs/i18n/src/org/netbeans/modules/i18n/wizard/TestStringWizardPanel.java,v retrieving revision 1.13 diff -u -b -r1.13 TestStringWizardPanel.java --- org/netbeans/modules/i18n/wizard/TestStringWizardPanel.java 28 Nov 2001 12:07:28 -0000 1.13 +++ org/netbeans/modules/i18n/wizard/TestStringWizardPanel.java 9 Apr 2002 13:52:43 -0000 @@ -59,10 +59,8 @@ /** - * WizardDescriptor.Panel used for to show found hard coded strings - * for sepcified sources. It offers default key-value pairs and allows modify them. - * These values will be used by actual i18n-zation of those sources. - * It is the fourth and last panel of I18N Wizard. + * WizardDescriptor.Panel used for to show found missing keys. + * It is the fourth and last panel of I18N Test Wizard. * * @author Peter Zavadsky * @see Panel @@ -84,9 +82,9 @@ /** Table model for stringTable. */ private final AbstractTableModel tableModel = new TestStringTableModel(); - /** Creates new form HardCodedStringsPanel */ private TestStringWizardPanel() { + initComponents(); postInitComponents(); @@ -114,9 +112,9 @@ /** Adds additional init of components. */ private void postInitComponents() { sourceLabel.setLabelFor(sourceCombo); - sourceLabel.setDisplayedMnemonic(NbBundle.getBundle(getClass()).getString("LBL_Source").charAt(0)); + sourceLabel.setDisplayedMnemonic(Util.getString("LBL_Source_Mnem").charAt(0)); testStringLabel.setLabelFor(testStringTable); - testStringLabel.setDisplayedMnemonic(NbBundle.getBundle(getClass()).getString("LBL_FoundStrings_Mnem").charAt(0)); + testStringLabel.setDisplayedMnemonic(Util.getString("LBL_missing_keys_mne").charAt(0)); } /** Getter for resources property. */ @@ -258,7 +256,7 @@ gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); add(sourceCombo, gridBagConstraints); - testStringLabel.setText(NbBundle.getBundle(HardStringWizardPanel.class).getString("LBL_FoundStrings")); + testStringLabel.setText(NbBundle.getBundle(HardStringWizardPanel.class).getString("LBL_missing_keys")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; @@ -295,11 +293,11 @@ }//GEN-LAST:event_sourceComboActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JComboBox sourceCombo; + private javax.swing.JLabel testStringLabel; private javax.swing.JLabel sourceLabel; private javax.swing.JScrollPane scrollPane; - private javax.swing.JLabel testStringLabel; private javax.swing.JTable testStringTable; - private javax.swing.JComboBox sourceCombo; // End of variables declaration//GEN-END:variables /** Table model for this class. */ @@ -488,15 +486,17 @@ private final JLabel emptyLabel; /** Test wizard panel component. */ - private final TestStringWizardPanel testStringPanel = new TestStringWizardPanel(); + private final TestStringWizardPanel testStringPanel; - { + public Panel() { + testStringPanel = new TestStringWizardPanel(); emptyLabel = new JLabel(NbBundle.getBundle(TestStringWizardPanel.class).getString("TXT_AllI18nStrings")); emptyLabel.setHorizontalAlignment(JLabel.CENTER); emptyLabel.setVerticalAlignment(JLabel.CENTER); } + /** Gets component to display. Implements superclass abstract method. * @return this instance */ protected Component createComponent() { @@ -512,7 +512,6 @@ constraints.weighty = 1.0; constraints.fill = GridBagConstraints.BOTH; panel.add(testStringPanel, constraints); - return panel; } @@ -595,7 +594,7 @@ // Do actual replacement. Iterator it = stringMap.keySet().iterator(); - progressPanel.setSubText(NbBundle.getBundle(getClass()).getString("LBL_Source")+" "+((DataObject)source).getPrimaryFile().getPackageName('.')); + progressPanel.setSubText(Util.getString("LBL_Source")+" "+((DataObject)source).getPrimaryFile().getPackageName('.')); for(int j=0; it.hasNext(); j++) { HardCodedString hcString = (HardCodedString)it.next();