Revision: 2515 http://geany.svn.sourceforge.net/geany/?rev=2515&view=rev Author: eht16 Date: 2008-04-22 07:44:45 -0700 (Tue, 22 Apr 2008)
Log Message: ----------- Make use of ngettext() for strings with plural forms.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/autosave.c trunk/src/document.c trunk/src/search.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-04-22 13:36:20 UTC (rev 2514) +++ trunk/ChangeLog 2008-04-22 14:44:45 UTC (rev 2515) @@ -5,6 +5,8 @@ * src/prefs.c: Fix wrong usage of gtk_file_chooser_get_filename() in callback of Open File dialogs in the preferences dialog. + * plugins/autosave.c, src/search.c, src/document.c: + Make use of ngettext() for strings with plural forms.
2008-04-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/autosave.c =================================================================== --- trunk/plugins/autosave.c 2008-04-22 13:36:20 UTC (rev 2514) +++ trunk/plugins/autosave.c 2008-04-22 14:44:45 UTC (rev 2515) @@ -73,7 +73,10 @@ saved_files++;
if (saved_files > 0 && print_msg) - p_ui->set_statusbar(FALSE, _("Autosave: Saved %d files automatically."), saved_files); + p_ui->set_statusbar(FALSE, ngettext( + "Autosave: Saved %d files automatically.", + "Autosave: Saved %d files automatically.", saved_files), + saved_files);
return TRUE; }
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-04-22 13:36:20 UTC (rev 2514) +++ trunk/src/document.c 2008-04-22 14:44:45 UTC (rev 2515) @@ -1692,15 +1692,19 @@ { /* escape special characters for showing */ escaped_find_text = g_strescape(find_text, NULL); escaped_replace_text = g_strescape(replace_text, NULL); - ui_set_statusbar(TRUE, _("%s: replaced %d occurrence(s) of "%s" with "%s"."), - filename, count, escaped_find_text, escaped_replace_text); + ui_set_statusbar(TRUE, ngettext( + "%s: replaced %d occurrence of "%s" with "%s".", + "%s: replaced %d occurrences of "%s" with "%s".", + count), filename, count, escaped_find_text, escaped_replace_text); g_free(escaped_find_text); g_free(escaped_replace_text); } else { - ui_set_statusbar(TRUE, _("%s: replaced %d occurrence(s) of "%s" with "%s"."), - filename, count, find_text, replace_text); + ui_set_statusbar(TRUE, ngettext( + "%s: replaced %d occurrence of "%s" with "%s".", + "%s: replaced %d occurrences of "%s" with "%s".", + count), filename, count, find_text, replace_text); } g_free(filename); }
Modified: trunk/src/search.c =================================================================== --- trunk/src/search.c 2008-04-22 13:36:20 UTC (rev 2514) +++ trunk/src/search.c 2008-04-22 14:44:45 UTC (rev 2515) @@ -902,8 +902,10 @@ if (count == 0) ui_set_statusbar(FALSE, _("No matches found for "%s"."), search_data.text); else - ui_set_statusbar(FALSE, _("Found %d matches for "%s"."), count, - search_data.text); + ui_set_statusbar(FALSE, + ngettext("Found %d match for "%s".", + "Found %d matches for "%s".", count), + count, search_data.text); } break; } @@ -1016,7 +1018,9 @@ if (count == 0) utils_beep();
- ui_set_statusbar(FALSE, _("Replaced text in %u files."), count); + ui_set_statusbar(FALSE, + ngettext("Replaced text in %u file.", + "Replaced text in %u files.", count), count); /* show which docs had replacements: */ gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_STATUS);
@@ -1318,8 +1322,13 @@ GTK_TREE_MODEL(msgwindow.store_msg), NULL) - 1;
msgwin_msg_add_fmt(COLOR_BLUE, -1, -1, - _("Search completed with %d matches."), count); - ui_set_statusbar(FALSE, _("Search completed with %d matches."), count); + ngettext("Search completed with %d matches.", + "Search completed with %d matches.", count), + count); + ui_set_statusbar(FALSE, + ngettext("Search completed with %d matches.", + "Search completed with %d matches.", count), + count); break; } case 1: @@ -1411,9 +1420,12 @@ { gint count = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(msgwindow.store_msg), NULL);
- ui_set_statusbar(FALSE, _("Found %d matches for "%s"."), count, search_text); - msgwin_msg_add_fmt(COLOR_BLUE, -1, -1, _("Found %d matches for "%s"."), count, - search_text); + ui_set_statusbar(FALSE, ngettext( + "Found %d matches for "%s".", "Found %d matches for "%s".", count), + count, search_text); + msgwin_msg_add_fmt(COLOR_BLUE, -1, -1, ngettext( + "Found %d matches for "%s".", "Found %d matches for "%s".", count), + count, search_text); } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.