summaryrefslogtreecommitdiff
path: root/gladeui/glade-project.c
diff options
context:
space:
mode:
authorCorentin Noël <corentin@elementary.io>2019-06-27 10:26:52 +0000
committerAlberto Fanjul <albertofanjul@gmail.com>2019-06-27 10:26:52 +0000
commit453fc9dd34947957e1bc8d0ef58034d7f4ebd96b (patch)
tree9c24b0f8082aa0589ba053757997f9ea0af9ed7c /gladeui/glade-project.c
parentb5e5da2d5ba00bff3e07010e2358415abe9f2c37 (diff)
downloadglade-453fc9dd34947957e1bc8d0ef58034d7f4ebd96b.tar.gz
Fix split sentense in GladeProject
Diffstat (limited to 'gladeui/glade-project.c')
-rw-r--r--gladeui/glade-project.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index a45905ec..1492c383 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -1959,7 +1959,7 @@ glade_project_check_target_version (GladeProject *project)
gint unknown_objects;
gint major, minor;
GtkWidget *dialog;
- GString *text;
+ GString *text = NULL;
GList *l;
gchar *project_name;
@@ -1986,30 +1986,27 @@ glade_project_check_target_version (GladeProject *project)
if (unknown_objects)
{
GList *classes = g_hash_table_get_keys (unknown_classes);
-
- if (unknown_objects == 1)
- {
- text = g_string_new (_("Specially because there is an object that can not be build with type "));
- }
- else
- {
- text = g_string_new ("");
- g_string_printf (text, _("Specially because there are %d objects that can not be build with types "),
- unknown_objects);
- }
+ GString *missing_types = g_string_new (NULL);
+ text = g_string_new (NULL);
for (l = classes; l; l = g_list_next (l))
{
- if (g_list_previous (l))
- g_string_append (text, (g_list_next (l)) ? ", " : _(" and "));
-
- g_string_append (text, l->data);
+ if (g_list_previous (l)) {
+ g_string_append_printf (missing_types, _(", %s"), (const gchar *)l->data);
+ } else
+ g_string_append (missing_types, l->data);
}
g_list_free (classes);
+
+ g_string_printf (text,
+ ngettext ("Especially because there is %d object that can not be built with type: %s",
+ "Especially because there are %d objects that can not be built with types: %s", unknown_objects),
+ unknown_objects,
+ missing_types->str);
+
+ g_string_free (missing_types, TRUE);
}
- else
- text = NULL;
project_name = glade_project_get_name (project);
dialog = gtk_message_dialog_new (GTK_WINDOW (glade_app_get_window ()),