mhonarc-commits
[Top] [All Lists]

CVS: mhonarc/MHonArc/doc/resources lang.html,NONE,1.1 labelstyles.html,1.11...

2003-08-01 23:17:01
Update of /cvsroot/mhonarc/mhonarc/MHonArc/doc/resources
In directory subversions:/tmp/cvs-serv31537/doc/resources

Modified Files:
	labelstyles.html lastpglink.html rcfile.html 
Added Files:
	lang.html 
Log Message:
* Added LANG resource to define locale.  Affects resource filename
  resolution and message subject and author sorting.


***** Error reading new file: [Errno 2] No such file or directory: 'lang.html'
Index: labelstyles.html
===================================================================
RCS file: /cvsroot/mhonarc/mhonarc/MHonArc/doc/resources/labelstyles.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** labelstyles.html	10 Dec 2002 04:08:02 -0000	1.11
--- labelstyles.html	2 Aug 2003 06:15:37 -0000	1.12
***************
*** 7,11 ****
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelend.html">LABELEND</a>]</td><td><nobr>[<a href="../resources.html#labelstyles">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="lastpglink.html">LASTPGLINK</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
--- 7,11 ----
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelend.html">LABELEND</a>]</td><td><nobr>[<a href="../resources.html#labelstyles">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="lang.html">LANG</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
***************
*** 135,139 ****
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelend.html">LABELEND</a>]</td><td><nobr>[<a href="../resources.html#labelstyles">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="lastpglink.html">LASTPGLINK</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
--- 135,139 ----
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelend.html">LABELEND</a>]</td><td><nobr>[<a href="../resources.html#labelstyles">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="lang.html">LANG</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>

