Skip to content

Commit

Permalink
MONDRIAN: Fix MonRG links.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 206]
  • Loading branch information
julianhyde committed Oct 13, 2002
1 parent 749c699 commit 4ff6d62
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 19 deletions.
48 changes: 31 additions & 17 deletions doc/monrg.html
Expand Up @@ -17,6 +17,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>MonRG specification</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
<base target="_top">
</head>

<body>
Expand Down Expand Up @@ -102,15 +103,17 @@ <h3>Compile</h3>
<p><code>source/happy/BirthdayResource.java</code>:</p>
<blockquote>
<pre>package happy;

import java.io.IOException;
import java.util.Locale;
import <a href="api/mondrian/resource/package-summary.html">mondrian.resource.*</a>;
class BirthdayResource extends <a href="api/mondrian/resource/ShadowResourceBundle.html">ShadowResourceBundle</a> {
import <a href="http://mondrian.sourceforge.net/api/mondrian/resource/package-summary.html">mondrian.resource.*</a>;

class BirthdayResource extends <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ShadowResourceBundle.html">ShadowResourceBundle</a> {
public BirthdayResource() throws IOException {
}
private static String baseName = &quot;happy.BirthdayResource&quot;;
/**
* Retrieves the singleton instance of {@link MondrianResource}. If
* Retrieves the singleton instance of {@link BirthdayResource}. If
* the application has called {@link #setThreadLocale}, returns the
* resource for the thread's locale.
*/
Expand All @@ -120,19 +123,28 @@ <h3>Compile</h3>
/**
* Retrieves the instance of {@link BirthdayResource} for the given locale.
*/
public static synchronized MondrianResource instance(Locale locale) {
public static synchronized BirthdayResource instance(Locale locale) {
return (BirthdayResource) instance(baseName, locale);
}
/** e: Internal error: {0} */
public static final <a href="api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a> HappyBirthday = new <a href="api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a>(&quot;HappyBirthday&quot;, &quot;Happy Birthday, {0}! You don't look {1,number} at all.&quot;);
public String getInternal(String p0) {
return Internal.instantiate(this, new Object[] {p0}).toString();
/** HappyBirthay is 'Happy Birthday, {0}! You don't look {1,number} at all.' */
public static final <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a> HappyBirthday = new <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a>(&quot;HappyBirthday&quot;, &quot;Happy Birthday, {0}! You don't look {1,number} at all.&quot;);
public static String getHappyBirthday(String p0, Number p1) {
return HappyBirthday.instantiate(
getInstance(), new Object[] {p0, p1}).toString();
}
/** TooYoung is '{0} has not been born yet.' */
public static final <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a> TooYoung = new <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ResourceDefinition.html">ResourceDefinition</a>(&quot;TooYoung&quot;, &quot;{0} has not been born yet.&quot;);
public static String getTooYoung(String p0) {
return HappyBirthday.instantiate(
getInstance(), new Object[] {p0}).toString();
}
public <a href="api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a> newInternal(String p0) {
return new <a href="api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a>(Internal.instantiate(this, new Object[] {p0}), null);
public static <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a> newTooYoung(String p0) {
return new <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a>(TooYoung.instantiate(
getInstance(), new Object[] {p0}), null);
}
public <a href="api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a> newInternal(String p0, Throwable err) {
return new <a href="api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a>(Internal.instantiate(this, new Object[] {p0}), err);
public static <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a> newTooYoung(String p0, Throwable err) {
return new <a href="http://mondrian.sourceforge.net/api/mondrian/resource/ChainableRuntimeException.html">ChainableRuntimeException</a>(TooYoung.instantiate(
getInstance(), new Object[] {p0}), err);
}
}</pre>
</blockquote>
Expand All @@ -150,8 +162,10 @@ <h3>Compile</h3>
<pre>HappyBirthday=Happy Birthday, {0}! You don't look {1,number}.
TooYoung={0} has not been born yet.</pre>
</blockquote>
<p>There are 3 methods generated for each resource; one to retrieve a string,
and two to create an exception based upon that string.</p>
<p>For each resource, a <code>get</code><code><i>Xxx</i>()</code> method is
generated to retrieve that resource in the current locale, substituting
parameters appropriately. For exception resources, an additional two <code>new<i>Xxx</i>()</code>
methods are generated to create (but not throw) an exception.</p>
<p>Tokens such as <code>{0}</code> and <code>{1,number}</code> in the message
are automatically converted to method parameters of the right type. This means
that if you ever change the parameters in your error message, or accidentally
Expand Down Expand Up @@ -193,7 +207,7 @@ <h2>Of locales and threads</h2>
but this call will affect other applications running in the same Java Virtual
Machine, and is not allowed in some application server environments.</p>
<p>MonRG provides a method
<a href="api/mondrian/resource/ShadowResourceBundle.html#setThreadLocale(java.util.Locale)">
<a href="http://mondrian.sourceforge.net/api/mondrian/resource/ShadowResourceBundle.html#setThreadLocale(java.util.Locale)">
<code>ShadowResourceBundle.setThreadLocale(Locale)</code></a> to allow threads
to have different locales. Threads which are working in a different locale
should call this method at their entry point. For example:</p>
Expand Down Expand Up @@ -391,7 +405,7 @@ <h2>Resource file format</h2>
<h2>resgen ANT task</h2>

<p>The <code>&lt;resgen&gt;</code> task is defined
<a href="api/mondrian/resource/ResourceGenTask.html">here</a>.</p>
<a href="http://mondrian.sourceforge.net/api/mondrian/resource/ResourceGenTask.html">here</a>.</p>

<h2>Conclusion</h2>
<p>MonRG helps you build and maintain an internationalized application. Code
Expand Down Expand Up @@ -426,4 +440,4 @@ <h2>About MonRG and Mondrian</h2>
</table>

</body>
</html>
</html>
4 changes: 3 additions & 1 deletion doc/navigation.html
Expand Up @@ -41,6 +41,8 @@
<a href="links.html">Links</a><br>
&nbsp;&nbsp;&nbsp;<a href="people.html">People</a><br>
&nbsp;&nbsp;&nbsp;<a target="_top" href="http://sourceforge.net/projects/mondrian/">Project</a><br>
&nbsp;&nbsp;&nbsp;<a target="_top" href="http://sourceforge.net/projects/jpivot/">JPivot</a><br>
&nbsp;&nbsp;&nbsp;<a href="monrg.html">MonRG</a><br>
&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a></p>

</td>
Expand All @@ -51,4 +53,4 @@
</tr>
</table>

</body></html>
</body></html>
4 changes: 3 additions & 1 deletion doc/noframes.html
Expand Up @@ -54,6 +54,8 @@
<a href="links.html">Links</a><br>
&nbsp;&nbsp;&nbsp;<a href="people.html">People</a><br>
&nbsp;&nbsp;&nbsp;<a href="http://sourceforge.net/projects/mondrian/">Project</a><br>
&nbsp;&nbsp;&nbsp;<a target="_top" href="http://sourceforge.net/projects/jpivot/">JPivot</a><br>
&nbsp;&nbsp;&nbsp;<a href="monrg.html">MonRG</a><br>
&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a><br>
</td>
<!-- End links -->
Expand Down Expand Up @@ -96,4 +98,4 @@ <h2>What is Mondrian?</h2>
<td colspan="2">

</body>
</html>
</html>

0 comments on commit 4ff6d62

Please sign in to comment.