[gnome-control-center] user-accounts: don't append period at the end of sentence
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: don't append period at the end of sentence
- Date: Fri, 25 Apr 2014 11:09:57 +0000 (UTC)
commit a53905f030608b4bec5abd6fdfa45063ef41843b
Author: Ondrej Holy <oholy redhat com>
Date: Thu Apr 24 13:44:39 2014 +0200
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.
panels/user-accounts/um-account-dialog.c | 11 ++---------
panels/user-accounts/um-utils.c | 10 +++++-----
2 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
index 82e4a7a..7f4d8d0 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 7076d50..e114a5a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]