ipconfig: Fix the string resources so their format placeholders can be reordered.

This commit is contained in:
Francois Gouget 2011-11-19 15:11:58 +01:00 committed by Alexandre Julliard
parent 1eb25ca768
commit 66b06a499d
47 changed files with 77 additions and 61 deletions

View File

@ -8389,7 +8389,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8510,7 +8510,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8823,7 +8823,8 @@ msgstr ""
"especificats\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s adaptador %s\n"
#: ipconfig.rc:30

View File

@ -8891,7 +8891,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8925,7 +8925,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8833,7 +8833,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Fehler: Unbekannte oder ungültige Kommandozeilenparameter angegeben\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s Adapter %s\n"
#: ipconfig.rc:30

View File

@ -8414,7 +8414,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8604,8 +8604,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgstr "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr "%1 adapter %2\n"
#: ipconfig.rc:30
msgid "Ethernet"

View File

@ -8753,8 +8753,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgstr "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr "%1 adapter %2\n"
#: ipconfig.rc:30
msgid "Ethernet"

View File

@ -8523,7 +8523,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -9127,7 +9127,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8391,7 +8391,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8621,7 +8621,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8856,7 +8856,8 @@ msgstr ""
"invalides\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "Adaptateur %s %s\n"
#: ipconfig.rc:30

View File

@ -8822,7 +8822,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Error: Unknown or invalid command line parameters specified\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s adapter %s\n"
#: ipconfig.rc:30

View File

@ -8290,7 +8290,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8817,7 +8817,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8808,7 +8808,8 @@ msgstr ""
"validi\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s adattatore %s\n"
#: ipconfig.rc:30

View File

@ -8750,7 +8750,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "エラー: 不明または無効なコマンド ライン パラメータが指定されました\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s アダプタ %s\n"
#: ipconfig.rc:30

View File

@ -8719,7 +8719,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "오류: 알수 없거나 올바르지 않은 명령어 라인 매개변수가 지정됨\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s 어댑터 %s\n"
#: ipconfig.rc:30

View File

@ -8770,7 +8770,8 @@ msgstr ""
"Klaida: nurodytas nežinomas arba netinkamas komandinės eilutės parametras\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s adapteris %s\n"
#: ipconfig.rc:30

View File

@ -8290,7 +8290,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8994,7 +8994,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8864,7 +8864,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Fout: Onbekende of ongeldige commandoregelparameters gespecificeerd\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s adapter %s\n"
#: ipconfig.rc:30

View File

@ -8290,7 +8290,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8290,7 +8290,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8793,7 +8793,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Błąd: Nierozpoznany lub niepełny wiersz polecenia\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s karta %s\n"
#: ipconfig.rc:30

View File

@ -9026,7 +9026,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -9039,7 +9039,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8332,7 +8332,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -9268,7 +9268,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8762,7 +8762,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Ошибка: Указаны неизвестные или неверные параметры командной строки\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30

View File

@ -8421,7 +8421,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8769,7 +8769,8 @@ msgstr ""
"Napaka: navedeni so bili nepoznani ali neveljavni parametri ukazne vrstice\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s prilagodilnik %s\n"
#: ipconfig.rc:30

View File

@ -8700,7 +8700,8 @@ msgstr ""
"Грешка: унесени су непознати или неисправни параметри наредбене линије\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30

View File

@ -8741,7 +8741,7 @@ msgstr ""
"Greška: uneseni su nepoznati ili neispravni parametri naredbene linije\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8723,7 +8723,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Fel: Okända eller ogiltiga kommandoradsparametrar angavs\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s-adapter %s\n"
#: ipconfig.rc:30

View File

@ -8290,7 +8290,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8417,7 +8417,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8997,7 +8997,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8720,7 +8720,8 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr "Помилка: Вказані невідомі чи невірні параметри командного рядка\n"
#: ipconfig.rc:29
msgid "%s adapter %s\n"
#, fuzzy
msgid "%1 adapter %2\n"
msgstr "%s адаптер %s\n"
#: ipconfig.rc:30

View File

@ -8369,7 +8369,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8264,7 +8264,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8657,7 +8657,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -8690,7 +8690,7 @@ msgid "Error: Unknown or invalid command line parameters specified\n"
msgstr ""
#: ipconfig.rc:29
msgid "%s adapter %s\n"
msgid "%1 adapter %2\n"
msgstr ""
#: ipconfig.rc:30

View File

@ -26,13 +26,14 @@
#include "ipconfig.h"
static int ipconfig_vprintfW(const WCHAR *msg, va_list va_args)
static int ipconfig_vprintfW(const WCHAR *msg, __ms_va_list va_args)
{
int wlen;
DWORD count, ret;
WCHAR msg_buffer[8192];
wlen = vsprintfW(msg_buffer, msg, va_args);
wlen = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, msg, 0, 0, msg_buffer,
sizeof(msg_buffer)/sizeof(*msg_buffer), &va_args);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL);
if (!ret)
@ -59,37 +60,37 @@ static int ipconfig_vprintfW(const WCHAR *msg, va_list va_args)
return count;
}
static int ipconfig_printfW(const WCHAR *msg, ...)
static int CDECL ipconfig_printfW(const WCHAR *msg, ...)
{
va_list va_args;
__ms_va_list va_args;
int len;
va_start(va_args, msg);
__ms_va_start(va_args, msg);
len = ipconfig_vprintfW(msg, va_args);
va_end(va_args);
__ms_va_end(va_args);
return len;
}
static int ipconfig_message_printfW(int msg, ...)
static int CDECL ipconfig_message_printfW(int msg, ...)
{
va_list va_args;
__ms_va_list va_args;
WCHAR msg_buffer[8192];
int len;
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
sizeof(msg_buffer)/sizeof(WCHAR));
va_start(va_args, msg);
__ms_va_start(va_args, msg);
len = ipconfig_vprintfW(msg_buffer, va_args);
va_end(va_args);
__ms_va_end(va_args);
return len;
}
static int ipconfig_message(int msg)
{
static const WCHAR formatW[] = {'%','s',0};
static const WCHAR formatW[] = {'%','1',0};
WCHAR msg_buffer[8192];
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
@ -123,7 +124,7 @@ static const WCHAR *iftype_to_string(DWORD type)
static void print_field(int msg, const WCHAR *value)
{
static const WCHAR formatW[] = {' ',' ',' ',' ','%','s',':',' ','%','s','\n',0};
static const WCHAR formatW[] = {' ',' ',' ',' ','%','1',':',' ','%','2','\n',0};
WCHAR field[] = {'.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',
' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ','.',' ',0};
@ -141,7 +142,7 @@ static void print_value(const WCHAR *value)
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
'%','s','\n',0};
'%','1','\n',0};
ipconfig_printfW(formatW, value);
}

View File

@ -26,7 +26,7 @@ STRINGTABLE
{
STRING_USAGE, "Usage: ipconfig [ /? | /all ]\n"
STRING_INVALID_CMDLINE, "Error: Unknown or invalid command line parameters specified\n"
STRING_ADAPTER_FRIENDLY, "%s adapter %s\n"
STRING_ADAPTER_FRIENDLY, "%1 adapter %2\n"
STRING_ETHERNET, "Ethernet"
STRING_UNKNOWN, "Unknown"
STRING_CONN_DNS_SUFFIX, "Connection-specific DNS suffix"