Ignore:
Timestamp:
2006-07-10T15:02:33+12:00 (18 years ago)
Author:
kjdon
Message:

Changed text handling to use Dictionary.get rather than Dictionary.setText or Dictionary.registerBoth etc. also removed mnemonics cos they suck for other languages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java

    r12072 r12123  
    202202
    203203        JPanel component_selection_panel = new JPanel();
    204         JLabel component_label = new JLabel();
    205         Dictionary.registerText(component_label, "CDM.TranslationManager.Affected_Features");
     204        JLabel component_label = new JLabel(Dictionary.get("CDM.TranslationManager.Affected_Features"));
    206205        features_list = new JList(getFeaturesList());
    207206        features_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    208207
    209208        JPanel fragment_selection_panel = new JPanel();
    210         JLabel fragment_label = new JLabel();
    211         Dictionary.registerText(fragment_label, "CDM.TranslationManager.Assigned_Fragments");
    212 
     209        JLabel fragment_label = new JLabel(Dictionary.get("CDM.TranslationManager.Assigned_Fragments"));
     210       
    213211        fragment_table = new JTable(fragment_table_model);
    214212        fragment_table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
     
    227225
    228226        JPanel language_panel = new JPanel();
    229         JLabel language_label = new JLabel();
    230         Dictionary.registerText(language_label, "CDM.TranslationManager.Language");
     227        JLabel language_label = new JLabel(Dictionary.get("CDM.TranslationManager.Language"));
     228       
    231229        language_combobox = new JComboBox(CollectionDesignManager.language_manager.getLanguageCodes().toArray());
    232230        language_combobox.setPreferredSize(COMPONENT_SIZE);
    233231        language_combobox.setRenderer(new LanguageListCellRenderer());
    234         Dictionary.registerTooltip(language_combobox, "CDM.TranslationManager.Language_Tooltip");
    235 
     232        language_combobox.setToolTipText(Dictionary.get("CDM.TranslationManager.Language_Tooltip"));
     233       
    236234        JPanel default_text_panel = new JPanel();
    237         JLabel default_label = new JLabel();
    238         Dictionary.registerText(default_label, "CDM.TranslationManager.Default_Text");
     235        JLabel default_label = new JLabel(Dictionary.get("CDM.TranslationManager.Default_Text"));
     236       
    239237        default_area = new JTextArea();
    240238        default_area.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
     
    244242
    245243        JPanel translated_text_panel = new JPanel();
    246         JLabel translation_label = new JLabel();
    247         Dictionary.registerText(translation_label, "CDM.TranslationManager.Translation");
     244        JLabel translation_label = new JLabel(Dictionary.get("CDM.TranslationManager.Translation"));
     245     
    248246        translation_area = new JTextArea();
    249247        translation_area.setBackground(Configuration.getColor("coloring.disabled", false));
     
    251249        translation_area.setLineWrap(true);
    252250        translation_area.setWrapStyleWord(true);
    253         Dictionary.registerTooltip(translation_area, "CDM.TranslationManager.Translation_Tooltip");
     251        translation_area.setToolTipText(Dictionary.get("CDM.TranslationManager.Translation_Tooltip"));
    254252
    255253        JPanel button_pane = new JPanel();
    256         add_button = new GLIButton();
     254        add_button = new GLIButton(Dictionary.get("CDM.TranslationManager.Add"), Dictionary.get("CDM.TranslationManager.Add_Tooltip"));
    257255        add_button.setEnabled(false);
    258         add_button.setMnemonic(KeyEvent.VK_A);
    259         Dictionary.registerBoth(add_button, "CDM.TranslationManager.Add", "CDM.TranslationManager.Add_Tooltip");
    260         replace_button = new GLIButton();
     256
     257        replace_button = new GLIButton(Dictionary.get("CDM.TranslationManager.Replace"), Dictionary.get("CDM.TranslationManager.Replace_Tooltip"));
    261258        replace_button.setEnabled(false);
    262         replace_button.setMnemonic(KeyEvent.VK_C);
    263         Dictionary.registerBoth(replace_button, "CDM.TranslationManager.Replace", "CDM.TranslationManager.Replace_Tooltip");
    264         remove_button = new GLIButton();
     259
     260        remove_button = new GLIButton(Dictionary.get("CDM.TranslationManager.Remove"), Dictionary.get("CDM.TranslationManager.Remove_Tooltip"));
    265261        remove_button.setEnabled(false);
    266         remove_button.setMnemonic(KeyEvent.VK_R);
    267         Dictionary.registerBoth(remove_button, "CDM.TranslationManager.Remove", "CDM.TranslationManager.Remove_Tooltip");
     262
    268263
    269264        // Connection
Note: See TracChangeset for help on using the changeset viewer.