Commit eede26f5 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

cryptui: Fix a string resource so its format placeholders can be reordered.

parent c864dd6b
......@@ -55,7 +55,7 @@ STRINGTABLE
IDS_FIELD_VALID_TO "Valid to"
IDS_FIELD_SUBJECT "Subject"
IDS_FIELD_PUBLIC_KEY "Public key"
IDS_FIELD_PUBLIC_KEY_FORMAT "%s (%d bits)"
IDS_FIELD_PUBLIC_KEY_FORMAT "%1 (%2!d! bits)"
IDS_PROP_HASH "SHA1 hash"
IDS_PROP_ENHKEY_USAGE "Enhanced key usage (property)"
IDS_PROP_FRIENDLY_NAME "Friendly name"
......
......@@ -2704,6 +2704,8 @@ static WCHAR *field_format_public_key(PCCERT_CONTEXT cert)
if (LoadStringW(hInstance, IDS_FIELD_PUBLIC_KEY_FORMAT, fmt,
sizeof(fmt) / sizeof(fmt[0])))
{
DWORD len;
/* Allocate the output buffer. Use the number of bytes in the
* public key as a conservative (high) estimate for the number of
* digits in its output.
......@@ -2713,14 +2715,18 @@ static WCHAR *field_format_public_key(PCCERT_CONTEXT cert)
* good idea, but as this isn't a sentence fragment, it shouldn't
* be word-order dependent.
*/
buf = HeapAlloc(GetProcessHeap(), 0,
(strlenW(fmt) + strlenW(oidInfo->pwszName) +
cert->pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData * 8)
* sizeof(WCHAR));
len = strlenW(fmt) + strlenW(oidInfo->pwszName) +
cert->pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData * 8;
buf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*buf));
if (buf)
sprintfW(buf, fmt, oidInfo->pwszName,
CertGetPublicKeyLength(X509_ASN_ENCODING,
&cert->pCertInfo->SubjectPublicKeyInfo));
{
DWORD_PTR args[2];
args[0] = (DWORD_PTR)oidInfo->pwszName;
args[1] = CertGetPublicKeyLength(X509_ASN_ENCODING,
&cert->pCertInfo->SubjectPublicKeyInfo);
FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
fmt, 0, 0, buf, len, (__ms_va_list*)args);
}
}
}
return buf;
......
......@@ -1570,7 +1570,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1581,7 +1581,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1582,7 +1582,8 @@ msgid "Public key"
msgstr "Clau Pública"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1604,7 +1604,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1611,7 +1611,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1577,7 +1577,8 @@ msgid "Public key"
msgstr "Öffentlicher Schlüssel"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d Bits)"
#: cryptui.rc:59
......
......@@ -1562,7 +1562,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1550,7 +1550,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1578,8 +1578,8 @@ msgid "Public key"
msgstr "Public key"
#: cryptui.rc:58
msgid "%s (%d bits)"
msgstr "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr "%1 (%2!d! bits)"
#: cryptui.rc:59
msgid "SHA1 hash"
......
......@@ -1592,7 +1592,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1616,7 +1616,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1570,7 +1570,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1580,7 +1580,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1584,7 +1584,8 @@ msgid "Public key"
msgstr "Clé publique"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1576,7 +1576,8 @@ msgid "Public key"
msgstr "מפתח ציבורי"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d סיביות)"
#: cryptui.rc:59
......
......@@ -1551,7 +1551,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1632,7 +1632,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1582,7 +1582,8 @@ msgid "Public key"
msgstr "Chiave pubblica"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bit)"
#: cryptui.rc:59
......
......@@ -1579,7 +1579,8 @@ msgid "Public key"
msgstr "公開鍵"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d ビット)"
#: cryptui.rc:59
......
......@@ -1578,7 +1578,8 @@ msgid "Public key"
msgstr "공용 키"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d 비트)"
#: cryptui.rc:59
......
......@@ -1584,7 +1584,8 @@ msgid "Public key"
msgstr "Viešasis raktas"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bitai)"
#: cryptui.rc:59
......
......@@ -1551,7 +1551,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1678,7 +1678,8 @@ msgid "Public key"
msgstr "Offentlig nøkkel"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1592,7 +1592,8 @@ msgid "Public key"
msgstr "Publieke sleutel"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1551,7 +1551,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1551,7 +1551,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1582,7 +1582,8 @@ msgid "Public key"
msgstr "Klucz publiczny"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bitów)"
#: cryptui.rc:59
......
......@@ -1673,7 +1673,8 @@ msgid "Public key"
msgstr "Chave Pública"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1689,7 +1689,8 @@ msgid "Public key"
msgstr "Chave Pública"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bits)"
#: cryptui.rc:59
......
......@@ -1558,7 +1558,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1737,7 +1737,8 @@ msgid "Public key"
msgstr "Cheie publică"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d biți)"
#: cryptui.rc:59
......
......@@ -1575,7 +1575,8 @@ msgid "Public key"
msgstr "Открытый ключ"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (бит: %d)"
#: cryptui.rc:59
......
......@@ -1560,7 +1560,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1591,7 +1591,8 @@ msgid "Public key"
msgstr "Javni ključ"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bitov)"
#: cryptui.rc:59
......
......@@ -1598,7 +1598,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1614,7 +1614,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1586,7 +1586,8 @@ msgid "Public key"
msgstr "Offentlig nyckel"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d bitar)"
#: cryptui.rc:59
......
......@@ -1551,7 +1551,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1563,7 +1563,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1592,7 +1592,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1582,7 +1582,8 @@ msgid "Public key"
msgstr "Публічний ключ"
#: cryptui.rc:58
msgid "%s (%d bits)"
#, fuzzy
msgid "%1 (%2!d! bits)"
msgstr "%s (%d біт)"
#: cryptui.rc:59
......
......@@ -1559,7 +1559,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1545,7 +1545,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1589,7 +1589,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
......@@ -1594,7 +1594,7 @@ msgid "Public key"
msgstr ""
#: cryptui.rc:58
msgid "%s (%d bits)"
msgid "%1 (%2!d! bits)"
msgstr ""
#: cryptui.rc:59
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment