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.
This commit is contained in:
Sven Neumann 2005-10-05 23:31:49 +00:00 committed by Sven Neumann
parent 3aa703e432
commit f5527875d8
4 changed files with 94 additions and 84 deletions

View File

@ -1,3 +1,13 @@
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

View File

@ -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;
gimp_browser_show_message (browser,
_("Searching by name - please wait"));
while (*q)
{
if ((*q == '_') || (*q == '-'))
g_string_append (query, "-");
else
g_string_append_c (query, *q);
q++;
}
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
g_string_free (query, TRUE);
}
else if (search_type == SEARCH_TYPE_BLURB)
{
gimp_browser_show_message (browser,
_("Searching by description - please wait"));
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"));
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"));
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"));
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"));
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"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", query_text,
&num_procs, &proc_list);
}
else
{
gimp_browser_show_message (browser,
_("Searching - please wait"));
case SEARCH_TYPE_ALL:
gimp_browser_show_message (browser, _("Searching"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
break;
case SEARCH_TYPE_NAME:
{
GString *query = g_string_new ("");
const gchar *q = query_text;
gimp_browser_show_message (browser, _("Searching by name"));
while (*q)
{
if ((*q == '_') || (*q == '-'))
g_string_append (query, "-");
else
g_string_append_c (query, *q);
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);
break;
case SEARCH_TYPE_HELP:
gimp_browser_show_message (browser, _("Searching by help"));
gimp_procedural_db_query (".*", ".*", query_text, ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
break;
case SEARCH_TYPE_AUTHOR:
gimp_browser_show_message (browser, _("Searching by author"));
gimp_procedural_db_query (".*", ".*", ".*", query_text, ".*", ".*", ".*",
&num_procs, &proc_list);
break;
case SEARCH_TYPE_COPYRIGHT:
gimp_browser_show_message (browser, _("Searching by copyright"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", query_text, ".*", ".*",
&num_procs, &proc_list);
break;
case SEARCH_TYPE_DATE:
gimp_browser_show_message (browser, _("Searching by date"));
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", query_text, ".*",
&num_procs, &proc_list);
break;
case SEARCH_TYPE_PROC_TYPE:
gimp_browser_show_message (browser, _("Searching by type"));
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
{

View File

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

View File

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