Show
Ignore:
Timestamp:
11.04.2012 20:08:17 (9 years ago)
Author:
ak19
Message:

Array of strings to be initialised for Javascript now done by Java code instead of XSLT. Intermediate step completed where header.xsl calls the Java code. The call to Java will still need to be moved into util.xsl from header.xsl. header.xsl should use a gslib:langfrag and so invoke util.xsl, but that doesn't work yet at present.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl

    r25294 r25347  
    391391        </xsl:if> 
    392392    </xsl:template> 
    393      
     393 
     394    <!-- gslib:langfrag should get expanded in ../util.xsl --> 
    394395    <xsl:template name="document-editor-language-fragments"> 
    395         <script type="text/javascript"> 
    396             <xsl:text disable-output-escaping="yes"> 
    397                 gs.text = new Array(); 
    398                 gs.text.dse = new Array(); 
    399                 gs.text.dse.no_docs="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.no_docs')"/><xsl:text disable-output-escaping="yes">"; 
    400                 gs.text.dse.untitled="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.untitled')"/><xsl:text disable-output-escaping="yes">"; 
    401                 gs.text.dse.delete_section="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.delete_section')"/><xsl:text disable-output-escaping="yes">"; 
    402                 gs.text.dse.edit="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.edit')"/><xsl:text disable-output-escaping="yes">"; 
    403                 gs.text.dse.hide="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.hide')"/><xsl:text disable-output-escaping="yes">"; 
    404                 gs.text.dse.add_sub_section="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.add_sub_section')"/><xsl:text disable-output-escaping="yes">"; 
    405                 gs.text.dse.duplicate="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.duplicate')"/><xsl:text disable-output-escaping="yes">"; 
    406                 gs.text.dse.error_saving="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.error_saving')"/><xsl:text disable-output-escaping="yes">"; 
    407                 gs.text.dse.save_changes="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.save_changes')"/><xsl:text disable-output-escaping="yes">"; 
    408                 gs.text.dse.saving="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.saving')"/><xsl:text disable-output-escaping="yes">"; 
    409                 gs.text.dse.modifying_archives="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.modifying_archives')"/><xsl:text disable-output-escaping="yes">"; 
    410                 gs.text.dse.empty_collection_list="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.empty_collection_list')"/><xsl:text disable-output-escaping="yes">"; 
    411                 gs.text.dse.could_not_build_p1="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_build_p1')"/><xsl:text disable-output-escaping="yes">"; 
    412                 gs.text.dse.could_not_build_p2="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_build_p2')"/><xsl:text disable-output-escaping="yes">"; 
    413                 gs.text.dse.could_not_activate_p1="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_activate_p1')"/><xsl:text disable-output-escaping="yes">"; 
    414                 gs.text.dse.could_not_activate_p2="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_activate_p2')"/><xsl:text disable-output-escaping="yes">"; 
    415                 gs.text.dse.activating="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.activating')"/><xsl:text disable-output-escaping="yes">"; 
    416                 gs.text.dse.building="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.building')"/><xsl:text disable-output-escaping="yes">"; 
    417                 gs.text.dse.could_not_check_status_p1="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_check_status_p1')"/><xsl:text disable-output-escaping="yes">"; 
    418                 gs.text.dse.could_not_check_status_p2a="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_check_status_p2a')"/><xsl:text disable-output-escaping="yes">"; 
    419                 gs.text.dse.could_not_check_status_p2b="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.could_not_check_status_p2b')"/><xsl:text disable-output-escaping="yes">"; 
    420                 gs.text.dse.error_saving_changes="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.error_saving_changes')"/><xsl:text disable-output-escaping="yes">"; 
    421                 gs.text.dse.error_code="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.error_code')"/><xsl:text disable-output-escaping="yes">"; 
    422                 gs.text.dse.error_reason="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.error_reason')"/><xsl:text disable-output-escaping="yes">"; 
    423                 gs.text.dse.error_line="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.error_line')"/><xsl:text disable-output-escaping="yes">"; 
    424                 gs.text.dse.xml_error="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.xml_error')"/><xsl:text disable-output-escaping="yes">"; 
    425                 gs.text.dse.browse_cannot_validate_xml="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.browse_cannot_validate_xml')"/><xsl:text disable-output-escaping="yes">"; 
    426                 gs.text.dse.add_new_metadata="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.add_new_metadata')"/><xsl:text disable-output-escaping="yes">"; 
    427                 gs.text.dse.no_value_given="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.no_value_given')"/><xsl:text disable-output-escaping="yes">"; 
    428                 gs.text.dse.create_new_document="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.create_new_document')"/><xsl:text disable-output-escaping="yes">"; 
    429                 gs.text.dse.untitled_section="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.untitled_section')"/><xsl:text disable-output-escaping="yes">"; 
    430                 gs.text.dse.insert_new_section="</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.insert_new_section')"/><xsl:text disable-output-escaping="yes">"; 
    431             </xsl:text> 
    432         </script> 
     396      <!--<gslib:langfrag name="dse"/>--> 
     397 
     398      <script type="text/javascript"> 
     399      gs.text = new Array(); 
     400      gs.text.dse = new Array(); 
     401      <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, 'dse', 'gs.text')"/> 
     402      </script> 
    433403    </xsl:template> 
    434404