summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-01-03 08:33:21 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-01-03 08:33:21 +0000
commit37f09f5b29740466acd03cbf3c51fd215622744c (patch)
treedea25ddd581a8329d90b32e5d2772c9d546ca5b0 /plugins/UserInfoEx/src
parentf1f8a71bd4df7f239e28a9625b82ee02428c3f3f (diff)
UserInfoEx: fix for 'He', 'She' and 'He/she' correct translation
git-svn-id: http://svn.miranda-ng.org/main/trunk@11731 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp42
1 files changed, 28 insertions, 14 deletions
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 51d39c7d86..04f54a39b7 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -369,15 +369,6 @@ static BYTE NotifyWithSound(const CEvent &evt)
* "check for anniversary" functions
***********************************************************************************************************/
-static LPCTSTR ContactGender(MCONTACT hContact)
-{
- switch (GenderOf(hContact)) {
- case 'M': return TranslateT("He");
- case 'F': return TranslateT("She");
- }
- return TranslateT("He/She");
-}
-
static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
{
int numAnniversaries = 0;
@@ -406,7 +397,17 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE
if (bNotify) {
// first anniversary found
if (numAnniversaries == 1)
- tszMsg.AppendFormat(TranslateT("%s has the following anniversaries:"), ContactGender(hContact));
+ switch (GenderOf(hContact)){
+ case 0:
+ tszMsg += TranslateT("He/she has the following anniversaries:");
+ break;
+ case 'M':
+ tszMsg += TranslateT("He has the following anniversaries:");
+ break;
+ case 'F':
+ tszMsg += TranslateT("She has the following anniversaries:");
+ break;
+ }
tszMsg.Append(_T("\n- "));
switch (Diff) {
@@ -492,10 +493,23 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti
}
int age = mtb.Age(&Now);
if (age > 0)
- mir_sntprintf(szMsg + cchMsg, SIZEOF(szMsg) - cchMsg,
- TranslateT("\n%s becomes %d years old."),
- ContactGender(hContact), age + (Diff > 0));
-
+ switch (GenderOf(hContact)){
+ case 0:
+ mir_sntprintf(szMsg + cchMsg, SIZEOF(szMsg) - cchMsg,
+ TranslateT("\nHe/she becomes %d years old."),
+ age + (Diff > 0));
+ break;
+ case 'M':
+ mir_sntprintf(szMsg + cchMsg, SIZEOF(szMsg) - cchMsg,
+ TranslateT("\nHe becomes %d years old."),
+ age + (Diff > 0));
+ break;
+ case 'F':
+ mir_sntprintf(szMsg + cchMsg, SIZEOF(szMsg) - cchMsg,
+ TranslateT("\nShe becomes %d years old."),
+ age + (Diff > 0));
+ break;
+ }
NotifyWithPopup(hContact, CEvent::BIRTHDAY, Diff, mtb.Description(), szMsg);
}
return true;