diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-05 13:43:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-05 13:43:00 +0000 |
commit | edae1aa833a1223ca2e0b14d454fa114b3f0213b (patch) | |
tree | 8161a2739427cfc26257584514bf2699f78dc2b6 /protocols/FacebookRM/src | |
parent | 58072b25fc6f1439e1a2752cde6fc94e780972c2 (diff) |
unicode translation instead of ANSI
git-svn-id: http://svn.miranda-ng.org/main/trunk@5592 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index b7570bae9a..6e62356070 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -301,17 +301,20 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, JSONNODE *message_text += json_as_string(admin_snippet);
} */
+ std::tstring newText;
if (type == "sticker")
- type = Translate("a sticker");
+ newText = TranslateT("a sticker");
else if (type == "file")
- type = (json_size(attachments) > 1) ? Translate("files") : Translate("a file");
+ newText = (json_size(attachments) > 1) ? TranslateT("files") : TranslateT("a file");
else if (type == "photo")
- type = (json_size(attachments) > 1) ? Translate("photos") : Translate("a photo");
+ newText = (json_size(attachments) > 1) ? TranslateT("photos") : TranslateT("a photo");
+ else
+ newText = _A2T(type.c_str());
- char title[200];
- mir_snprintf(title, SIZEOF(title), Translate("User sent you %s:"), type.c_str());
+ TCHAR title[200];
+ mir_sntprintf(title, SIZEOF(title), TranslateT("User sent you %s:"), newText.c_str());
- *message_text += ptrA(mir_utf8encode(title));
+ *message_text += ptrA(mir_utf8encodeT(title));
*message_text += attachments_text;
}
}
|