Moving webhelp gentext strings into a context
authorDavid Cramer <david@thingbag.net>
Sun, 1 Apr 2012 15:50:56 +0000 (15:50 +0000)
committerDavid Cramer <david@thingbag.net>
Sun, 1 Apr 2012 15:50:56 +0000 (15:50 +0000)
gentext/locale/en.xml
xsl/webhelp/xsl/webhelp.xsl

index 6ebbe90c48f738da10a3c39a9f22529d3fcece8f..9f0552219f9fe5fcc1f60eae9301bc0d63c4ec11 100644 (file)
 <gentext key="hyphenation-remain-character-count" text="2"/>
 
 <!-- WebHelp -->
-<gentext key="Search" text="Search"/>
-<gentext key="Enter_a_term_and_click" text="Enter a term and click "/>
-<gentext key="Go" text="Go"/>
-<gentext key="to_perform_a_search" text=" to perform a search."/>
-<gentext key="txt_filesfound" text="Results"/>
-<gentext key="txt_enter_at_least_1_char" text="You must enter at least one character."/>
-<gentext key="txt_browser_not_supported"
-        text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
-<gentext key="txt_please_wait" text="Please wait. Search in progress..."/>
-<gentext key="txt_results_for" text="Results for: "/>
-<gentext key="TableofContents" text="Contents"/>
-<gentext key="HighlightButton" text="Toggle search result highlighting"/>
-<gentext key="Your_search_returned_no_results" text="Your search returned no results."/>  
+<context name="webhelp">
+  <template name="Search" text="Search"/>
+  <template name="Enter_a_term_and_click" text="Enter a term and click "/>
+  <template name="Go" text="Go"/>
+  <template name="to_perform_a_search" text=" to perform a search."/>
+  <template name="txt_filesfound" text="Results"/>
+  <template name="txt_enter_at_least_1_char" text="You must enter at least one character."/>
+  <template name="txt_browser_not_supported" text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
+  <template name="txt_please_wait" text="Please wait. Search in progress..."/>
+  <template name="txt_results_for" text="Results for: "/>
+  <template name="TableofContents" text="Contents"/>
+  <template name="HighlightButton" text="Toggle search result highlighting"/>
+  <template name="Your_search_returned_no_results" text="Your search returned no results."/>
+</context>
 
 <context name="styles">
 
index ed964eb140a7639244b7491e4f2a1b405d3eb3cd..3cad2045c3700ac80b17421e1872d8ba9ed61c51 100644 (file)
@@ -134,20 +134,25 @@ These problems go away when you add this IE=7 mode meta tag.
             var language = "<xsl:value-of select="$webhelp.indexer.language"/>";
             var w = new Object();
             //Localization
-            txt_filesfound = '<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'txt_filesfound'"/>
+            txt_filesfound = '<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'txt_filesfound'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>';
-            txt_enter_at_least_1_char = "<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'txt_enter_at_least_1_char'"/>
+            txt_enter_at_least_1_char = "<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'txt_enter_at_least_1_char'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>";
-            txt_browser_not_supported = "<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'txt_browser_not_supported'"/>
+            txt_browser_not_supported = "<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'txt_browser_not_supported'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>";
-            txt_please_wait = "<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'txt_please_wait'"/>
+            txt_please_wait = "<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'txt_please_wait'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>";
-            txt_results_for = "<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'txt_results_for'"/>
+            txt_results_for = "<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'txt_results_for'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>";
         </script>
 
@@ -674,8 +679,9 @@ border: none; background: none; font-weight: none; color: none; }
                                 <li>
                                     <a href="#treeDiv" style="outline:0;" tabindex="1">
                                         <span class="contentsTab">
-                                            <xsl:call-template name="gentext">
-                                                <xsl:with-param name="key" select="'TableofContents'"/>
+                                            <xsl:call-template name="gentext.template">
+                                                <xsl:with-param name="name" select="'TableofContents'"/>
+                                               <xsl:with-param name="context" select="'webhelp'"/>
                                             </xsl:call-template>
                                         </span>
                                     </a>
@@ -684,8 +690,9 @@ border: none; background: none; font-weight: none; color: none; }
                                     <li>
                                         <a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()">
                                             <span class="searchTab">
-                                                <xsl:call-template name="gentext">
-                                                    <xsl:with-param name="key" select="'Search'"/>
+                                                <xsl:call-template name="gentext.template">
+                                                    <xsl:with-param name="name" select="'Search'"/>
+                                                   <xsl:with-param name="context" select="'webhelp'"/>
                                                 </xsl:call-template>
                                             </span>
                                         </a>
@@ -713,8 +720,9 @@ border: none; background: none; font-weight: none; color: none; }
                                               class="searchForm">
                                             <fieldset class="searchFieldSet">
                                                 <legend>
-                                                    <xsl:call-template name="gentext">
-                                                        <xsl:with-param name="key" select="'Search'"/>
+                                                    <xsl:call-template name="gentext.template">
+                                                        <xsl:with-param name="name" select="'Search'"/>
+                                                       <xsl:with-param name="context" select="'webhelp'"/>
                                                     </xsl:call-template>
                                                 </legend>
                                                 <center>
@@ -880,8 +888,9 @@ border: none; background: none; font-weight: none; color: none; }
             <xsl:with-param name="content">
              //Resource strings for localization
              var localeresource = new Object;
-             localeresource["search_no_results"]="<xsl:call-template name="gentext">
-                <xsl:with-param name="key" select="'Your_search_returned_no_results'"/>
+             localeresource["search_no_results"]="<xsl:call-template name="gentext.template">
+                <xsl:with-param name="name" select="'Your_search_returned_no_results'"/>
+               <xsl:with-param name="context" select="'webhelp'"/>
                 </xsl:call-template>";
             </xsl:with-param>
         </xsl:call-template>