ICU-4582 getFunctionalEquivalent
X-SVN-Rev: 17929
This commit is contained in:
parent
f91e3e87f0
commit
d4520449d1
@ -768,6 +768,14 @@ public final class ICUResourceBundleTest extends TestFmwk {
|
||||
"t", "hi@collation=direct", "hi@collation=direct",
|
||||
"f", "hi_AU@collation=direct;currency=CHF;calendar=buddhist", "hi@collation=direct",
|
||||
"f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "hi",
|
||||
"t", "de_DE@collation=pinyin", "de", /* bug 4582 tests */
|
||||
"f", "de_DE_BONN@collation=pinyin", "de",
|
||||
"t", "nl", "root",
|
||||
"t", "nl_NL", "root",
|
||||
"f", "nl_NL_EEXT", "root",
|
||||
"t", "nl@collation=stroke", "root",
|
||||
"t", "nl_NL@collation=stroke", "root",
|
||||
"f", "nl_NL_EEXT@collation=stroke", "root",
|
||||
};
|
||||
|
||||
String F_STR = "f";
|
||||
|
@ -516,9 +516,16 @@ public abstract class ICUResourceBundle extends UResourceBundle {
|
||||
do {
|
||||
try {
|
||||
ICUResourceBundle irb = r.get(resName);
|
||||
/* UResourceBundle urb = */irb.get(kwVal);
|
||||
UResourceBundle urb = irb.get(kwVal);
|
||||
|
||||
// if we didn't fail before this..
|
||||
fullBase = r.getULocale();
|
||||
|
||||
// If the fetched item (urb) is in a different locale than our outer locale (r/fullBase)
|
||||
// then we are in a 'fallback' situation. treat as a missing resource situation.
|
||||
if(!fullBase.toString().equals(urb.getLocale().toString())) {
|
||||
fullBase = null; // fallback condition. Loop and try again.
|
||||
}
|
||||
|
||||
// If we fell back to an ancestor of the old 'default',
|
||||
// we need to re calculate the "default" keyword.
|
||||
|
Loading…
Reference in New Issue
Block a user