From 2c627a0b96f51d243553d567086b3973cfacefd1 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 12 Jul 2013 07:03:17 +0000 Subject: translation fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@5330 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SimpleStatusMsg/src/awaymsg.cpp | 4 ++-- plugins/SimpleStatusMsg/src/main.cpp | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'plugins/SimpleStatusMsg/src') diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 9a470fda94..2b518913d1 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -414,7 +414,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) if (db_get_b(NULL, "SimpleStatusMsg", "ShowCopy", 1) && szMsg && *szMsg != '\0') { clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; - mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); + mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); clmi.ptszName = str; } } @@ -424,7 +424,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) if (!iHidden) { if (db_get_b(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) && StrFindURL(szMsg) != NULL) { clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; - mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); + mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); clmi.ptszName = str; } mir_free(szMsg); diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 792367ff8c..caa4505ea2 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -388,12 +388,7 @@ TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HANDLE { if (ServiceExists(MS_VARS_FORMATSTRING) && db_get_b(NULL, "SimpleStatusMsg", "EnableVariables", 1)) { - FORMATINFO fInfo = {0}; - fInfo.cbSize = sizeof(fInfo); - fInfo.flags = FIF_TCHAR; - fInfo.tszFormat = tszMsg; - fInfo.hContact = hContact; - TCHAR *tszVarsMsg = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fInfo, 0); + TCHAR *tszVarsMsg = variables_parse(tszMsg, NULL, hContact); if (tszVarsMsg != NULL) { TCHAR *format = InsertBuiltinVarsIntoMsg(tszVarsMsg, szProto, iStatus); @@ -1907,14 +1902,14 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) tr.flags = TRF_FREEMEM | TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC; tr.tszTokenString = _T("winampsong"); tr.parseFunctionT = ParseWinampSong; - tr.szHelpText = LPGEN("External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)"); + tr.szHelpText = LPGEN("External Applications")"\t"LPGEN("retrieves song name of the song currently playing in Winamp (Simple Status Message compatible)"); CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); if (db_get_b(NULL, "SimpleStatusMsg", "ExclDateToken", 0) != 0) { tr.tszTokenString = _T("date"); tr.parseFunctionT = ParseDate; - tr.szHelpText = LPGEN("Miranda Related\tget the date (Simple Status Message compatible)"); + tr.szHelpText = LPGEN("Miranda Related")"\t"LPGEN("get the date (Simple Status Message compatible)"); CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); } } @@ -1950,8 +1945,6 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) } else { - char szSetting[80]; - g_uSetStatusTimer = (UINT_PTR*)mir_alloc(sizeof(UINT_PTR) * accounts->count); for (int i = 0; i < accounts->count; ++i) { @@ -1961,6 +1954,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) continue; + char szSetting[80]; mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); g_uSetStatusTimer[i] = SetTimer(NULL, 0, db_get_w(NULL, "SimpleStatusMsg", szSetting, 300), (TIMERPROC)SetStartupStatusProc); } -- cgit v1.2.3