diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c index 82e4a7aea..7f4d8d063 100644 --- a/panels/user-accounts/um-account-dialog.c +++ b/panels/user-accounts/um-account-dialog.c @@ -301,21 +301,14 @@ local_validate (UmAccountDialog *self) const gchar *password; const gchar *verify; gchar *tip; - gchar *hint; gint strength; name = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (self->local_username)); valid_login = is_valid_username (name, &tip); entry = gtk_bin_get_child (GTK_BIN (self->local_username)); - if (tip) { - hint = g_strdup_printf ("%s.", tip); - g_free (tip); - } else { - hint = g_strdup (_("This will be used to name your home folder and can't be changed.")); - } - gtk_label_set_label (GTK_LABEL (self->local_username_hint), hint); - g_free (hint); + gtk_label_set_label (GTK_LABEL (self->local_username_hint), tip); + g_free (tip); if (valid_login) { set_entry_validation_checkmark (GTK_ENTRY (entry)); diff --git a/panels/user-accounts/um-utils.c b/panels/user-accounts/um-utils.c index 7076d5080..e114a5a9e 100644 --- a/panels/user-accounts/um-utils.c +++ b/panels/user-accounts/um-utils.c @@ -564,21 +564,21 @@ is_valid_username (const gchar *username, gchar **tip) if (!empty && (in_use || too_long || !valid)) { if (in_use) { - *tip = g_strdup_printf (_("A user with the username '%s' already exists"), + *tip = g_strdup_printf (_("A user with the username '%s' already exists."), username); } else if (too_long) { - *tip = g_strdup_printf (_("The username is too long")); + *tip = g_strdup_printf (_("The username is too long.")); } else if (username[0] == '-') { - *tip = g_strdup (_("The username cannot start with a '-'")); + *tip = g_strdup (_("The username cannot start with a '-'.")); } else { - *tip = g_strdup (_("The username should only consist of lower and upper case letters from a-z, digits and any of characters '.', '-' and '_'")); + *tip = g_strdup (_("The username should only consist of lower and upper case letters from a-z, digits and any of characters '.', '-' and '_'.")); } } else { - *tip = NULL; + *tip = g_strdup (_("This will be used to name your home folder and can't be changed.")); } return valid;