[gtranslator] search: Use ngettext for the search and replace msg
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] search: Use ngettext for the search and replace msg
- Date: Fri, 24 May 2019 07:58:27 +0000 (UTC)
commit ea1463d85b8ae8faa2f7a8427b801d28d9b0684f
Author: Daniel GarcĂa Moreno <dani danigm net>
Date: Fri May 24 09:57:19 2019 +0200
search: Use ngettext for the search and replace msg
src/gtr-actions-search.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gtr-actions-search.c b/src/gtr-actions-search.c
index 084f4583..446aa07f 100644
--- a/src/gtr-actions-search.c
+++ b/src/gtr-actions-search.c
@@ -159,11 +159,11 @@ phrase_found (GtrSearchDialog * dialog,
{
g_autofree char *message = NULL;
- if (occurrences > 1)
- message = g_strdup_printf (_("Found and replaced %d occurrence"),
- occurrences);
- else if (occurrences == 1)
- message = g_strdup_printf (_("Found and replaced one occurrence"));
+ message = g_strdup_printf (
+ ngettext ("Found and replaced one occurrence",
+ "Found and replaced %d occurrences",
+ occurrences), occurrences);
+
gtr_search_dialog_show_message (dialog, message, GTR_SEARCH_DIALOG_MSG_INFO);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]