[NET] Move TIME, USE, USER, VIEW and NET command syntax and help texts into a message table and add the translators names to the message file.

This commit is contained in:
Eric Kohl 2018-12-24 11:48:23 +01:00
parent 4984e1b810
commit 4e28e65490
13 changed files with 365 additions and 148 deletions

View file

@ -636,19 +636,6 @@ cmdUser(
BOOL bPasswordAllocated = FALSE;
NET_API_STATUS Status;
if (argc == 2)
{
Status = EnumerateUsers();
ConPrintf(StdOut, L"Status: %lu\n", Status);
return 0;
}
else if (argc == 3)
{
Status = DisplayUser(argv[2]);
ConPrintf(StdOut, L"Status: %lu\n", Status);
return 0;
}
i = 2;
if (argv[i][0] != L'/')
{
@ -668,7 +655,7 @@ cmdUser(
{
if (_wcsicmp(argv[j], L"/help") == 0)
{
ConResPuts(StdOut, IDS_USER_HELP);
PrintNetMessage(MSG_USER_HELP);
return 0;
}
else if (_wcsicmp(argv[j], L"/add") == 0)
@ -694,6 +681,19 @@ cmdUser(
}
}
if (lpUserName == NULL && lpPassword == NULL)
{
Status = EnumerateUsers();
ConPrintf(StdOut, L"Status: %lu\n", Status);
return 0;
}
else if (lpUserName != NULL && lpPassword == NULL)
{
Status = DisplayUser(lpUserName);
ConPrintf(StdOut, L"Status: %lu\n", Status);
return 0;
}
if (bAdd && bDelete)
{
result = 1;
@ -923,7 +923,7 @@ done:
if (result != 0)
{
ConResPuts(StdOut, IDS_GENERIC_SYNTAX);
ConResPuts(StdOut, IDS_USER_SYNTAX);
PrintNetMessage(MSG_USER_SYNTAX);
}
return result;

View file

@ -155,29 +155,29 @@ INT cmdHelp(INT argc, WCHAR **argv)
if (_wcsicmp(argv[2], L"TIME") == 0)
{
ConResPuts(StdOut, IDS_TIME_SYNTAX);
ConResPuts(StdOut, IDS_TIME_HELP);
PrintNetMessage(MSG_TIME_SYNTAX);
PrintNetMessage(MSG_TIME_HELP);
return 0;
}
if (_wcsicmp(argv[2], L"USE") == 0)
{
ConResPuts(StdOut, IDS_USE_SYNTAX);
ConResPuts(StdOut, IDS_USE_HELP);
PrintNetMessage(MSG_USE_SYNTAX);
PrintNetMessage(MSG_USE_HELP);
return 0;
}
if (_wcsicmp(argv[2], L"USER") == 0)
{
ConResPuts(StdOut, IDS_USER_SYNTAX);
ConResPuts(StdOut, IDS_USER_HELP);
PrintNetMessage(MSG_USER_SYNTAX);
PrintNetMessage(MSG_USER_HELP);
return 0;
}
if (_wcsicmp(argv[2], L"VIEW") == 0)
{
ConResPuts(StdOut, IDS_VIEW_SYNTAX);
ConResPuts(StdOut, IDS_VIEW_HELP);
PrintNetMessage(MSG_VIEW_SYNTAX);
PrintNetMessage(MSG_VIEW_HELP);
return 0;
}

View file

@ -2,21 +2,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [username [password | *] [options]] [/DOMAIN]\n\
username {password | *} /ADD [options] [/DOMAIN]\n\
username [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Force logoff after"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu seconds"
IDS_ACCOUNTS_MIN_PW_AGE "Minimum password age (in days)"

View file

@ -5,20 +5,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [usuario [contraseña | *] [opciones]] [/DOMAIN]\n\
usuario {contraseña | *} /ADD [opciones] [/DOMAIN]\n\
usuario [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Forzar cierre de sesión tras"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu segundos"
IDS_ACCOUNTS_MIN_PW_AGE "Validez mínima de contraseña (en días)"

View file

@ -1,21 +1,6 @@
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [nazwa_użytkownika [hasło | *] [opcje]] [/DOMAIN]\n\
nazwa_użytkownika {hasło | *} /ADD [opcje] [/DOMAIN]\n\
nazwa_użytkownika [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Wymuś wylogowanie po upływie"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu sekund"
IDS_ACCOUNTS_MIN_PW_AGE "Minimalny okres ważności hasła (dni)"

View file

@ -8,20 +8,6 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [nume-utilizator [parolă | *] [opțiuni]] [/DOMAIN]\n\
nume-utilizator {parolă | *} /ADD [opțiuni] [/DOMAIN]\n\
nume-utilizator [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Forțează deautentificarea după"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu secunde"
IDS_ACCOUNTS_MIN_PW_AGE "Vârsta minimă a parolei (în zile)"

View file

@ -4,20 +4,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [имя_пользователя [пароль | *] [параметры]] [/DOMAIN]\n\
имя_пользователя {пароль | *} /ADD [параметры] [/DOMAIN]\n\
имя_пользователя [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Принудительный выход через"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu секунд"
IDS_ACCOUNTS_MIN_PW_AGE "Минимальный срок действия пароля (дней)"

View file

@ -4,20 +4,6 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [kullanıcı adı [şifre | *] [seçenekler]] [/DOMAIN]\n\
kullanıcı adı {şifre | *} /ADD [seçenekler] [/DOMAIN]\n\
kullanıcı adı [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "Sonra oturum kapatmaya zorla"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu sâniye"
IDS_ACCOUNTS_MIN_PW_AGE "En az şifre yaşı (gün)"

View file

@ -4,20 +4,6 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [username [password | *] [options]] [/DOMAIN]\n\
username {password | *} /ADD [options] [/DOMAIN]\n\
username [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "强制注销后"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu 秒"
IDS_ACCOUNTS_MIN_PW_AGE "密码最短使用期限 (以天为单位)"

View file

@ -4,20 +4,6 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
BEGIN
IDS_TIME_SYNTAX "NET TIME ...\n\n"
IDS_TIME_HELP "TIME\n...\n\n"
IDS_USE_SYNTAX "NET USE ...\n\n"
IDS_USE_HELP "USE\n...\n\n"
IDS_USER_SYNTAX "NET USER [使用者名 [密碼 | *] [選項]] [/DOMAIN]\n\
使用者名 {密碼 | *} /ADD [選項] [/DOMAIN]\n\
使用者名 [/DELETE] [/DOMAIN]\n\n"
IDS_USER_HELP "USER\n...\n\n"
IDS_VIEW_SYNTAX "NET VIEW ...\n\n"
IDS_VIEW_HELP "VIEW\n...\n\n"
IDS_NET_SYNTAX "NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n"
IDS_ACCOUNTS_FORCE_LOGOFF "強制登出後"
IDS_ACCOUNTS_LOGOFF_SECONDS "%lu 秒"
IDS_ACCOUNTS_MIN_PW_AGE "密碼最短使用期限 (以天)"

View file

@ -246,7 +246,7 @@ int wmain(int argc, WCHAR **argv)
done:
if (bRun == FALSE)
ConResPuts(StdOut, IDS_NET_SYNTAX);
PrintNetMessage(MSG_NET_SYNTAX);
if (hModuleNetMsg != NULL)
FreeLibrary(hModuleNetMsg);

View file

@ -1,15 +1,5 @@
#pragma once
#define IDS_TIME_SYNTAX 174
#define IDS_TIME_HELP 175
#define IDS_USE_SYNTAX 176
#define IDS_USE_HELP 177
#define IDS_USER_SYNTAX 178
#define IDS_USER_HELP 179
#define IDS_VIEW_SYNTAX 180
#define IDS_VIEW_HELP 181
#define IDS_NET_SYNTAX 182
#define IDS_ACCOUNTS_FORCE_LOGOFF 200
#define IDS_ACCOUNTS_LOGOFF_SECONDS 201
#define IDS_ACCOUNTS_MIN_PW_AGE 202

View file

@ -1,3 +1,11 @@
;/*
; * Romanian translation by Ștefan Fulea (stefan dot fulea at mail dot com)
; * Russian translation by Kudratov Olimjon (olim98@bk.ru)
; * Spanish translation by Ismael Ferreras Morezuelas <2014-11-07>
; * Turkish translation by 2015 Erdem Ersoy (eersoy93) (erdemersoy [at] erdemersoy [dot] net)
; * Simplified Chinese translation by Henry Tang Ih 2016 (henrytang2@hotmail.com)
; * Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2@hotmail.com)
; */
MessageIdTypedef=DWORD
SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
@ -2436,3 +2444,336 @@ using. Also, some services are dependent on others. Stopping one
service can stop others. Some services cannot be stopped.
.
MessageId=10038
SymbolicName=MSG_TIME_SYNTAX
Severity=Success
Facility=System
Language=English
NET TIME ...
.
Language=Polish
NET TIME ...
.
Language=Romanian
NET TIME ...
.
Language=Russian
NET TIME ...
.
Language=Spanish
NET TIME ...
.
Language=Turkish
NET TIME ...
.
Language=Chinese
NET TIME ...
.
Language=Taiwanese
NET TIME ...
.
MessageId=10039
SymbolicName=MSG_TIME_HELP
Severity=Success
Facility=System
Language=English
TIME
...
.
Language=Polish
TIME
...
.
Language=Romanian
TIME
...
.
Language=Russian
TIME
...
.
Language=Spanish
TIME
...
.
Language=Turkish
TIME
...
.
Language=Chinese
TIME
...
.
Language=Taiwanese
TIME
...
.
MessageId=10040
SymbolicName=MSG_USE_SYNTAX
Severity=Success
Facility=System
Language=English
NET USE ...
.
Language=Polish
NET USE ...
.
Language=Romanian
NET USE ...
.
Language=Russian
NET USE ...
.
Language=Spanish
NET USE ...
.
Language=Turkish
NET USE ...
.
Language=Chinese
NET USE ...
.
Language=Taiwanese
NET USE ...
.
MessageId=10041
SymbolicName=MSG_USE_HELP
Severity=Success
Facility=System
Language=English
USE
...
.
Language=Polish
USE
...
.
Language=Romanian
USE
...
.
Language=Russian
USE
...
.
Language=Spanish
USE
...
.
Language=Turkish
USE
...
.
Language=Chinese
USE
...
.
Language=Taiwanese
USE
...
.
MessageId=10042
SymbolicName=MSG_USER_SYNTAX
Severity=Success
Facility=System
Language=English
NET USER [username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
.
Language=Polish
NET USER [nazwa_użytkownika [hasło | *] [opcje]] [/DOMAIN]
nazwa_użytkownika {hasło | *} /ADD [opcje] [/DOMAIN]
nazwa_użytkownika [/DELETE] [/DOMAIN]
.
Language=Romanian
NET USER [nume-utilizator [parolă | *] [opțiuni]] [/DOMAIN]
nume-utilizator {parolă | *} /ADD [opțiuni] [/DOMAIN]
nume-utilizator [/DELETE] [/DOMAIN]
.
Language=Russian
NET USER [имя_пользователя [пароль | *] [параметры]] [/DOMAIN]
имя_пользователя {пароль | *} /ADD [параметры] [/DOMAIN]
имя_пользователя [/DELETE] [/DOMAIN]
.
Language=Spanish
NET USER [usuario [contraseña | *] [opciones]] [/DOMAIN]
usuario {contraseña | *} /ADD [opciones] [/DOMAIN]
usuario [/DELETE] [/DOMAIN]
.
Language=Turkish
NET USER [kullanıcı adı [şifre | *] [seçenekler]] [/DOMAIN]
kullanıcı adı {şifre | *} /ADD [seçenekler] [/DOMAIN]
kullanıcı adı [/DELETE] [/DOMAIN]
.
Language=Chinese
NET USER [username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
.
Language=Taiwanese
NET USER [使 [ | *] []] [/DOMAIN]
使 { | *} /ADD [] [/DOMAIN]
使 [/DELETE] [/DOMAIN]
.
MessageId=10043
SymbolicName=MSG_USER_HELP
Severity=Success
Facility=System
Language=English
USER
...
.
Language=Polish
USER
...
.
Language=Romanian
USER
...
.
Language=Russian
USER
...
.
Language=Spanish
USER
...
.
Language=Turkish
USER
...
.
Language=Chinese
USER
...
.
Language=Taiwanese
USER
...
.
MessageId=10044
SymbolicName=MSG_VIEW_SYNTAX
Severity=Success
Facility=System
Language=English
NET VIEW ...
.
Language=Polish
NET VIEW ...
.
Language=Romanian
NET VIEW ...
.
Language=Russian
NET VIEW ...
.
Language=Spanish
NET VIEW ...
.
Language=Turkish
NET VIEW ...
.
Language=Chinese
NET VIEW ...
.
Language=Taiwanese
NET VIEW ...
.
MessageId=10045
SymbolicName=MSG_VIEW_HELP
Severity=Success
Facility=System
Language=English
VIEW
...
.
Language=Polish
VIEW
...
.
Language=Romanian
VIEW
...
.
Language=Russian
VIEW
...
.
Language=Spanish
VIEW
...
.
Language=Turkish
VIEW
...
.
Language=Chinese
VIEW
...
.
Language=Taiwanese
VIEW
...
.
MessageId=10046
SymbolicName=MSG_NET_SYNTAX
Severity=Success
Facility=System
Language=English
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Polish
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Romanian
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Russian
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Spanish
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Turkish
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Chinese
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.
Language=Taiwanese
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
.