Skip to content

Commit

Permalink
[IPCONFIG] Convert more strings to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
EricKohl committed Jun 22, 2023
1 parent d04e049 commit b0b40ce
Show file tree
Hide file tree
Showing 21 changed files with 478 additions and 25 deletions.
44 changes: 20 additions & 24 deletions base/applications/network/ipconfig/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,9 @@ DisplayDnsRecord(
IN6_ADDR Addr6;
DNS_STATUS Status;

ConResPrintf(StdOut, IDS_DNSNAME, pszName);
ConResPrintf(StdOut, IDS_DNSLINE);

pQueryResults = NULL;
Status = DnsQuery_W(pszName,
wType,
Expand All @@ -919,48 +922,41 @@ DisplayDnsRecord(
{
if (Status == DNS_ERROR_RCODE_NAME_ERROR)
{
_tprintf(_T("\t%ls\n"), pszName);
_tprintf(_T("\t----------------------------------------\n"));
_tprintf(_T("\tName does not exist\n\n"));
}
else if (Status == DNS_INFO_NO_RECORDS)
{
_tprintf(_T("\t%ls\n"), pszName);
_tprintf(_T("\t----------------------------------------\n"));
_tprintf(_T("\tNo records of type %s\n\n"), GetRecordTypeName(wType));
}
return;
}

_tprintf(_T("\t%ls\n"), pszName);
_tprintf(_T("\t----------------------------------------\n"));

pThisRecord = pQueryResults;
while (pThisRecord != NULL)
{
pNextRecord = pThisRecord->pNext;

_tprintf(_T("\tRecord Name . . . . . : %ls\n"), pThisRecord->pName);
_tprintf(_T("\tRecord Type . . . . . : %hu\n"), pThisRecord->wType);
_tprintf(_T("\tTime To Live. . . . . : %lu\n"), pThisRecord->dwTtl);
_tprintf(_T("\tData Length . . . . . : %hu\n"), pThisRecord->wDataLength);
ConResPrintf(StdOut, IDS_DNSRECORDNAME, pThisRecord->pName);
ConResPrintf(StdOut, IDS_DNSRECORDTYPE, pThisRecord->wType);
ConResPrintf(StdOut, IDS_DNSRECORDTTL, pThisRecord->dwTtl);
ConResPrintf(StdOut, IDS_DNSRECORDLENGTH, pThisRecord->wDataLength);

switch (pThisRecord->Flags.S.Section)
{
case DnsSectionQuestion:
_tprintf(_T("\tSection . . . . . . . : Question\n"));
ConResPrintf(StdOut, IDS_DNSSECTIONQUESTION);
break;

case DnsSectionAnswer:
_tprintf(_T("\tSection . . . . . . . : Answer\n"));
ConResPrintf(StdOut, IDS_DNSSECTIONANSWER);
break;

case DnsSectionAuthority:
_tprintf(_T("\tSection . . . . . . . : Authority\n"));
ConResPrintf(StdOut, IDS_DNSSECTIONAUTHORITY);
break;

case DnsSectionAdditional:
_tprintf(_T("\tSection . . . . . . . : Additional\n"));
ConResPrintf(StdOut, IDS_DNSSECTIONADDITIONAL);
break;
}

Expand All @@ -969,41 +965,41 @@ DisplayDnsRecord(
case DNS_TYPE_A:
Addr4.S_un.S_addr = pThisRecord->Data.A.IpAddress;
RtlIpv4AddressToStringW(&Addr4, szBuffer);
_tprintf(_T("\tA (Host) Record . . . : %ls\n"), szBuffer);
ConResPrintf(StdOut, IDS_DNSTYPEA, szBuffer);
break;

case DNS_TYPE_NS:
_tprintf(_T("\tNS Record . . . . . . : %ls\n"), pThisRecord->Data.NS.pNameHost);
ConResPrintf(StdOut, IDS_DNSTYPENS, pThisRecord->Data.NS.pNameHost);
break;

case DNS_TYPE_CNAME:
_tprintf(_T("\tCNAME Record. . . . . : %ls\n"), pThisRecord->Data.CNAME.pNameHost);
ConResPrintf(StdOut, IDS_DNSTYPECNAME, pThisRecord->Data.CNAME.pNameHost);
break;

case DNS_TYPE_SOA:
_tprintf(_T("\tSOA Record. . . . . . : \n"));
ConResPrintf(StdOut, IDS_DNSTYPESOA);
break;

case DNS_TYPE_PTR:
_tprintf(_T("\tPTR Record. . . . . . : %ls\n"), pThisRecord->Data.PTR.pNameHost);
ConResPrintf(StdOut, IDS_DNSTYPEPTR, pThisRecord->Data.PTR.pNameHost);
break;

case DNS_TYPE_MX:
_tprintf(_T("\tMX Record . . . . . . : \n"));
ConResPrintf(StdOut, IDS_DNSTYPEMX);
break;

case DNS_TYPE_AAAA:
RtlCopyMemory(&Addr6, &pThisRecord->Data.AAAA.Ip6Address, sizeof(IN6_ADDR));
RtlIpv6AddressToStringW(&Addr6, szBuffer);
_tprintf(_T("\tAAAA Record . . . . . : %ls\n"), szBuffer);
ConResPrintf(StdOut, IDS_DNSTYPEAAAA, szBuffer);
break;

case DNS_TYPE_ATMA:
_tprintf(_T("\tATMA Record . . . . . : \n"));
ConResPrintf(StdOut, IDS_DNSTYPEATMA);
break;

case DNS_TYPE_SRV:
_tprintf(_T("\tSRV Record. . . . . . : \n"));
ConResPrintf(StdOut, IDS_DNSTYPESRV);
break;
}
_tprintf(_T("\n\n"));
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/bg-BG.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/de-DE.rc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
IDS_USAGE
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/el-GR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/en-US.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/es-ES.rc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/fr-FR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/id-ID.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/it-IT.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
23 changes: 23 additions & 0 deletions base/applications/network/ipconfig/lang/no-NO.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ BEGIN
IDS_WIFI "Wireless Network Adapter"
END

STRINGTABLE
BEGIN
IDS_DNSNAME "\t%ls\n"
IDS_DNSLINE "\t----------------------------------------\n"
IDS_DNSRECORDNAME "\tRecord Name . . . . . : %ls\n"
IDS_DNSRECORDTYPE "\tRecord Type . . . . . : %hu\n"
IDS_DNSRECORDTTL "\tTime To Live. . . . . : %lu\n"
IDS_DNSRECORDLENGTH "\tData Length . . . . . : %hu\n"
IDS_DNSSECTIONQUESTION "\tSection . . . . . . . : Question\n"
IDS_DNSSECTIONANSWER "\tSection . . . . . . . : Answer\n"
IDS_DNSSECTIONAUTHORITY "\tSection . . . . . . . : Authority\n"
IDS_DNSSECTIONADDITIONAL "\tSection . . . . . . . : Additional\n"
IDS_DNSTYPEA "\tA (Host) Record . . . : %ls\n"
IDS_DNSTYPENS "\tNS Record . . . . . . : %ls\n"
IDS_DNSTYPECNAME "\tCNAME Record. . . . . : %ls\n"
IDS_DNSTYPESOA "\tSOA Record. . . . . . : \n"
IDS_DNSTYPEPTR "\tPTR Record. . . . . . : %ls\n"
IDS_DNSTYPEMX "\tMX Record . . . . . . : \n"
IDS_DNSTYPEAAAA "\tAAAA Record . . . . . : %ls\n"
IDS_DNSTYPEATMA "\tATMA Record . . . . . : \n"
IDS_DNSTYPESRV "\tSRV Record. . . . . . : \n"
END

STRINGTABLE
BEGIN
/* Please keep the spacing/formatting as per En.rc when translating */
Expand Down
Loading

0 comments on commit b0b40ce

Please sign in to comment.