From 5a4d314be374f22b605800492ee30a5387321b6c Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 16 Mar 2014 17:28:30 +0000 Subject: translation fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8636 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clistmenus.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index d0b21ac07e..fdbb006717 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -92,7 +92,7 @@ static IconItem iconList[] = { LPGEN("Contact rate High"), "Rate4", IDI_FAVORITE_3 } }; -static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM lParam) +static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) { BYTE bContactRate = db_get_b(hContact, "CList", "Rate", 0); if ( bContactRate > SIZEOF(rates)-1) @@ -104,15 +104,17 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM lParam) mi.icolibItem = iconList[bContactRate].hIcolib; mi.pszPopupName = (char *)-1; mi.position = 0; + mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; if (!bContactRate) mi.ptszName = FAVMENUROOTNAME; else { - int bufsize = (lstrlen(FAVMENUROOTNAME)+lstrlen(rates[bContactRate])+15)*sizeof(TCHAR); + TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]); + int bufsize = (lstrlen(str1)+lstrlen(str2)+15)*sizeof(TCHAR); TCHAR *name = (TCHAR*)_alloca(bufsize); - mir_sntprintf(name, bufsize/sizeof(TCHAR), _T("%s (%s)"),FAVMENUROOTNAME,rates[bContactRate]); + mir_sntprintf(name, bufsize/sizeof(TCHAR), _T("%s (%s)"),str1,str2); mi.ptszName = name; + mi.flags |= CMIF_KEEPUNTRANSLATED; } - mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR; if (!hFavoriteContactMenu) hFavoriteContactMenu = Menu_AddContactMenuItem(&mi); else { -- cgit v1.2.3