Turns out YPP does need getLocalePrefix(). :)

This commit is contained in:
Michael Bayne
2025-01-29 14:49:58 -08:00
parent 9647cfb968
commit 8711ee09d2
@@ -257,14 +257,22 @@ public class ResourceManager
*/ */
public void setLocalePrefix (final String prefix) public void setLocalePrefix (final String prefix)
{ {
_localePrefix = prefix;
setLocaleHandler( setLocaleHandler(
new LocaleHandler() { new LocaleHandler() {
public String getPrefix() {
return prefix;
}
public String getLocalePath (String path) { public String getLocalePath (String path) {
return PathUtil.appendPath(prefix, path); return PathUtil.appendPath(prefix, path);
} }
}); });
} }
public String getLocalePrefix () {
return _localePrefix;
}
/** /**
* Configure a custom LocaleHandler. * Configure a custom LocaleHandler.
*/ */
@@ -1097,6 +1105,9 @@ public class ResourceManager
/** Converts a path to a locale-specific path. */ /** Converts a path to a locale-specific path. */
protected LocaleHandler _localeHandler; protected LocaleHandler _localeHandler;
/** Set when we have a simple prefix-based locale handler (needed for YPP). */
protected String _localePrefix;
/** Maps resource paths to observed file resources. */ /** Maps resource paths to observed file resources. */
protected HashMap<String, ObservedResource> _observed = Maps.newHashMap(); protected HashMap<String, ObservedResource> _observed = Maps.newHashMap();