From edae1aa833a1223ca2e0b14d454fa114b3f0213b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Aug 2013 13:43:00 +0000 Subject: unicode translation instead of ANSI git-svn-id: http://svn.miranda-ng.org/main/trunk@5592 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/json.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'protocols/FacebookRM/src') 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; } } -- cgit v1.2.3