TS 61 FormLocalization

Localization in Form Module, Test Specification for NetBeans 7.4

Author: Jana Maleckova
Version: 7.4
Last update: 2013/06/21
Introduction: This test specification tests Localization in Form

Contents


Test suite: Creating of new Locale

Purpose: Test if new Locale is added
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) with container (e.g. JFrame named MyFrame) which is not in default package. Insert some swing componet in MyFrame and set automatic Internationalization on

  1. Create new Locale
    1. Select node Bundle.properties in Project Window
    2. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    3. Select one from Predefined Locales and press OK
    • EXPECTED RESULT: New Locale is created. Locale is displayed in Project Window under node Bundle.properties. The name of Locale consists of language code - first two letters which represent language code and next two describe country code. Design Locale property of MyFrame should contain these choises - Default language and created Locale
  2. Delete Locale.
    1. Select previous Locale and do Delete (by popup menu - delete or by keyboard key Delete)
    2. Confirm deleting
    • EXPECTED RESULT: In both cases, Confirmation Deleting Dialog is invoked. And when deleting is confirmed, Locale is deleted and no exception should occur. Design Locale property of MyFrame should contain only choise Default language


Test suite: Editing Locale from Form

Purpose: Check if Locale can be edited throught form
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) with container (e.g. JFrame named MyFrame) which is not in default package. Insert some swing componet in MyFrame and set automatic Internationalization on

  1. Create new Locale with keys
    1. Select node Bundle.properties in Project Window
    2. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    3. Select one from Predefined Locales and press OK
    • EXPECTED RESULT: New Locale with one key is created. This key is visible in Project Window if Locale's node is expanded
  2. Add new key through Form designer
    1. Relate to previous testcase - use Locale with key property, already created from previous testcase
    2. Switch to design of MyFrame
    3. Select root node of the form's design view navigator window and change Design Locale property to new Locale created in previous testcase
    4. Insert new Swing component into MyFrame e.g. jLabel and change it's text property, e.g. Name
    • EXPECTED RESULT: New key
      MyJFrame.jLabel2.text=Name
      is added in Locale and new node with the name of key's name is created in Project Window under Locale
  3. Editing key value through Form Designer
    1. Select jLable2 and change text property from Name to Test
    • EXPECTED RESULT: Text of jLabel2 is changed from Name to Test in Form Designer and key in Locale is set as
      MyJFrame.jLabel2.text=Test
  4. Editing key value through Custom Text Editor
    1. Select jLabel2 in Form Designer
    2. Select text property in Property sheet
    3. Invoke Custom Text Editor using [...] Button next to text property
    4. Custom Text Editor is in Resource Bundle select mode. Change key value from Test to Label and press OK
    • EXPECTED RESULT: Text of jLabel2 is changed from Test to Label in Form Designer and key in Locale is set as
      MyJFrame.jLabel2.text=Label
  5. Editing key value of two different Locales through Custom Text Editor
    1. Have MyFrame as was described at start up of this Test Suit.
    2. Select node Bundle.properties in Project Window
    3. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    4. Select one from Predefined Locales e.g. English - United Kingdom and press OK
    5. Do the same steps and create futher Locale e.g. German - Germany
    6. Move to Form Designer of MyFrame
    7. Select Root Node in Inspector and select English Locale in Design Locale property
    8. Change text property of jLabel1 from jLabel1 to English
    9. Change Locale to German in Design Locale property
    10. Change text property of jLabel1 from jLabel1 to German
    • EXPECTED RESULT: The key value in both Locales is changed. In English Locale there is string
      MyJFrame.jLabel1.text=English
      and in German one there is
      MyJFrame.jLabel1.text=German
      . When Locales are changed in Design Locale, appropriate key values should be reloaded in Form Designer at that time.
  6. Deleting key from Form Designer
    1. Select jLabel2 in MyFrame and delete it
    • EXPECTED RESULT: Key
      MyJFrame.jLabel2.text=Label
      is deleted from Locale


Test suite: Editing Locale from Simple Editor

