Make MessageBundle.getResourceString public so MessageBundles can be composed instead of requiring inheritance to customize them, and open up the bundle creation process in MessageManager to subclass customization
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5901 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,13 +21,12 @@
|
||||
|
||||
package com.threerings.util;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Collection;
|
||||
import java.util.Enumeration;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import com.samskivert.text.MessageUtil;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
@@ -236,11 +235,12 @@ public class MessageBundle
|
||||
/**
|
||||
* Get a String from the resource bundle, or null if there was an error.
|
||||
*/
|
||||
protected String getResourceString (String key)
|
||||
public String getResourceString (String key)
|
||||
{
|
||||
return getResourceString(key, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a String from the resource bundle, or null if there was an
|
||||
* error.
|
||||
@@ -249,7 +249,7 @@ public class MessageBundle
|
||||
* @param reportMissing whether or not the method should log an error
|
||||
* if the resource didn't exist.
|
||||
*/
|
||||
protected String getResourceString (String key, boolean reportMissing)
|
||||
public String getResourceString (String key, boolean reportMissing)
|
||||
{
|
||||
try {
|
||||
if (_bundle != null) {
|
||||
|
||||
Reference in New Issue
Block a user