Commit f5527875 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

capitalization and other string changes.

2005-10-06  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpprocbrowserdialog.c: capitalization and other string
	changes.

	* libgimpwidgets/gimpbrowser.c: string unification. Set the
	message label italic.

	* plug-ins/common/plugin-browser.c: use ngettext() for plural forms.
parent 3aa703e4
2005-10-06 Sven Neumann <sven@gimp.org>
* libgimp/gimpprocbrowserdialog.c: capitalization and other string
changes.
* libgimpwidgets/gimpbrowser.c: string unification. Set the
message label italic.
* plug-ins/common/plugin-browser.c: use ngettext() for plural forms.
2005-10-06 Sven Neumann <sven@gimp.org>
* app/dialogs/dialogs-constructors.c
......
......@@ -402,89 +402,86 @@ browser_search (GimpBrowser *browser,
gint num_procs;
gchar *str;
if (search_type == SEARCH_TYPE_NAME)
switch (search_type)
{
GString *query = g_string_new ("");
const gchar *q = query_text;
case SEARCH_TYPE_ALL:
gimp_browser_show_message (browser, _("Searching"));
gimp_browser_show_message (browser,
_("Searching by name - please wait"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
break;
while (*q)
{
if ((*q == '_') || (*q == '-'))
g_string_append (query, "-");
else
g_string_append_c (query, *q);
case SEARCH_TYPE_NAME:
{
GString *query = g_string_new ("");
const gchar *q = query_text;
q++;
}
gimp_browser_show_message (browser, _("Searching by name"));
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
while (*q)
{
if ((*q == '_') || (*q == '-'))
g_string_append (query, "-");
else
g_string_append_c (query, *q);
g_string_free (query, TRUE);
}
else if (search_type == SEARCH_TYPE_BLURB)
{
gimp_browser_show_message (browser,
_("Searching by description - please wait"));
q++;
}
gimp_procedural_db_query (query->str,
".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
g_string_free (query, TRUE);
}
break;
case SEARCH_TYPE_BLURB:
gimp_browser_show_message (browser, _("Searching by description"));
gimp_procedural_db_query (".*", query_text, ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
}
else if (search_type == SEARCH_TYPE_HELP)
{
gimp_browser_show_message (browser,
_("Searching by help - please wait"));
break;
case SEARCH_TYPE_HELP:
gimp_browser_show_message (browser, _("Searching by help"));
gimp_procedural_db_query (".*", ".*", query_text, ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
}
else if (search_type == SEARCH_TYPE_AUTHOR)
{
gimp_browser_show_message (browser,
_("Searching by author - please wait"));
break;
case SEARCH_TYPE_AUTHOR:
gimp_browser_show_message (browser, _("Searching by author"));
gimp_procedural_db_query (".*", ".*", ".*", query_text, ".*", ".*", ".*",
&num_procs, &proc_list);
}
else if (search_type == SEARCH_TYPE_COPYRIGHT)
{
gimp_browser_show_message (browser,
_("Searching by copyright - please wait"));
break;
case SEARCH_TYPE_COPYRIGHT:
gimp_browser_show_message (browser, _("Searching by copyright"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", query_text, ".*", ".*",
&num_procs, &proc_list);
}
else if (search_type == SEARCH_TYPE_DATE)
{
gimp_browser_show_message (browser,
_("Searching by date - please wait"));
break;
case SEARCH_TYPE_DATE:
gimp_browser_show_message (browser, _("Searching by date"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", query_text, ".*",
&num_procs, &proc_list);
}
else if (search_type == SEARCH_TYPE_PROC_TYPE)
{
gimp_browser_show_message (browser,
_("Searching by type - please wait"));
break;
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", query_text,
&num_procs, &proc_list);
}
else
{
gimp_browser_show_message (browser,
_("Searching - please wait"));
case SEARCH_TYPE_PROC_TYPE:
gimp_browser_show_message (browser, _("Searching by type"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", query_text,
&num_procs, &proc_list);
break;
}
if (! query_text || strlen (query_text) == 0)
{
str = g_strdup_printf (_("%d Procedures"), num_procs);
str = g_strdup_printf (_("%d procedures"), num_procs);
}
else
{
......
......@@ -142,7 +142,7 @@ gimp_browser_init (GimpBrowser *browser)
/* count label */
browser->count_label = gtk_label_new ("0 Matches");
browser->count_label = gtk_label_new (_("No matches"));
gtk_misc_set_alignment (GTK_MISC (browser->count_label), 0.0, 0.5);
gimp_label_set_attributes (GTK_LABEL (browser->count_label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
......@@ -316,7 +316,12 @@ gimp_browser_show_message (GimpBrowser *browser,
}
else
{
gimp_browser_set_widget (browser, gtk_label_new (message));
GtkWidget *label = gtk_label_new (message);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gimp_browser_set_widget (browser, label);
}
while (gtk_events_pending ())
......
......@@ -378,7 +378,7 @@ browser_search (GimpBrowser *gimp_browser,
GtkTreeStore *tree_store;
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
_("Searching by name - please wait"));
_("Searching by name"));
return_vals = gimp_run_procedure ("gimp-plugins-query",
&nreturn_vals,
......@@ -392,7 +392,7 @@ browser_search (GimpBrowser *gimp_browser,
if (! search_text || strlen (search_text) == 0)
{
str = g_strdup_printf (_("%d Plug-ins"), num_plugins);
str = g_strdup_printf (_("%d plug-ins"), num_plugins);
}
else
{
......@@ -401,12 +401,10 @@ browser_search (GimpBrowser *gimp_browser,
case 0:
str = g_strdup (_("No matches for your query"));
break;
case 1:
str = g_strdup (_("1 plug-in matches your query"));
break;
default:
str = g_strdup_printf (_("%d plug-ins match your query"),
num_plugins);
str = g_strdup_printf (ngettext ("%d plug-in matches your query",
"%d plug-ins match your query",
num_plugins), num_plugins);
break;
}
}
......
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