voxforge.org
VoxForge Dev

Changeset 2349

Show
Ignore:
Timestamp:
11/09/07 01:04:16 (1 year ago)
Author:
kmaclean
Message:

1st draft Dutch localization of SpeechSubmission applet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java

    r2348 r2349  
    6565import speechrecorder.License; 
    6666import speechrecorder.Prompts; 
     67import speechrecorder.LabelLocalizer; 
    6768import java.util.regex.Matcher; 
    6869import java.util.regex.Pattern; 
     
    262263// !!!!!! 
    263264    JTextField usernameTextField;   
    264  
    265     String usernamePanelLabel = "Username:"
     265    LabelLocalizer labels = new LabelLocalizer("Dutch"); 
     266    String usernamePanelLabel = labels.usernamePanelLabel
    266267    String userName; 
     268    String usernamePanelText = labels.usernamePanelText; 
    267269     
    268     String copyrightName = "Free Software Foundation"
    269     String gplAccepted = "Yes"
     270    String copyrightName = labels.copyrightName
     271    String gplAccepted = labels.gplAccepted
    270272     
    271     public static final String pleaseSelect = "Please Select"
    272     public static final String notApplicable = "unknown"
     273    String pleaseSelect = labels.pleaseSelect
     274    String notApplicable = labels.notApplicable
    273275     
    274     String genderPanelLabel = "Gender:"
     276    String genderPanelLabel = labels.genderPanelLabel
    275277    JComboBox genderChooser;        
    276     public static final String male = "Male";     
    277     public static final String female = "Female"; 
     278    String male = labels.male;     
     279    String female = labels.female; 
     280    String[] genderSelection = {pleaseSelect,male, female}; 
    278281    String gender = notApplicable; 
    279282     
    280     String ageRangePanelLabel = "Age Range:"
     283    String ageRangePanelLabel = labels.ageRangePanelLabel
    281284    JComboBox ageRangeChooser;  
    282     public static final String youth = "Youth";   
    283     public static final String adult = "Adult";  
    284     public static final String senior = "Senior";  
     285    String youth = labels.youth;   
     286    String adult = labels.adult;  
     287    String senior = labels.senior;  
     288    String[] ageSelection = {pleaseSelect ,youth, adult, senior }; 
    285289    String ageRange = notApplicable; 
    286290 
    287291    String dialectPanelLabel = "Pronunciation Dialect:"; 
    288292    JComboBox dialectChooser;      
    289     public static final String australian = "Australian English";     
    290     public static final String american = "American English";   
    291     public static final String british = "British English";  
    292     public static final String canadian = "Canadian English";       
    293     public static final String european = "European English";  
    294     public static final String newzealand = "New Zealand English";  
    295     public static final String southafrican = "South African English";      
    296     public static final String otherDialect = "Other"; 
     293    String dialect1 = labels.dialect1;     
     294    String dialect2 =labels.dialect2;   
     295    String dialect3 = labels.dialect3;  
     296    String dialect4 = labels.dialect4;       
     297    String dialect5 = labels.dialect5;  
     298    String dialect6 = labels.dialect6;  
     299    String dialect7 = labels.dialect7;      
     300    String dialect8 = labels.dialect8;     
     301    String dialect9 = labels.dialect9;     
     302    String dialect10 = labels.dialect10;     
     303    String otherDialect = labels.otherDialect; 
     304    String[] dialectSelection = {pleaseSelect,dialect1, dialect2, dialect3, dialect4, dialect5, dialect6, dialect7, otherDialect}; 
    297305    String dialect = notApplicable; 
    298306     
    299307    String microphonePanelLabel = "Microphone Type:"; 
    300308    JComboBox microphoneChooser;      
    301     public static final String headset = "Headset mic";     
    302     public static final String desktopBoom = "Desktop Boom mic";   
    303     public static final String laptopBuiltin = "Laptop Built-in mic";  
    304     public static final String webcam = "WebCam mic";       
    305     public static final String studio = "Studio mic";  
    306     public static final String otherMic = "Other";  
     309    String headset = labels.headset;     
     310    String USBheadset = labels.USBheadset;    
     311    String desktopBoom = labels.desktopBoom;   
     312    String USBdesktopBoom = labels.USBdesktopBoom;   
     313    String laptopBuiltin = labels.laptopBuiltin;  
     314    String webcam = labels.webcam;       
     315    String studio = labels.studio;  
     316    String otherMic = labels.otherMic;  
     317    String[] microphonetSelection = {pleaseSelect,headset,USBheadset, desktopBoom, USBdesktopBoom, laptopBuiltin, webcam, studio, otherMic}; 
    307318    String microphone = notApplicable;   
    308319     
    309     String uploadText = "<html>By clicking the \"Upload\" button, you agree to assign the Copyright to your recorded speech to <br> " 
    310         + "the Free Software Foundation, and to license your submission under the GNU Public Licence (\"GPL\"):" ; 
    311     String uploadButtonLabel = "Upload"; 
     320    String uploadText = labels.uploadText; 
     321    String uploadButtonLabel = labels.uploadButtonLabel; 
    312322     
    313     String moreInfoText = "For more information on Copyright and GPL, click here:"; 
    314     String moreInfoButtonLabel = "More Information";     
    315  
    316     String disclaimerText =  
    317          "<html>VoxForge SpeechSubmission Applet - Copyright (C) 2007 VoxForge<br>" 
    318          +"This program comes with ABSOLUTELY NO WARRANTY; without even the implied<br> " 
    319          +"warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  For<br>"  
    320          +"more details click the \"About\" button:"; 
    321     String aboutButtonLabel = "About"; 
     323    String moreInfoText = labels.moreInfoText; 
     324    String moreInfoButtonLabel = labels.moreInfoButtonLabel;     
     325 
     326    String disclaimerText = labels.disclaimerText; 
     327    String aboutButtonLabel = labels.aboutButtonLabel; 
    322328     
    323     public static final String recordButton = "Record";  
    324     public static final String stopButton = "Stop";  
    325     public static final String playButton = "Play";  
     329    String recordButton = labels.recordButton;  
     330    String stopButton = labels.stopButton;  
     331    String playButton = labels.playButton;  
    326332// !!!!!!       
    327333     
     
    501507         usernamePanel.add(new JLabel(usernamePanelLabel)); 
    502508         usernamePanel.add(usernameTextField = new JTextField(20)); 
    503           
    504          String usernamePanelText = "(leave blank to submit anonymously)"; 
    505509         usernamePanel.add(new JLabel(usernamePanelText));      
    506510          
     
    509513        JPanel genderPanel = new JPanel(); 
    510514        genderPanel.setLayout(new FlowLayout(FlowLayout.CENTER));   
    511  
    512515        genderPanel.add(new JLabel(genderPanelLabel)); 
    513         String[] genderSelection = {pleaseSelect,male, female}; 
    514516        genderPanel.add(genderChooser = new JComboBox(genderSelection)); 
    515517        genderChooser.setSelectedIndex(0);        
     
    534536        ageRangePanel.setLayout(new FlowLayout(FlowLayout.CENTER));   
    535537        ageRangePanel.add(new JLabel(ageRangePanelLabel)); 
    536         String[] ageSelection = {pleaseSelect, youth, adult, senior}; 
    537538        ageRangePanel.add(ageRangeChooser = new JComboBox(ageSelection)); 
    538539        ageRangeChooser.setSelectedIndex(0);           
     
    558559        dialectPanel.setLayout(new FlowLayout(FlowLayout.CENTER)); 
    559560        dialectPanel.add(new JLabel(dialectPanelLabel)); 
    560         String[] dialectSelection = {pleaseSelect,australian, american, british, canadian, european, newzealand, southafrican, otherDialect}; 
    561561        dialectPanel.add(dialectChooser = new JComboBox(dialectSelection)); 
    562562        dialectChooser.setSelectedIndex(0);   
     
    564564                 public void actionPerformed(ActionEvent e){ 
    565565                     String choice = (String)dialectChooser.getSelectedItem(); 
    566                      if(choice.equals(australian)){ 
    567                          dialect = (australian); 
    568                      }else if (choice.equals(american)){ 
    569                          dialect = (american); 
    570                      }else if(choice.equals(british)){ 
    571                          dialect = (british); 
    572                      }else if(choice.equals(canadian)){ 
    573                          dialect = (canadian); 
    574                      }else if(choice.equals(european)){ 
    575                          dialect = (european); 
    576                      }else if(choice.equals(newzealand)){ 
    577                          dialect = (newzealand); 
    578                      }else if(choice.equals(southafrican)){ 
    579                          dialect = (southafrican); 
     566                     if(choice.equals(dialect1)){ 
     567                         dialect = (dialect1); 
     568                     }else if (choice.equals(dialect2)){ 
     569                         dialect = (dialect2); 
     570                     }else if(choice.equals(dialect3)){ 
     571                         dialect = (dialect3); 
     572                     }else if(choice.equals(dialect4)){ 
     573                         dialect = (dialect4); 
     574                     }else if(choice.equals(dialect5)){ 
     575                         dialect = (dialect5); 
     576                     }else if(choice.equals(dialect6)){ 
     577                         dialect = (dialect6); 
     578                     }else if(choice.equals(dialect7)){ 
     579                         dialect = (dialect7); 
     580                     }else if(choice.equals(dialect8)){ 
     581                         dialect = (dialect8); 
     582                     }else if(choice.equals(dialect9)){ 
     583                         dialect = (dialect9); 
     584                     }else if(choice.equals(dialect10)){ 
     585                         dialect = (dialect10); 
    580586                     }else if(choice.equals(otherDialect)){ 
    581587                         dialect = (otherDialect); 
     
    593599        microphonePanel.setLayout(new FlowLayout(FlowLayout.CENTER)); 
    594600        microphonePanel.add(new JLabel(microphonePanelLabel)); 
    595         String[] microphonetSelection = {pleaseSelect,headset, desktopBoom, laptopBuiltin, webcam, studio, otherMic}; 
    596601        microphonePanel.add(microphoneChooser = new JComboBox(microphonetSelection)); 
    597602        microphoneChooser.setSelectedIndex(0);   
     
    602607                     if(choice.equals(headset)){ 
    603608                         microphone = (headset); 
     609                     }else if (choice.equals(USBheadset)){ 
     610                         microphone = (USBheadset); 
    604611                     }else if (choice.equals(desktopBoom)){ 
    605612                         microphone = (desktopBoom); 
     613                     }else if (choice.equals(USBdesktopBoom)){ 
     614                         microphone = (USBdesktopBoom); 
    606615                     }else if(choice.equals(laptopBuiltin)){ 
    607616                         microphone = (laptopBuiltin);