Ignore:
Timestamp:
2008-10-10T09:05:07+13:00 (16 years ago)
Author:
oranfry
Message:

changes to the way ant-installer loads and reloads the language packs, and a new attribute to the select input which triggers it to change the language to the input value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/input/InputField.java

    r14982 r17514  
    1818import java.util.MissingResourceException;
    1919import java.util.ResourceBundle;
     20import org.tp23.antinstaller.Installer;
    2021
    2122/**
     
    2930    extends OutputField {
    3031
    31     // i18n support
    32     private static ResourceBundle langPack = null;
    33     static{
    34         try {
    35             langPack = ResourceBundle.getBundle("resources.LanguagePack");
    36         } catch (MissingResourceException e) {
    37             // ignore, signifies no lang packs installed 
    38         }
    39     }
    40 
    4132    private String property;
    4233    protected String defaultValue;
     
    4637     */
    4738    private boolean editted = false;
     39    private Installer i = new Installer();
    4840
    4941    public InputField() {
     
    5143
    5244    public String getDisplayText() {
    53         if(langPack != null){
    54             return langPack.getString(getProperty() + ".displayText");
     45        if( org.tp23.antinstaller.Installer.langPack != null){
     46            return org.tp23.antinstaller.Installer.langPack.getString(getProperty() + ".displayText");
    5547        }
    5648        return displayText;
    5749    }
    5850    public String getExplanatoryText() {
    59         if(langPack != null){
     51        if( org.tp23.antinstaller.Installer.langPack != null ) {
    6052            try {
    61                 return langPack.getString(getProperty() + ".explanatoryText");
     53                return org.tp23.antinstaller.Installer.langPack.getString(getProperty() + ".explanatoryText");
    6254            } catch (MissingResourceException e) {
    6355                // ignore and return null explanatoryText is optional
Note: See TracChangeset for help on using the changeset viewer.