[pan2/testing] fixed stupid ngettext bug
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/testing] fixed stupid ngettext bug
- Date: Sun, 11 Dec 2011 08:39:12 +0000 (UTC)
commit a7ab567a2c8c75f0c8f65f46441691b3d3e4bf91
Author: Heinrich MÃller <henmull src gnome org>
Date: Sun Dec 11 09:36:18 2011 +0100
fixed stupid ngettext bug
pan/gui/post-ui.cc | 2 +-
pan/usenet-utils/message-check.cc | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 6cf8174..2c35665 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -841,7 +841,7 @@ PostUI :: check_message (const Quark& server, GMimeMessage * msg, bool binpost)
std::string s;
foreach_const (MessageCheck::unique_strings_t, errors, it)
s += *it + "\n";
- if (s.size()>1) s.resize (s.size()-1); // eat trailing linefeed
+ s.resize (s.size()-1); // eat trailing linefeed
const GtkMessageType type (goodness.is_refuse() ? GTK_MESSAGE_ERROR : GTK_MESSAGE_WARNING);
GtkWidget * d = gtk_message_dialog_new (GTK_WINDOW(_root),
diff --git a/pan/usenet-utils/message-check.cc b/pan/usenet-utils/message-check.cc
index 50ec84f..620cd03 100644
--- a/pan/usenet-utils/message-check.cc
+++ b/pan/usenet-utils/message-check.cc
@@ -194,11 +194,9 @@ namespace
if (too_wide_qty) {
char buf[1024];
- if (too_wide_qty != 1)
- g_snprintf (buf, sizeof(buf), ngettext("Warning: %d line is more than 80 characters wide.",
- "Warning: %d lines are more than 80 characters wide.", too_wide_qty), too_wide_qty);
- else
-
+ g_snprintf (buf, sizeof(buf), ngettext(
+ "Warning: %d line is more than 80 characters wide.",
+ "Warning: %d lines are more than 80 characters wide.", too_wide_qty), too_wide_qty);
errors.insert (buf);
goodness.raise_to_warn ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]