Commit 4a91056b authored by Rui Matos's avatar Rui Matos
Browse files

region: If language isn't set in AccountsService, show current locale

For newly created user accounts, AccountsService won't have the
language property set. Instead of defaulting to en_US in that case,
let's fallback to the current locale.
parent ff5a17a3
......@@ -624,11 +624,12 @@ static void
update_language_from_user (CcRegionPanel *self)
CcRegionPanelPrivate *priv = self->priv;
const gchar *language;
const gchar *language = NULL;
if (act_user_is_loaded (priv->user))
language = act_user_get_language (priv->user);
if (language == NULL || *language == '\0')
language = setlocale (LC_MESSAGES, NULL);
g_free (priv->language);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment