diff --git a/intl/locale/OSPreferences.cpp b/intl/locale/OSPreferences.cpp index 563a7e0c2090..05accb078ccb 100644 --- a/intl/locale/OSPreferences.cpp +++ b/intl/locale/OSPreferences.cpp @@ -385,7 +385,7 @@ bool OSPreferences::GetDateTimeConnectorPattern(const nsACString& aLocale, // Check for a valid override pref and use that if present. nsAutoCString value; nsresult nr = Preferences::GetCString( - "intl.date_time.pattern_override.date_time_short", value); + "intl.date_time.pattern_override.connector_short", value); if (NS_SUCCEEDED(nr) && value.Find("{0}") != kNotFound && value.Find("{1}") != kNotFound) { aRetVal = std::move(value); diff --git a/intl/locale/tests/gtest/TestOSPreferences.cpp b/intl/locale/tests/gtest/TestOSPreferences.cpp index 605b301c098f..45ca5fee32db 100644 --- a/intl/locale/tests/gtest/TestOSPreferences.cpp +++ b/intl/locale/tests/gtest/TestOSPreferences.cpp @@ -172,7 +172,7 @@ TEST(Intl_Locale_OSPreferences, GetDateTimePatternPrefOverrides) mozilla::Preferences::SetCString("intl.date_time.pattern_override.time_short", "HH:mm:ss"); mozilla::Preferences::SetCString( - "intl.date_time.pattern_override.date_time_short", "{1} {0}"); + "intl.date_time.pattern_override.connector_short", "{1} {0}"); nr = osprefs->GetDateTimePattern(mozIOSPreferences::dateTimeFormatStyleShort, mozIOSPreferences::dateTimeFormatStyleShort, nsDependentCString(""), pattern); @@ -185,7 +185,7 @@ TEST(Intl_Locale_OSPreferences, GetDateTimePatternPrefOverrides) // Invalid patterns are ignored mozilla::Preferences::SetCString( - "intl.date_time.pattern_override.date_time_short", "hello, world!"); + "intl.date_time.pattern_override.connector_short", "hello, world!"); nr = osprefs->GetDateTimePattern(mozIOSPreferences::dateTimeFormatStyleShort, mozIOSPreferences::dateTimeFormatStyleShort, nsDependentCString(""), pattern); @@ -194,7 +194,7 @@ TEST(Intl_Locale_OSPreferences, GetDateTimePatternPrefOverrides) // Clearing the override results in getting the default pattern back. mozilla::Preferences::ClearUser( - "intl.date_time.pattern_override.date_time_short"); + "intl.date_time.pattern_override.connector_short"); nr = osprefs->GetDateTimePattern(mozIOSPreferences::dateTimeFormatStyleShort, mozIOSPreferences::dateTimeFormatStyleShort, nsDependentCString(""), pattern);