Bug 1719553 - Use unified Intl API in OSPreferences_gtk.cpp; r=platform-i18n-reviewers,dminor

Differential Revision: https://phabricator.services.mozilla.com/D132038
This commit is contained in:
Greg Tatum 2021-11-29 20:43:07 +00:00
parent 5ce3648810
commit e61871c813

View File

@ -5,10 +5,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <locale.h>
#include "mozilla/intl/Locale.h"
#include "OSPreferences.h"
#include "unicode/uloc.h"
#include "nsServiceManagerUtils.h"
#include "nsIGSettingsService.h"
@ -19,7 +18,7 @@ OSPreferences::OSPreferences() = default;
bool OSPreferences::ReadSystemLocales(nsTArray<nsCString>& aLocaleList) {
MOZ_ASSERT(aLocaleList.IsEmpty());
nsAutoCString defaultLang(uloc_getDefault());
nsAutoCString defaultLang(Locale::GetDefaultLocale());
if (CanonicalizeLanguageTag(defaultLang)) {
aLocaleList.AppendElement(defaultLang);