mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 17:35:07 +00:00
Remove all hardcode string to En.rc
from locale.c svn path=/trunk/; revision=14863
This commit is contained in:
parent
827c16db5f
commit
6985385b7d
|
@ -274,6 +274,7 @@ STRING_LABEL_HELP3, "Volume in drive %c: has no label\n"
|
|||
STRING_LABEL_HELP4, "Volume Serial Number is %04X-%04X\n"
|
||||
STRING_LABEL_HELP5, "Drive label (11 Characters, ENTER if none)? "
|
||||
|
||||
STRING_LOCALE_HELP1, "Current time is"
|
||||
|
||||
STRING_MKDIR_HELP, "Creates a directory.\n\n \
|
||||
MKDIR [drive:]path\nMD [drive:]path"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
TCHAR cDateSeparator;
|
||||
|
@ -148,21 +149,24 @@ VOID PrintTime (VOID)
|
|||
{
|
||||
#ifdef __REACTOS__
|
||||
SYSTEMTIME st;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
GetLocalTime (&st);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
|
||||
switch (nTimeFormat)
|
||||
{
|
||||
case 0: /* 12 hour format */
|
||||
default:
|
||||
ConOutPrintf (_T("Current time is %2d%c%02d%c%02d%c%02d%c\n"),
|
||||
default:
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d%c\n"),(LPTSTR)szMsg,
|
||||
(st.wHour == 0 ? 12 : (st.wHour <= 12 ? st.wHour : st.wHour - 12)),
|
||||
cTimeSeparator, st.wMinute, cTimeSeparator, st.wSecond, cDecimalSeparator,
|
||||
st.wMilliseconds / 10, (st.wHour <= 11 ? 'a' : 'p'));
|
||||
break;
|
||||
|
||||
case 1: /* 24 hour format */
|
||||
ConOutPrintf (_T("Current time is %2d%c%02d%c%02d%c%02d\n"),
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d\n"),(LPTSTR)szMsg,
|
||||
st.wHour, cTimeSeparator, st.wMinute, cTimeSeparator,
|
||||
st.wSecond, cDecimalSeparator, st.wMilliseconds / 10);
|
||||
break;
|
||||
|
@ -172,6 +176,8 @@ VOID PrintTime (VOID)
|
|||
|
||||
GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL,
|
||||
szTime, sizeof (szTime));
|
||||
ConOutPrintf (_T("Current time is: %s\n"), szTime);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf (_T("%s: %s\n"),(LPTSTR)szMsg, szTime);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -130,14 +130,16 @@
|
|||
#define STRING_LABEL_HELP4 655
|
||||
#define STRING_LABEL_HELP5 656
|
||||
|
||||
#define STRING_MKDIR_HELP 657
|
||||
#define STRING_LOCALE_HELP1 657
|
||||
|
||||
#define STRING_MEMMORY_HELP1 658
|
||||
#define STRING_MEMMORY_HELP2 659
|
||||
#define STRING_MKDIR_HELP 658
|
||||
|
||||
#define STRING_RMDIR_HELP 660
|
||||
#define STRING_MEMMORY_HELP1 659
|
||||
#define STRING_MEMMORY_HELP2 660
|
||||
|
||||
#define STRING_REM_HELP 661
|
||||
#define STRING_RMDIR_HELP 661
|
||||
|
||||
#define STRING_REM_HELP 662
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue