From ec8adadffe97fe4c19567bb71f25b702e99770a1 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Thu, 3 Oct 2013 16:43:35 +0100 Subject: Now use semicolons for the listing of a pair of tabs with messages in chats. This is to support using commas for listing multiple participants in a single chat. Change-Id: Ic41f4e4db707411847405e96c4fae32973b6ac69 diff --git a/Swift/Controllers/ChatMessageSummarizer.cpp b/Swift/Controllers/ChatMessageSummarizer.cpp index d95a177..014e032 100644 --- a/Swift/Controllers/ChatMessageSummarizer.cpp +++ b/Swift/Controllers/ChatMessageSummarizer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2013 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -38,7 +38,7 @@ string ChatMessageSummarizer::getSummary(const string& current, const vector<Unr string result(QT_TRANSLATE_NOOP("", "%1% and %2% others (%3%)")); myString = str(format(result) % myString % others.size() % otherCount); } else if (!others.empty()) { - string result(QT_TRANSLATE_NOOP("", "%1%, %2% (%3%)")); + string result(QT_TRANSLATE_NOOP("", "%1%; %2% (%3%)")); myString = str(format(result) % myString % others[0].first % otherCount); } return myString; diff --git a/Swift/Controllers/UnitTest/ChatMessageSummarizerTest.cpp b/Swift/Controllers/UnitTest/ChatMessageSummarizerTest.cpp index 985352a..dd2a8e5 100644 --- a/Swift/Controllers/UnitTest/ChatMessageSummarizerTest.cpp +++ b/Swift/Controllers/UnitTest/ChatMessageSummarizerTest.cpp @@ -72,7 +72,7 @@ public: unreads.push_back(UnreadPair("Bob", 3)); unreads.push_back(UnreadPair("Betty", 7)); ChatMessageSummarizer summary; - CPPUNIT_ASSERT_EQUAL(string("Bob (3), Betty (7)"), summary.getSummary(current, unreads)); + CPPUNIT_ASSERT_EQUAL(string("Bob (3); Betty (7)"), summary.getSummary(current, unreads)); } void testCurrentNoneOtherCount() { @@ -82,7 +82,7 @@ public: unreads.push_back(UnreadPair("Bob", 0)); unreads.push_back(UnreadPair("Betty", 7)); ChatMessageSummarizer summary; - CPPUNIT_ASSERT_EQUAL(string("Bob, Betty (7)"), summary.getSummary(current, unreads)); + CPPUNIT_ASSERT_EQUAL(string("Bob; Betty (7)"), summary.getSummary(current, unreads)); } void testCurrentNoneOthersCount() { -- cgit v0.10.2-6-g49f6