Purpose: Test if changes made in Locale simple Editor are updated in MyFrame
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) with container (e.g. JFrame named MyFrame) which is not in default package. Insert some swing componet in MyFrame and set automatic Internationalization on

  1. Edit Locale from Simple Editor
    1. Select node Bundle.properties in Project Window
    2. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    3. Select one from Predefined Locales and press OK
    4. Switch to design of MyFrame
    5. Select root node of the form's design view navigator window and change Design Locale property to this new Locale
    6. Insert new Swing component into MyFrame e.g. jLabel and change it's text property, e.g. Name
    7. Select node of new Locale in Project Window, invoke context menu and choose edit. A simple Editor is opened
    8. Change value of key
      MyJFrame.jLabel2.text
      from Name to Test
    9. Move back in Form Desing of MyFrame, Select Root Node in Inspector and do "Reload Form" from context menu
    • EXPECTED RESULT: The text property of jLabel2 should be changed to Test and be visible in Form Designer
  2. Create two Locales
    1. Have MyFrame as was described at start up of this Test Suit.
    2. Select node Bundle.properties in Project Window
    3. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    4. Select one from Predefined Locales e.g. English - United Kingdom and press OK
    5. Do the same steps and create futher Locale e.g. German - Germany
    6. Invoke popup menu on each Locale node in Project Window and do Edit
    • EXPECTED RESULT: Two Locales are generated and each of them contains one key with value
      MyJFrame.jLabel1.text=jLabel1
  3. Edit key values in each Locales using Simple Editor
    1. Open both Locales in simple Editor by popup menu - Edit, done on each node in Project Window
    2. Change value of key
      MyJFrame.jLabel1.text
      in English Locale to
      MyJFrame.jLabel1.text=English
      and in German Local to
      MyJFrame.jLabel1.text=German
    3. Save it (Ctrl-S)
    4. Move to Form Designer of MyFrame
    5. Select Root Node in Inspector and select English Locale in Design Locale property
    6. Do the same but select German Locale in Design Locale property
    • EXPECTED RESULT: Text property of jLabel1 is changing in dependency which Locale is select in Design Locale property. Preview behaviour is the same as in design. MyFrame doesn't need to be reloaded


Test suite: Editing Locale from Advance Editor

Purpose: Test if changes made in Locale Advance Editor are updated in MyFrame
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) with container (e.g. JFrame named MyFrame) which is not in default package. Insert some swing componet in MyFrame and set automatic Internationalization on

  1. Edit Locale from Advance Editor
    1. Select node Bundle.properties in Project Window
    2. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    3. Select one from Predefined Locales and press OK
    4. Switch to design of MyFrame
    5. Select root node of the form's design view navigator window and change Design Locale property to this new Locale
    6. Insert new Swing component into MyFrame e.g. jLabel and change it's text property, e.g. Name
    7. Select Bundle.properties in Project Window, invoke context menu and choose open. An Advance Editor is opened and displayes 3 columns - key - default language - created Locale
    8. Change value of key for jLabel2 in Locale's column from Name to Test
    9. Move back in Form Desing of MyFrame, Select Root Node in Inspector and do "Reload Form" from context menu
    • EXPECTED RESULT: The text property of jLabel2 should be changed to Test and be visible in Form Designer
  2. Create two Locales
    1. Have MyFrame as was described at start up of this Test Suit.
    2. Select node Bundle.properties in Project Window
    3. Invoke popup menu and select "Add Locale...". Dialog for choosing of new Locale is invoked
    4. Select one from Predefined Locales e.g. English - United Kingdom and press OK
    5. Do the same steps and create futher Locale e.g. German - Germany
    6. Invoke popup menu on Bundle.properties node in Project Window and do Open
    • EXPECTED RESULT: Advance editor is opened and contains 4 columns - key - default language - English Locale - German Locale
  3. Edit key values in each Locales using Advance Editor
    1. Open Locales in Advance Editor by popup menu - Open, done on node Bundle.properties in Project Window
    2. Change value of key
      MyJFrame.jLabel1.text
      in English Locale to
      English
      and in German Local to
      German
    3. Save it (Ctrl-S)
    4. Move to Form Designer of MyFrame
    5. Select Root Node in Inspector and choose English Locale in Design Locale property
    6. Do the same but select German Locale in Design Locale property
    • EXPECTED RESULT: Text property of jLabel1 in Form Designer is changing in dependency which Locale is select in Design Locale property. Preview behaviour is the same as in design. MyFrame doesn't need to be reloaded
Not logged in. Log in, Register

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