Changeset 29011 for main/trunk/gli
- Timestamp:
- 2014-04-30T18:43:09+12:00 (10 years ago)
- Location:
- main/trunk/gli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/classes/dictionary.properties
r29009 r29011 941 941 # 942 942 #***** FormatConversionDialog ***** 943 FormatConversionDialog.Title:Convert Greenstone 2 format statements to Greenstone3943 FormatConversionDialog.Title:Convert Greenstone2 format statements to Greenstone3 944 944 FormatConversionDialog.Reconvert:Reconvert 945 FormatConversionDialog.Reconvert_Tooltip:Converts the text that is currently in the Greenstone2 format text area into a Greenstone3 format statement. 945 946 FormatConversionDialog.XHTML_Tidy:XHTML Tidy 946 947 FormatConversionDialog.XHTML_Tidy_Tooltip:Will run HTML Tidy over the Greenstone3 format statement to try to fix up obvious XHTML errors. 947 948 FormatConversionDialog.Next:Next 949 FormatConversionDialog.Next_Tooltip:Inspect the next Greenstone3 format statement that has been automatically converted from a Greenstone2 format statement. 948 950 FormatConversionDialog.Accept_All:Accept All 949 FormatConversionDialog.GS2_Text_Tooltip:Greenstone2 format statement 951 FormatConversionDialog.Accept_All_Tooltip:Closes this dialog, accepting the default Greenstone3 format statements that have been automatically produced for the current and any subsequent Greenstone2 format statements. 952 FormatConversionDialog.Cancel_Tooltip:Cancels out of opening the collection and closes this dialog, discarding any changes made in the dialog. 953 FormatConversionDialog.GS2_Text_Tooltip:Greenstone2 format statement. 950 954 FormatConversionDialog.GS3_Text_Tooltip:Greenstone3 format statement, must be XML to be active in Greenstone. 951 955 FormatConversionDialog.Tidy_Failed:Tidy failed. 952 956 FormatConversionDialog.Tidy_Done:Tidy done. 953 957 FormatConversionDialog.XML_Still_Invalid:XML is still invalid. 954 FormatConversionDialog.Error_GS3_Format:Error in G S3 format statement.958 FormatConversionDialog.Error_GS3_Format:Error in Greenstone3 format statement. 955 959 FormatConversionDialog.Invalid_XML:Invalid XML. 956 960 FormatConversionDialog.Invalid_XML_Warning_Title:Cancel or Continue? 957 961 FormatConversionDialog.Cancel_Or_Continue_Next:Either press Cancel to go back and re-edit the XML.\nOr press OK to store the current XML as-is, albeit inactive, and continue on to the next statement.\nYou can later use the Format tab to revisit this format statement if you want to update its syntax. 958 FormatConversionDialog.Cancel_Or_Accept_All:One or more G S3 format statements contains invalid XML.\nEither press Cancel to correct the XML.\nOr press OK to store the GS3 format statements as-is, albeit inactive.\nYou can later use the Format tab to revisit the format statements if you want to update their syntax.962 FormatConversionDialog.Cancel_Or_Accept_All:One or more Greenstone3 format statements contains invalid XML.\nEither press Cancel to correct the XML.\nOr press OK to store the Greenstone3 format statements as-is, albeit inactive.\nYou can later use the Format tab to revisit the format statements if you want to update their syntax. 959 963 960 964 #********************** -
main/trunk/gli/src/org/greenstone/gatherer/gui/FormatConversionDialog.java
r29009 r29011 42 42 // Help tooltips on buttons 43 43 // + Undo, Redo buttons 44 // Split class into dialog/widgets and data processing 44 // X Split class into dialog/widgets and data processing? 45 // http://www.java2s.com/Tutorial/Java/0240__Swing/SettingJOptionPanebuttonlabelstoFrench.htm 45 46 46 47 public class FormatConversionDialog extends ModalDialog … … 97 98 setSize(SIZE); 98 99 setTitle(Dictionary.get(Dictionary.get("FormatConversionDialog.Title"))); 100 this.addWindowListener(new WindowClosingListener()); // the dialog's top right close button should behave as a Cancel press 99 101 setDefaultCloseOperation(DISPOSE_ON_CLOSE); 100 102 … … 103 105 midbutton_panel.setComponentOrientation(Dictionary.getOrientation()); 104 106 JButton reconvert_button = new JButton(Dictionary.get("FormatConversionDialog.Reconvert")); 107 reconvert_button.setToolTipText(Dictionary.get("FormatConversionDialog.Reconvert_Tooltip")); 105 108 midbutton_panel.add(reconvert_button); 106 109 reconvert_button.addActionListener(new ReconvertListener()); … … 135 138 next_button = new JButton(Dictionary.get("FormatConversionDialog.Next")); 136 139 accept_all_button = new JButton(Dictionary.get("FormatConversionDialog.Accept_All")); 140 accept_all_button.setToolTipText(Dictionary.get("FormatConversionDialog.Accept_All_Tooltip")); 137 141 cancel_button.addActionListener(new CancelButtonListener()); 142 cancel_button.setToolTipText(Dictionary.get("FormatConversionDialog.Cancel_Tooltip")); 138 143 next_button.addActionListener(new NextButtonListener()); 144 next_button.setToolTipText(Dictionary.get("FormatConversionDialog.Next_Tooltip")); 139 145 accept_all_button.addActionListener(new AcceptAllButtonListener()); 140 146 button_panel.add(cancel_button); … … 158 164 initTextArea(gs3_textarea); 159 165 gs2_textarea.setToolTipText(Dictionary.get("FormatConversionDialog.GS2_Text_Tooltip")); 160 gs3_textarea.setToolTipText(Dictionary.get("FormatConversionDialog.GS 2_Text_Tooltip"));166 gs3_textarea.setToolTipText(Dictionary.get("FormatConversionDialog.GS3_Text_Tooltip")); 161 167 162 168 … … 230 236 231 237 if(Gatherer.GS3 && collect_cfg_file.getAbsolutePath().endsWith(".xml")) { 238 232 239 //System.err.println("*** Opening an xml config file"); 233 240 … … 259 266 } 260 267 System.err.println("*** Found GS2 format statements in config file to be converted to GS3."); 268 269 270 // if remote GS3, do we open the collection with the html-encoded GS2 format statements 271 // or do we not allow the remote user to open such a collection at all? 272 // For now we allow them to open it, but print a warning that conversions are not possible. 273 274 if(Gatherer.isGsdlRemote) { // remote GS3 275 System.err.println("*** Cannot convert GS2 collections from a remote GS3 server."); 276 return OpenCollectionDialog.OK_OPTION; 277 } 261 278 262 279 // If we get here, it means there were no CDataSections in the first (any) <gsf:gs2-format/> … … 788 805 } 789 806 807 // windowClosing() is called when the user presses the top-right close button the dialog 808 // this means the user wanted to cancel out of the entire Format Conversion Wizard. 809 private class WindowClosingListener extends WindowAdapter { 810 public void windowClosing(WindowEvent e) { 811 dlgResult = OpenCollectionDialog.CANCEL_OPTION; 812 } 813 } 814 790 815 private class ReconvertListener implements ActionListener { 791 816 public void actionPerformed(ActionEvent e) {
Note:
See TracChangeset
for help on using the changeset viewer.