Author: ekohl
Date: Tue Mar 21 20:32:54 2017
New Revision: 74220
URL:
http://svn.reactos.org/svn/reactos?rev=74220&view=rev
Log:
[AT]
- Retrieve the users short day names instead of hardcoded day names.
- Fix resources.
Modified:
trunk/reactos/base/applications/cmdutils/at/at.c
trunk/reactos/base/applications/cmdutils/at/lang/de-DE.rc
trunk/reactos/base/applications/cmdutils/at/lang/en-US.rc
Modified: trunk/reactos/base/applications/cmdutils/at/at.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/at/at.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/at/at.c [iso-8859-1] Tue Mar 21 20:32:54
2017
@@ -20,7 +20,55 @@
#include "resource.h"
-PWSTR pszDaysOfWeekArray[] = {L"M", L"T", L"W",
L"TH", L"F", L"S", L"SU", NULL};
+
+PWSTR pszDaysOfWeekArray[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+
+
+static
+VOID
+FreeDaysOfWeekArray(VOID)
+{
+ INT i;
+
+ for (i = 0; i < 7; i++)
+ {
+ if (pszDaysOfWeekArray[i] != NULL)
+ HeapFree(GetProcessHeap(), 0, pszDaysOfWeekArray[i]);
+ }
+}
+
+
+static
+BOOL
+InitDaysOfWeekArray(VOID)
+{
+ INT i, nLength;
+
+ for (i = 0; i < 7; i++)
+ {
+ nLength = GetLocaleInfo(LOCALE_USER_DEFAULT,
+ LOCALE_SABBREVDAYNAME1 + i,
+ NULL,
+ 0);
+
+ pszDaysOfWeekArray[i] = HeapAlloc(GetProcessHeap(),
+ HEAP_ZERO_MEMORY,
+ nLength * sizeof(WCHAR));
+ if (pszDaysOfWeekArray[i] == NULL)
+ {
+ FreeDaysOfWeekArray();
+ return FALSE;
+ }
+
+ GetLocaleInfo(LOCALE_USER_DEFAULT,
+ LOCALE_SABBREVDAYNAME1 + i,
+ pszDaysOfWeekArray[i],
+ nLength);
+ }
+
+ return TRUE;
+}
+
static
BOOL
@@ -572,6 +620,9 @@
/* Initialize the Console Standard Streams */
ConInitStdStreams();
+ if (!InitDaysOfWeekArray())
+ return 1;
+
/* Parse the computer name */
i = 1;
minIdx = 1;
@@ -726,6 +777,8 @@
}
done:
+ FreeDaysOfWeekArray();
+
if (bPrintUsage == TRUE)
ConResPuts(StdOut, IDS_USAGE);
Modified: trunk/reactos/base/applications/cmdutils/at/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/at/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/at/lang/de-DE.rc [iso-8859-1] Tue Mar 21
20:32:54 2017
@@ -18,7 +18,7 @@
/NEXT:Datum[,...] ...\n\
""Befehl"" Ist der auszuführende Befehl oder das
Stapelprogramm.\n"
- IDS_CONFIRM_DELETE "Dieser Vorgang wird alle geplanten Aufräge
löschen.\nMöchten Sie diesen Vorgang fortsetzen? (J/N) [N]"
+ IDS_CONFIRM_DELETE "Dieser Vorgang wird alle geplanten Aufräge
löschen.\nMöchten Sie diesen Vorgang fortsetzen? (J/N) [N] "
IDS_NEW_JOB "Neuer Auftrag hinzugefügt. Kennung = %lu\n"
IDS_JOBS_LIST "Statuskenn. Tag Zeit
Befehlszeile\n"
IDS_NO_ENTRIES "Es sind keine Einträge in der Liste.\n"
@@ -26,7 +26,7 @@
IDS_TODAY "Heute"
IDS_TOMORROW "Morgen"
IDS_EVERY "Jeden"
- IDS_NEXT "Nächsten"
+ IDS_NEXT "Kommenden"
IDS_YES "Ja"
IDS_NO "Nein"
Modified: trunk/reactos/base/applications/cmdutils/at/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/at/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/at/lang/en-US.rc [iso-8859-1] Tue Mar 21
20:32:54 2017
@@ -27,7 +27,7 @@
current day of the month is assumed.\n\
""command"" Is the command or batch program to be
run.\n"
- IDS_CONFIRM_DELETE "This operation will delete all seduled jobs.\nDo you want to
continue this operation? (Y/N) [N]: "
+ IDS_CONFIRM_DELETE "This operation will delete all seduled jobs.\nDo you want to
continue this operation? (Y/N) [N] "
IDS_NEW_JOB "Added a new job with job ID = %lu\n"
IDS_JOBS_LIST "Status ID Day Time Command
Line\n"
IDS_NO_ENTRIES "There are no entries in the list.\n"