user-accounts: don't append period at the end of sentence

The period is appended at the end of sentences after there are
translated. However some languages might not use periods at the
end of sentences. This patch changes the texts directly.
This commit is contained in:
Ondrej Holy 2014-04-24 13:44:39 +02:00
parent 6908c0da34
commit a53905f030
2 changed files with 7 additions and 14 deletions

View file

@ -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));

View file

@ -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;