Index: lastpglink.html
===================================================================
RCS file: /cvsroot/mhonarc/mhonarc/MHonArc/doc/resources/lastpglink.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** lastpglink.html	9 Jan 2003 23:42:25 -0000	1.10
--- lastpglink.html	2 Aug 2003 06:15:37 -0000	1.11
***************
*** 7,11 ****
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelstyles.html">LABELSTYLES</a>]</td><td><nobr>[<a href="../resources.html#lastpglink">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="listbegin.html">LISTBEGIN</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
--- 7,11 ----
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="lang.html">LANG</a>]</td><td><nobr>[<a href="../resources.html#lastpglink">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="listbegin.html">LISTBEGIN</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
***************
*** 202,206 ****
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="labelstyles.html">LABELSTYLES</a>]</td><td><nobr>[<a href="../resources.html#lastpglink">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="listbegin.html">LISTBEGIN</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>
--- 202,206 ----
  <!--x-rc-nav-->
  <table border=0><tr valign="top">
! <td align="left" width="50%">[Prev:&nbsp;<a href="lang.html">LANG</a>]</td><td><nobr>[<a href="../resources.html#lastpglink">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="listbegin.html">LISTBEGIN</a>]</td></tr></table>
  <!--/x-rc-nav-->
  <hr>

Index: rcfile.html
===================================================================
RCS file: /cvsroot/mhonarc/mhonarc/MHonArc/doc/resources/rcfile.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** rcfile.html	2 Jan 2003 23:04:56 -0000	1.13
--- rcfile.html	2 Aug 2003 06:15:37 -0000	1.14
***************
*** 18,21 ****
--- 18,22 ----
  <li><small><a href="#">Resource file syntax</a></small>
  <li><small><a href="#">Resource variables</a></small>
+ <li><small><a href="#locale">Localized resource file variations</a></small>
  </ul>
  <li><a href="#default">Default Setting</a>
***************
*** 62,65 ****
--- 63,71 ----
  </p>
  
+ <p>The <tt>-rcfile</tt> command-line option can be specified multiple
+ times.  Each resource file specified will be loaded in the order
+ specified on the command-line.
+ </p>
+ 
  <h3>Resource file syntax</h3>
  
***************
*** 143,146 ****
--- 149,258 ----
  </p>
  
+ <h3><a name="locale">Localized resource file variations</a></h3>
+ 
+ <p>MHonArc supports the ability to define locale specific variations
+ of a resource file based upon the <a href="lang.html">LANG</a> resource
+ setting.  For example, take the following command-line invocation:
+ </p>
+ <table border="1" width="100%"><tr><td><pre class="shell">
+ prompt&gt; <b>mhonarc -rcfile settings.mrc <a class="shell" href="lang.html">-lang</a> en_US</b> ...
+ </pre></td></tr></table>
+ <p>MHonArc will check for and read the following resource files, in order:
+ </p>
+ <ol>
+ <li><tt>settings.mrc</tt></li>
+ <li><tt>settings.mrc.en</tt></li>
+ <li><tt>settings.mrc.en_us</tt></li>
+ </ol>
+ <table class="note" width="100%">
+ <tr valign="baseline">
+ <td><strong>NOTE:</strong></td>
+ <td width="100%"><p>MHonArc will quietly ignore any locale-specific files
+ that do not exist.
+ </p>
+ </td>
+ </tr>
+ </table>
+ <p> </p>
+ <table class="note" width="100%">
+ <tr valign="baseline">
+ <td><strong>NOTE:</strong></td>
+ <td width="100%"><p>Setting <a href="lang.html">LANG</a> via a resource
+ file element will only affect subsequent resource file resolution: subsequent
+ resource files loaded via multiple
+ <tt>-rcfile</tt> options and resource
+ files loaded via the <a href="otherindexes.html">OTHERINDEXES</a>
+ resource.
+ </p>
+ </td>
+ </tr>
+ </table>
+ <p>Therefore, if you manage multiple archives comprising multiple languages,
+ you can define generic settings in a shared resource file and then define
+ language-specific overrides and/or variations.  Continuing with the
+ previous example, the following invocation can be used for a French Canadian
+ archive:
+ </p>
+ <table border="1" width="100%"><tr><td><pre class="shell">
+ prompt&gt; <b>mhonarc -rcfile settings.mrc <a class="shell" href="lang.html">-lang</a> fr_CA</b> ...
+ </pre></td></tr></table>
+ <p>Causing the following resource files to be examined:
+ </p>
+ <ol>
+ <li><tt>settings.mrc</tt></li>
+ <li><tt>settings.mrc.fr</tt></li>
+ <li><tt>settings.mrc.fr_ca</tt></li>
+ </ol>
+ 
+ <p>The following is the list of files examined given a resource
+ file <tt><var>file.mrc</var></tt> and the generic locale setting
+ <tt><var>language</var>_<var>country</var>.<var>codeset</var></tt>:
+ </p>
+ 
+ <ol>
+ <li><tt><var>file.mrc</var></tt></li>
+ <li><tt><var>file.mrc</var>.<var>language</var></tt></li>
+ <li><tt><var>file.mrc</var>.<var>language</var>.<var>codeset</var></tt></li>
+ <li><tt><var>file.mrc</var>.<var>language</var>_<var>country</var></tt></li>
+ <li><tt><var>file.mrc</var>.<var>language</var>_<var>country</var>.<var>codeset</var></tt></li>
+ </ol>
+ 
+ <p>By leveraging the use of custom <a href="definevar.html">resource
+ variables</a>, you can parameterize textual labels so the locale-specific
+ resource files only need to define variable values instead of redefining
+ layout.  For example, take the following default value of the
+ <a href="nextbutton.html">NEXTBUTTON</a> resource:
+ </p>
+ <pre class="code">
+ <b>&lt;NextButton chop&gt;</b>
+ [&lt;a href="$MSG(NEXT)$"&gt;Date Next&lt;/a&gt;]
+ <b>&lt;/NextButton&gt;</b>
+ </pre>
+ 
+ <p>To facilitate the the localization of your archives, the resource
+ should be changed so the button label becomes a custom resource variable
+ references:
+ </p>
+ <pre class="code">
+ <b>&lt;NextButton chop&gt;</b>
+ [&lt;a href="$MSG(NEXT)$"&gt;<b>$BUTTON-DATE-NEXT-LABEL$</b>&lt;/a&gt;]
+ <b>&lt;/NextButton&gt;</b>
+ </pre>
+ 
+ <p>You will notice that "<tt class="icode">Date Next</tt>" has been
+ changed to "<tt class="icode">$BUTTON-DATE-NEXT-LABEL$</tt>".  Therefore,
+ in the locale specific resource file, all that needs to be done is to
+ define <tt>$BUTTON-DATE-NEXT-LABEL$</tt>.  Continuing with the
+ <tt>settings.mrc</tt> filename, the following would be defined in
+ <tt>settings.mrc.en</tt> to set the English version of the label:
+ </p>
+ <pre class="code">
+ <b>&lt;<a href="definevar.html">DefineVar</a> chop&gt;</b>
+ $BUTTON-DATE-NEXT-LABEL$
+ Date Next
+ <b>&lt;/DefineVar&gt;</b>
+ </pre>
+ 
+ 
  <!-- *************************************************************** -->
  <hr>
***************
*** 321,324 ****
--- 433,437 ----
  
  <p>
+ <a href="lang.html">LANG</a>
  </p>
  

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV