From 5062905db2de2ea17cc97fc1657192292754a62c Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Aurimas=20Fi=C5=A1eras?= Date: Sun, 21 Jun 2009 15:28:09 +0300 Subject: taskmgr: Make all static text translatable --- programs/taskmgr/En.rc | 17 +++++++++++++++ programs/taskmgr/resource.h | 13 ++++++++++++ programs/taskmgr/taskmgr.c | 46 ++++++++++++++++++++++++++---------------- 3 files changed, 58 insertions(+), 18 deletions(-) diff --git a/programs/taskmgr/En.rc b/programs/taskmgr/En.rc index 8694588..a36503e 100644 --- a/programs/taskmgr/En.rc +++ b/programs/taskmgr/En.rc @@ -484,3 +484,20 @@ BEGIN "Sets process to the BELOW NORMAL priority class" ID_PROCESS_PAGE_SETPRIORITY_LOW "Sets process to the LOW priority class" END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_DETAILS "&Details" + IDS_WINDOWS "&Windows" + IDS_VIEW_SELECTCOLUMNS "&Select Columns..." + IDS_OPTIONS_SHOW16BITTASKS "&Show 16-bit tasks" + IDS_VIEW_CPUHISTORY "&CPU History" + IDS_VIEW_CPUHISTORY_ONEGRAPHALL "&One Graph, All CPUs" + IDS_VIEW_CPUHISTORY_ONEGRAPHPERCPU "One Graph &Per CPU" + IDS_VIEW_SHOWKERNELTIMES "&Show Kernel Times" + IDS_APPLICATIONS "Applications" + IDS_PROCESSES "Processes" + IDS_PERFORMANCE "Performance" +END diff --git a/programs/taskmgr/resource.h b/programs/taskmgr/resource.h index cc9ac01..959efdb 100644 --- a/programs/taskmgr/resource.h +++ b/programs/taskmgr/resource.h @@ -182,6 +182,19 @@ #define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL 32813 #define ID_PROCESS_PAGE_SETPRIORITY_LOW 32814 #define ID_PROCESS_PAGE_DEBUGCHANNELS 32815 +#define IDS_VIEW_LARGE 32816 +#define IDS_VIEW_SMALL 32817 +#define IDS_VIEW_DETAILS 32818 +#define IDS_WINDOWS 32819 +#define IDS_VIEW_SELECTCOLUMNS 32820 +#define IDS_OPTIONS_SHOW16BITTASKS 32821 +#define IDS_VIEW_CPUHISTORY 32822 +#define IDS_VIEW_CPUHISTORY_ONEGRAPHALL 32823 +#define IDS_VIEW_CPUHISTORY_ONEGRAPHPERCPU 32824 +#define IDS_VIEW_SHOWKERNELTIMES 32825 +#define IDS_APPLICATIONS 32826 +#define IDS_PROCESSES 32827 +#define IDS_PERFORMANCE 32828 #define IDC_STATIC -1 /* diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c index 923a445..8393623 100644 --- a/programs/taskmgr/taskmgr.c +++ b/programs/taskmgr/taskmgr.c @@ -122,9 +122,13 @@ static BOOL OnCreate(HWND hWnd) RECT rc; TCITEMW item; - static WCHAR wszApplications[] = {'A','p','p','l','i','c','a','t','i','o','n','s',0}; - static WCHAR wszProcesses[] = {'P','r','o','c','e','s','s','e','s',0}; - static WCHAR wszPerformance[] = {'P','e','r','f','o','r','m','a','n','c','e',0}; + static WCHAR wszApplications[255]; + static WCHAR wszProcesses[255]; + static WCHAR wszPerformance[255]; + + LoadStringW(hInst, IDS_APPLICATIONS, wszApplications, sizeof(wszApplications)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_PROCESSES, wszProcesses, sizeof(wszProcesses)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_PERFORMANCE, wszPerformance, sizeof(wszPerformance)/sizeof(WCHAR)); SendMessageW(hMainWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_TASKMANAGER))); @@ -621,21 +625,27 @@ static void TaskManager_OnTabWndSelChange(void) HMENU hViewMenu; HMENU hSubMenu; - static const WCHAR wszLargeIcons[] = {'L','a','r','&','g','e',' ','I','c','o','n','s',0}; - static const WCHAR wszSmallIcons[] = {'S','&','m','a','l','l',' ','I','c','o','n','s',0}; - static const WCHAR wszDetails[] = {'&','D','e','t','a','i','l','s',0}; - static const WCHAR wszWindows[] = {'&','W','i','n','d','o','w','s',0}; - static const WCHAR wszSelectColumns[] = {'&','S','e','l','e','c','t',' ', - 'C','o','l','u','m','n','s','.','.','.',0}; - static const WCHAR wszShow16bTasks[] = {'&','S','h','o','w',' ','1','6','-','b','i','t',' ', - 't','a','s','k','s',0}; - static const WCHAR wszOneGraphAllCPU[] = {'&','O','n','e',' ','G','r','a','p','h',',',' ', - 'A','l','l',' ','C','P','U','s',0}; - static const WCHAR wszOneGraphPerCPU[] = {'O','n','e',' ','G','r','a','p','h',' ', - '&','P','e','r',' ','C','P','U',0}; - static const WCHAR wszCPUHistory[] = {'&','C','P','U',' ','H','i','s','t','o','r','y',0}; - static const WCHAR wszShowKernelTimes[] = {'&','S','h','o','w',' ','K','e','r','n','e','l',' ', - 'T','i','m','e','s',0}; + WCHAR wszLargeIcons[255]; + WCHAR wszSmallIcons[255]; + WCHAR wszDetails[255]; + WCHAR wszWindows[255]; + WCHAR wszSelectColumns[255]; + WCHAR wszShow16bTasks[255]; + WCHAR wszOneGraphAllCPU[255]; + WCHAR wszOneGraphPerCPU[255]; + WCHAR wszCPUHistory[255]; + WCHAR wszShowKernelTimes[255]; + + LoadStringW(hInst, IDS_VIEW_LARGE, wszLargeIcons, sizeof(wszLargeIcons)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_SMALL, wszSmallIcons, sizeof(wszSmallIcons)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_DETAILS, wszDetails, sizeof(wszDetails)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_WINDOWS, wszWindows, sizeof(wszWindows)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_SELECTCOLUMNS, wszSelectColumns, sizeof(wszSelectColumns)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_OPTIONS_SHOW16BITTASKS, wszShow16bTasks, sizeof(wszShow16bTasks)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_CPUHISTORY_ONEGRAPHALL, wszOneGraphAllCPU, sizeof(wszOneGraphAllCPU)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_CPUHISTORY_ONEGRAPHPERCPU, wszOneGraphPerCPU, sizeof(wszOneGraphPerCPU)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_CPUHISTORY, wszCPUHistory, sizeof(wszCPUHistory)/sizeof(WCHAR)); + LoadStringW(hInst, IDS_VIEW_SHOWKERNELTIMES, wszShowKernelTimes, sizeof(wszShowKernelTimes)/sizeof(WCHAR)); hMenu = GetMenu(hMainWnd); hViewMenu = GetSubMenu(hMenu, 2); -- 1.6.3.1