[svn] GpgOL - r192 - trunk/src

svn author wk cvs at cvs.gnupg.org
Fri Oct 12 20:11:51 CEST 2007


Author: wk
Date: 2007-10-12 20:11:41 +0200 (Fri, 12 Oct 2007)
New Revision: 192

Modified:
   trunk/src/ChangeLog
   trunk/src/config-dialog.c
   trunk/src/engine-gpgme.c
   trunk/src/gpgol-ids.h
   trunk/src/gpgol-rsrcs.rc
   trunk/src/olflange-dlgs.cpp
   trunk/src/olflange-ids.h
   trunk/src/olflange-rsrcs.rc
   trunk/src/passphrase-dialog.c
   trunk/src/recipient-dialog.c
   trunk/src/verify-dialog.c
Log:
Cleaned up dialogs to use gettext.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/ChangeLog	2007-10-12 18:11:41 UTC (rev 192)
@@ -1,3 +1,23 @@
+2007-10-12  Werner Koch  <wk at g10code.com>
+
+	* verify-dialog.c (verify_dialog_box): Do not distinguish
+	languages.
+	(verify_dlg_set_labels): New.
+	(verify_dlg_proc): Call it.
+
+	* passphrase-dialog.c (passphrase_callback_box): Do not
+	distinguish languages.
+	(decrypt_key_dlg_set_labels): New.
+	(decrypt_key_dlg_proc): Call it.
+	(decrypt_key_ext_dlg_set_labels): New.
+	(decrypt_key_ext_dlg_proc): Call it.
+
+	* recipient-dialog.c (recipient_dialog_box): Do not distinguish
+	languages.
+	(recipient_dialog_box2): Ditto.
+	(recipient_dlg_set_labels): New.
+	(recipient_dlg_proc): Call it.
+
 2007-10-11  Werner Koch  <wk at g10code.com>
 
 	* ext-commands.cpp (toolbar_add_menu): USe "@" to indicate a

Modified: trunk/src/config-dialog.c
===================================================================
--- trunk/src/config-dialog.c	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/config-dialog.c	2007-10-12 18:11:41 UTC (rev 192)
@@ -267,7 +267,7 @@
 config_dlg_set_labels (HWND dlg)
 {
   static struct { int itemid; const char *label; } labels[] = {
-    { IDC_T_OPT_KEYMAN_PATH,    N_("Path to key-manager binary")},
+    { IDC_T_OPT_KEYMAN_PATH,    N_("Path to certificate manager binary")},
     { IDC_T_DEBUG_LOGFILE,  N_("Debug output (for analysing problems)")},
     { 0, NULL}
   };

Modified: trunk/src/engine-gpgme.c
===================================================================
--- trunk/src/engine-gpgme.c	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/engine-gpgme.c	2007-10-12 18:11:41 UTC (rev 192)
@@ -351,8 +351,8 @@
       if (!defkey)
         {
           MessageBox (hwnd,
-                      _("The configured default encryption key is not "
-                        "available or does not unambigiously specify a key. "
+                      _("The configured default encryption certificate is not "
+                        "available or does not unambigiously specify one. "
                         "Please fix this in the option dialog.\n\n"
                         "This message won't be be encrypted to this key!"),
                       _("Encryption"), MB_ICONWARNING|MB_OK);
@@ -826,7 +826,7 @@
 
   if ((sum & GPGME_SIGSUM_KEY_REVOKED))
     {
-      at_puts (a, _("Warning: One of the keys has been revoked\n"));
+      at_puts (a, _("Warning: One of the certificates has been revoked\n"));
       severe = 1;
     }
   
@@ -836,13 +836,13 @@
 
       if (t)
         {
-          at_puts (a, _("Warning: The key used to create the "
+          at_puts (a, _("Warning: The certificate used to create the "
                         "signature expired at: "));
           at_print_time (a, t);
           at_puts (a, "\n");
         }
       else
-        at_puts (a, _("Warning: At least one certification key "
+        at_puts (a, _("Warning: At least one certification certificate "
                       "has expired\n"));
     }
 
@@ -854,7 +854,7 @@
     }
 
   if ((sum & GPGME_SIGSUM_KEY_MISSING))
-    at_puts (a, _("Can't verify due to a missing key or certificate\n"));
+    at_puts (a, _("Can't verify due to a missing certificate\n"));
 
   if ((sum & GPGME_SIGSUM_CRL_MISSING))
     {
@@ -913,17 +913,17 @@
     {
     case GPGME_VALIDITY_UNKNOWN:
       txt = _("WARNING: We have NO indication whether "
-              "the key belongs to the person named "
+              "this certificate belongs to the person named "
               "as shown above\n");
       break;
     case GPGME_VALIDITY_UNDEFINED:
       break;
     case GPGME_VALIDITY_NEVER:
-      txt = _("WARNING: The key does NOT BELONG to "
+      txt = _("WARNING: The certificate does NOT BELONG to "
               "the person named as shown above\n");
       break;
     case GPGME_VALIDITY_MARGINAL:
-      txt = _("WARNING: It is NOT certain that the key "
+      txt = _("WARNING: It is NOT certain that the certificate "
               "belongs to the person named as shown above\n");
       break;
     case GPGME_VALIDITY_FULL:

Modified: trunk/src/gpgol-ids.h
===================================================================
--- trunk/src/gpgol-ids.h	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/gpgol-ids.h	2007-10-12 18:11:41 UTC (rev 192)
@@ -6,19 +6,9 @@
 #ifndef GPGOL_IDS_H
 #define GPGOL_IDS_H
 
-#define IDD_ENC                         101
 #define IDD_MAIN                        102
 #define IDD_SYMENC                      103
-#define IDD_DEC                         104
 #define IDD_SIG                         105
-#define IDD_VRY                         107
-#define IDD_DEC_EXT                     108
-#define IDD_VRY_DE                      111
-#define IDD_DEC_DE                      113
-#define IDD_DEC_EXT_DE                  114
-#define IDD_ENC_DE                      115
-#define IDC_ENC_RSET1                   1000
-#define IDC_ENC_RSET2                   1001
 #define IDC_MAIN_ENC                    1002
 #define IDC_ENC_OPTARMOR                1003
 #define IDC_ENC_OPTSYM                  1004
@@ -27,8 +17,6 @@
 #define IDC_SYMENC_HASH                 1007
 #define IDC_SYMENC_PASS                 1008
 #define IDC_SYMENC_PASSCHK              1009
-#define IDC_DEC_KEYLIST                 1010
-#define IDC_DEC_PASS                    1011
 #define IDC_SYMENC_HIDE                 1012
 #define IDC_MAIN_DEC                    1014
 #define IDC_MAIN_SIG                    1016
@@ -38,29 +26,12 @@
 #define IDC_SIG_PASS                    1020
 #define IDC_MAIN_VRY                    1021
 #define IDC_SIG_HIDE                    1022
-#define IDC_DEC_HIDE                    1023
 #define IDC_MAIN_SIGNENC                1024
 #define IDC_OPT_GPGPRG                  1025
 #define IDC_OPT_SELPRG                  1026
 #define IDC_OPT_HOMEDIR                 1027
 #define IDC_OPT_SELHOMEDIR              1028
-#define IDC_VRY_TIME                    1029
-#define IDC_VRY_KEYID                   1030
-#define IDC_VRY_STATUS                  1031
-#define IDC_VRY_ISSUER                  1032
-#define IDC_VRY_AKALIST                 1033
-#define IDC_VRY_PKALGO                  1034
-#define IDC_ENC_NOTFOUND                1035
-#define IDC_ENC_INFO                    1036
-#define IDC_DEC_HINT                    1039
-#define IDC_VRY_HINT                    1040
-#define IDC_DEC_PASSINF                 1041
-#define IDC_DECEXT_RSET                 1042
-#define IDC_DECEXT_KEYLIST              1043
-#define IDC_DECEXT_HIDE                 1044
-#define IDC_DECEXT_PASS                 1045
-#define IDC_DECEXT_HINT                 1046
-#define IDC_DECEXT_PASSINF              1047
 
+
 #endif /*GPGOL_IDS_H*/
 

Modified: trunk/src/gpgol-rsrcs.rc
===================================================================
--- trunk/src/gpgol-rsrcs.rc	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/gpgol-rsrcs.rc	2007-10-12 18:11:41 UTC (rev 192)
@@ -38,136 +38,95 @@
 // Dialog
 //
 
-IDD_ENC_DE DIALOG DISCARDABLE  0, 0, 332, 215
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Auswahl des Empfängerschlüssels"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "List1",IDC_ENC_RSET1,"SysListView32",LVS_REPORT | 
-                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,4,314,92
-    LTEXT           "Ausgewählte Empfänger:",IDC_STATIC,
-                    8,98,130,8
-    CONTROL         "List2",IDC_ENC_RSET2,"SysListView32",LVS_REPORT | 
-                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,110,313,49
-    LTEXT           "Empfänger die NICHT gefunden wurden:",IDC_ENC_INFO,
-                    8,161,128,8
-    LISTBOX         IDC_ENC_NOTFOUND,8,170,313,22,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    DEFPUSHBUTTON   "&OK",IDOK,221,196,50,14
-    PUSHBUTTON      "&Abbrechen",IDCANCEL,273,196,50,14
-END
+//IDD_ENC_DE DIALOG DISCARDABLE  0, 0, 332, 215
+//STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+//CAPTION "Auswahl des Empfängerschlüssels"
+//FONT 8, "MS Sans Serif"
+//BEGIN
+//    CONTROL         "List1",IDC_ENC_RSET1,"SysListView32",LVS_REPORT | 
+//                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,4,314,92
+//    LTEXT           "Ausgewählte Empfänger:",IDC_STATIC,
+//                    8,98,130,8
+//    CONTROL         "List2",IDC_ENC_RSET2,"SysListView32",LVS_REPORT | 
+//                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,110,313,49
+//    LTEXT           "Empfänger die NICHT gefunden wurden:",IDC_ENC_INFO,
+//                    8,161,128,8
+//    LISTBOX         IDC_ENC_NOTFOUND,8,170,313,22,LBS_SORT | 
+//                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+//    DEFPUSHBUTTON   "&OK",IDOK,221,196,50,14
+//    PUSHBUTTON      "&Abbrechen",IDCANCEL,273,196,50,14
+//END
+//
 
-IDD_DEC_EXT_DE DIALOG DISCARDABLE  0, 0, 207, 143
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Auswahl des geheimen Schlüssels"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Verschlüsselt mit folgenden Public-Keys:",IDC_STATIC,7,
-                    4,127,8
-    LISTBOX         IDC_DECEXT_RSET,7,16,193,25,LBS_NOINTEGRALHEIGHT | 
-                    WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_DECEXT_KEYLIST,7,54,191,14,CBS_DROPDOWN | CBS_SORT | 
-                    WS_DISABLED | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "",IDC_DECEXT_HINT,7,73,193,8
-    LTEXT           "Passphrase um geheimen Schlüssel zu entsperren",
-                    IDC_DECEXT_PASSINF,7,85,158,8
-    EDITTEXT        IDC_DECEXT_PASS,7,96,192,12,ES_PASSWORD | ES_AUTOHSCROLL
-    CONTROL         "&Eingabe ausblenden",IDC_DECEXT_HIDE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,122,108,81,10
-    DEFPUSHBUTTON   "OK",IDOK,98,125,50,14
-    PUSHBUTTON      "&Abbrechen",IDCANCEL,149,125,50,14
-END
+/* IDD_DEC_DE DIALOG DISCARDABLE  0, 0, 225, 101 */
+/* STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU */
+/* CAPTION "Auswahl des geheimen Schlüssels" */
+/* FONT 8, "MS Sans Serif" */
+/* BEGIN */
+/*     COMBOBOX        IDC_DEC_KEYLIST,9,7,209,58,CBS_DROPDOWNLIST | WS_VSCROLL |  */
+/*                     WS_TABSTOP */
+/*     LTEXT           "",IDC_DEC_HINT,9,25,201,10 */
+/*     LTEXT           "Passphrase eingeben für den geheimen Schlüssel", */
+/*                     "Enter passphrase for your secret key" */
+/*                     IDC_DEC_PASSINF,9,37,158,8 */
+/*     EDITTEXT        IDC_DEC_PASS,9,51,207,12,ES_PASSWORD | ES_AUTOHSCROLL */
+/*     CONTROL         "&Eingabe ausblenden",IDC_DEC_HIDE,"Button", */
+/*                     BS_AUTOCHECKBOX | WS_TABSTOP,138,64,81,10 */
+/*     DEFPUSHBUTTON   "&OK",IDOK,115,83,50,14 */
+/*     PUSHBUTTON      "&Cancel",IDCANCEL,167,83,50,14 */
+/* END */
 
-IDD_VRY_DE DIALOG DISCARDABLE  0, 0, 253, 116
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
-CAPTION "Prüfungsresultat"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Signatur erstellt",IDC_STATIC,3,6,49,8
-    EDITTEXT        IDC_VRY_TIME,55,4,76,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "mit",IDC_STATIC,132,6,10,8
-    EDITTEXT        IDC_VRY_PKALGO,152,4,20,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "key ID",IDC_STATIC,174,7,22,8
-    EDITTEXT        IDC_VRY_KEYID,196,4,51,12,ES_AUTOHSCROLL | ES_READONLY
-    EDITTEXT        IDC_VRY_STATUS,3,29,92,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "von",IDC_STATIC,98,31,13,8
-    EDITTEXT        IDC_VRY_ISSUER,117,29,131,13,ES_AUTOHSCROLL | 
-                    ES_READONLY
-    LTEXT           "auch bekannt als",IDC_STATIC,3,47,56,8
-    LISTBOX         IDC_VRY_AKALIST,3,56,245,25,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "",IDC_VRY_HINT,3,83,245,10
-    DEFPUSHBUTTON   "&OK",IDOK,198,96,50,14
-END
 
-IDD_DEC_DE DIALOG DISCARDABLE  0, 0, 225, 101
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Auswahl des geheimen Schlüssels"
-FONT 8, "MS Sans Serif"
-BEGIN
-    COMBOBOX        IDC_DEC_KEYLIST,9,7,209,58,CBS_DROPDOWNLIST | WS_VSCROLL | 
-                    WS_TABSTOP
-    LTEXT           "",IDC_DEC_HINT,9,25,201,10
-    LTEXT           "Passphrase eingeben für den geheimen Schlüssel",
-                    IDC_DEC_PASSINF,9,37,158,8
-    EDITTEXT        IDC_DEC_PASS,9,51,207,12,ES_PASSWORD | ES_AUTOHSCROLL
-    CONTROL         "&Eingabe ausblenden",IDC_DEC_HIDE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,138,64,81,10
-    DEFPUSHBUTTON   "&OK",IDOK,115,83,50,14
-    PUSHBUTTON      "&Cancel",IDCANCEL,167,83,50,14
-END
+/* IDD_DEC_EXT_DE DIALOG DISCARDABLE  0, 0, 207, 143 */
+/* STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU */
+/* CAPTION "Auswahl des geheimen Schlüssels" */
+/* FONT 8, "MS Sans Serif" */
+/* BEGIN */
+/*     LTEXT           "Verschlüsselt mit folgenden Public-Keys:",IDC_STATIC,7, */
+/*                     "Encrypted with the following public-keys:" */
+/*                     4,127,8 */
+/*     LISTBOX         IDC_DECEXT_RSET,7,16,193,25,LBS_NOINTEGRALHEIGHT |  */
+/*                     WS_VSCROLL | WS_TABSTOP */
+/*     COMBOBOX        IDC_DECEXT_KEYLIST,7,54,191,14,CBS_DROPDOWN | CBS_SORT |  */
+/*                     WS_DISABLED | WS_VSCROLL | WS_TABSTOP */
+/*     LTEXT           "",IDC_DECEXT_HINT,7,73,193,8 */
+/*     LTEXT           "Passphrase um geheimen Schlüssel zu entsperren", */
+/*                     "Enter passphrase for your secret key" */
+/*                     IDC_DECEXT_PASSINF,7,85,158,8 */
+/*     EDITTEXT        IDC_DECEXT_PASS,7,96,192,12,ES_PASSWORD | ES_AUTOHSCROLL */
+/*     CONTROL         "&Eingabe ausblenden",IDC_DECEXT_HIDE,"Button", */
+/*                     "&Hide Typing" */
+/*                     BS_AUTOCHECKBOX | WS_TABSTOP,122,108,81,10 */
+/*     DEFPUSHBUTTON   "OK",IDOK,98,125,50,14 */
+/*     PUSHBUTTON      "&Abbrechen",IDCANCEL,149,125,50,14 */
+/* END */
 
 
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
+/* IDD_VRY_DE DIALOG DISCARDABLE  0, 0, 253, 116 */
+/* STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION */
+/* CAPTION "Prüfungsresultat" */
+/* FONT 8, "MS Sans Serif" */
+/* BEGIN */
+/*     LTEXT           "Signatur erstellt",IDC_STATIC,3,6,49,8 */
+/*     EDITTEXT        IDC_VRY_TIME,55,4,76,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     LTEXT           "mit",IDC_STATIC,132,6,10,8 */
+/*     EDITTEXT        IDC_VRY_PKALGO,152,4,20,12,ES_AUTOHSCROLL | ES_READONLY */
 
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_ENC_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 4
-        RIGHTMARGIN, 326
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 211
-    END
+/*     LTEXT           "key ID",IDC_STATIC,174,7,22,8 */
+/*     EDITTEXT        IDC_VRY_KEYID,196,4,51,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     EDITTEXT        IDC_VRY_STATUS,3,29,92,12,ES_AUTOHSCROLL | ES_READONLY */
 
-    IDD_DEC_EXT_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 1
-        RIGHTMARGIN, 202
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 139
-    END
+/*     LTEXT           "von",IDC_STATIC,98,31,13,8 */
+/*     EDITTEXT        IDC_VRY_ISSUER,117,29,131,13,ES_AUTOHSCROLL |  */
+/*                     ES_READONLY */
+/*     LTEXT           "auch bekannt als",IDC_STATIC,3,47,56,8 */
+/*     LISTBOX         IDC_VRY_AKALIST,3,56,245,25,LBS_SORT |  */
+/*                     LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP */
+/*     LTEXT           "",IDC_VRY_HINT,3,83,245,10 */
+/*     DEFPUSHBUTTON   "&OK",IDOK,198,96,50,14 */
+/* END */
 
-    IDD_OPT_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 2
-        RIGHTMARGIN, 162
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 115
-    END
 
-    IDD_VRY_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 3
-        RIGHTMARGIN, 248
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 110
-    END
-
-    IDD_DEC_DE, DIALOG
-    BEGIN
-        LEFTMARGIN, 3
-        RIGHTMARGIN, 218
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 97
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
 #endif    // Deutsch (Deutschland) resources
 /////////////////////////////////////////////////////////////////////////////
 
@@ -186,147 +145,37 @@
 // Dialog
 //
 
-IDD_DEC DIALOG DISCARDABLE  0, 0, 225, 87
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Secret Key Dialog"
-FONT 8, "MS Sans Serif"
-BEGIN
-    COMBOBOX        IDC_DEC_KEYLIST,9,7,209,58,CBS_DROPDOWNLIST | WS_VSCROLL | 
-                    WS_TABSTOP
-    LTEXT           "",IDC_DEC_HINT,9,25,201,10
-    LTEXT           "Enter passphrase for your secret key",IDC_DEC_PASSINF,9,
-                    37,116,8
-    CONTROL         "&Hide Typing",IDC_DEC_HIDE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,162,37,54,10
-    EDITTEXT        IDC_DEC_PASS,9,51,207,12,ES_PASSWORD | ES_AUTOHSCROLL
-    DEFPUSHBUTTON   "&OK",IDOK,115,69,50,14
-    PUSHBUTTON      "&Cancel",IDCANCEL,167,69,50,14
-END
+/* IDD_VRY DIALOG DISCARDABLE  0, 0, 253, 116 */
+/* STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION */
+/* CAPTION "Verification Result" */
+/* FONT 8, "MS Sans Serif" */
+/* BEGIN */
+/*     LTEXT           "Signature made",IDC_STATIC,3,6,50,8 */
+/*     EDITTEXT        IDC_VRY_TIME,55,4,76,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     LTEXT           "using",IDC_STATIC,132,6,18,8 */
+/*     EDITTEXT        IDC_VRY_PKALGO,152,4,20,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     LTEXT           "key ID",IDC_STATIC,174,7,22,8 */
+/*     EDITTEXT        IDC_VRY_KEYID,196,4,51,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     EDITTEXT        IDC_VRY_STATUS,3,29,92,12,ES_AUTOHSCROLL | ES_READONLY */
+/*     LTEXT           "from",IDC_STATIC,98,31,14,8 */
+/*     EDITTEXT        IDC_VRY_ISSUER,117,29,131,13,ES_AUTOHSCROLL |  */
+/*                     ES_READONLY */
+/*     LTEXT           "also known as",IDC_STATIC,3,47,46,8 */
+/*     LISTBOX         IDC_VRY_AKALIST,3,56,245,25,LBS_SORT |  */
+/*                     LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP */
+/*     LTEXT           "",IDC_VRY_HINT,3,83,245,10 */
+/*     DEFPUSHBUTTON   "&OK",IDOK,198,96,50,14 */
+/* END */
 
 
-IDD_VRY DIALOG DISCARDABLE  0, 0, 253, 116
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
-CAPTION "Verification Result"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Signature made",IDC_STATIC,3,6,50,8
-    EDITTEXT        IDC_VRY_TIME,55,4,76,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "using",IDC_STATIC,132,6,18,8
-    EDITTEXT        IDC_VRY_PKALGO,152,4,20,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "key ID",IDC_STATIC,174,7,22,8
-    EDITTEXT        IDC_VRY_KEYID,196,4,51,12,ES_AUTOHSCROLL | ES_READONLY
-    EDITTEXT        IDC_VRY_STATUS,3,29,92,12,ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "from",IDC_STATIC,98,31,14,8
-    EDITTEXT        IDC_VRY_ISSUER,117,29,131,13,ES_AUTOHSCROLL | 
-                    ES_READONLY
-    LTEXT           "also known as",IDC_STATIC,3,47,46,8
-    LISTBOX         IDC_VRY_AKALIST,3,56,245,25,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "",IDC_VRY_HINT,3,83,245,10
-    DEFPUSHBUTTON   "&OK",IDOK,198,96,50,14
-END
-
-IDD_ENC DIALOG DISCARDABLE  0, 0, 332, 215
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Recipient Dialog"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "List1",IDC_ENC_RSET1,"SysListView32",LVS_REPORT | 
-                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,4,314,92
-    CONTROL         "List2",IDC_ENC_RSET2,"SysListView32",LVS_REPORT | 
-                    LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,98,313,49
-    LTEXT           "Recipient which were NOT found",IDC_ENC_INFO,8,149,106,
-                    8
-    LISTBOX         IDC_ENC_NOTFOUND,8,158,313,22,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    DEFPUSHBUTTON   "&OK",IDOK,221,196,50,14
-    PUSHBUTTON      "&Cancel",IDCANCEL,273,196,50,14
-END
-
-IDD_DEC_EXT DIALOG DISCARDABLE  0, 0, 205, 134
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Secret Key Dialog"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "Encrypted with the following public-keys:",IDC_STATIC,7,
-                    4,128,8
-    LISTBOX         IDC_DECEXT_RSET,7,16,193,25,LBS_NOINTEGRALHEIGHT | 
-                    WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_DECEXT_KEYLIST,8,54,191,14,CBS_DROPDOWN | CBS_SORT | 
-                    WS_DISABLED | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "",IDC_DECEXT_HINT,7,73,193,8
-    LTEXT           "Enter passphrase for your secret key",
-                    IDC_DECEXT_PASSINF,7,83,116,8
-    CONTROL         "&Hide Typing",IDC_DECEXT_HIDE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,144,82,54,10
-    EDITTEXT        IDC_DECEXT_PASS,7,95,192,12,ES_PASSWORD | ES_AUTOHSCROLL
-    DEFPUSHBUTTON   "OK",IDOK,98,116,50,14
-    PUSHBUTTON      "&Cancel",IDCANCEL,150,116,50,14
-END
-
-
 /////////////////////////////////////////////////////////////////////////////
 //
 // DESIGNINFO
 //
 
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_DEC, DIALOG
-    BEGIN
-        LEFTMARGIN, 3
-        RIGHTMARGIN, 218
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 83
-    END
 
-    IDD_OPT, DIALOG
-    BEGIN
-        LEFTMARGIN, 2
-        RIGHTMARGIN, 162
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 115
-    END
-
-    IDD_VRY, DIALOG
-    BEGIN
-        LEFTMARGIN, 3
-        RIGHTMARGIN, 248
-        TOPMARGIN, 4
-        BOTTOMMARGIN, 110
-    END
-
-    IDD_ENC, DIALOG
-    BEGIN
-        LEFTMARGIN, 4
-        RIGHTMARGIN, 326
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 211
-    END
-
-    IDD_DEC_EXT, DIALOG
-    BEGIN
-        LEFTMARGIN, 1
-        RIGHTMARGIN, 200
-        TOPMARGIN, 3
-        BOTTOMMARGIN, 130
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
 #endif    // Englisch (USA) resources
 /////////////////////////////////////////////////////////////////////////////
 
 
 
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-

Modified: trunk/src/olflange-dlgs.cpp
===================================================================
--- trunk/src/olflange-dlgs.cpp	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/olflange-dlgs.cpp	2007-10-12 18:11:41 UTC (rev 192)
@@ -47,7 +47,7 @@
     { IDC_SMIME_DEFAULT,    N_("Use S/MIME by default")},
     { IDC_ENABLE_SMIME,     N_("Enable the S/MIME support")},
     { IDC_ENCRYPT_WITH_STANDARD_KEY, 
-                            N_("Also encrypt message with the &default key")},
+                     N_("Also encrypt message with the default certificate")},
     { IDC_PREVIEW_DECRYPT,  N_("Also decrypt in preview window")},
     { IDC_PREFER_HTML,      N_("Show HTML view if possible")},
 
@@ -219,7 +219,7 @@
               {
                 if (opt.enable_default_key)
                   {
-                    MessageBox (hDlg,_("The default key may not"
+                    MessageBox (hDlg,_("The default certificate may not"
                                        " contain any spaces."),
                                 "GpgOL", MB_ICONERROR|MB_OK);
                     bMsgResult = PSNRET_INVALID_NOCHANGEPAGE;

Modified: trunk/src/olflange-ids.h
===================================================================
--- trunk/src/olflange-ids.h	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/olflange-ids.h	2007-10-12 18:11:41 UTC (rev 192)
@@ -43,6 +43,45 @@
 #define IDC_T_DEBUG_LOGFILE             4113
 #define IDC_DEBUG_LOGFILE               4114
 
+/* Ids for the recipient selection dialog.  */
+#define IDD_ENC                         4201
+#define IDC_ENC_RSET1                   4210
+#define IDC_ENC_RSET2_T                 4211
+#define IDC_ENC_RSET2                   4212
+#define IDC_ENC_NOTFOUND_T              4213
+#define IDC_ENC_NOTFOUND                4214
 
+/* Ids for the two decryption dialogs.  */
+#define IDD_DEC                         4301
+#define IDD_DECEXT                      4302
+#define IDC_DEC_KEYLIST                 4310
+#define IDC_DEC_HINT                    4311
+#define IDC_DEC_PASSINF                 4312
+#define IDC_DEC_PASS                    4313
+#define IDC_DEC_HIDE                    4314
+#define IDC_DECEXT_RSET_T               4320
+#define IDC_DECEXT_RSET                 4321
+#define IDC_DECEXT_KEYLIST              4322
+#define IDC_DECEXT_HINT                 4323
+#define IDC_DECEXT_PASSINF              4324
+#define IDC_DECEXT_PASS                 4325
+#define IDC_DECEXT_HIDE                 4326
 
+/* Ids for the verification dialog.  */
+#define IDD_VRY                         4401
+#define IDC_VRY_TIME_T                  4410
+#define IDC_VRY_TIME                    4411
+#define IDC_VRY_PKALGO_T                4412
+#define IDC_VRY_PKALGO                  4413
+#define IDC_VRY_KEYID_T                 4414
+#define IDC_VRY_KEYID                   4415
+#define IDC_VRY_STATUS                  4416
+#define IDC_VRY_ISSUER_T                4417
+#define IDC_VRY_ISSUER                  4418
+#define IDC_VRY_AKALIST_T               4419
+#define IDC_VRY_AKALIST                 4420
+#define IDC_VRY_HINT                    4421
+
+
+
 #endif /*OLFLANGE_IDS_H*/

Modified: trunk/src/olflange-rsrcs.rc
===================================================================
--- trunk/src/olflange-rsrcs.rc	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/olflange-rsrcs.rc	2007-10-12 18:11:41 UTC (rev 192)
@@ -124,6 +124,161 @@
 END
 
 
+/*
+   The dialog to select recipient keys
+ */
+IDD_ENC DIALOG DISCARDABLE  0, 0, 332, 215
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "GpgOL - Select Recipients"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         "List1", IDC_ENC_RSET1,
+                    "SysListView32", LVS_REPORT | LVS_NOSORTHEADER |
+                                     WS_BORDER  | WS_TABSTOP,
+                    8, 4, 314, 92
 
+    LTEXT           "Ausgewählte Empfänger:", IDC_ENC_RSET2_T,
+                    8, 98, 130, 8
 
+    CONTROL         "List2", IDC_ENC_RSET2,
+                    "SysListView32",  LVS_REPORT | LVS_NOSORTHEADER |
+                                      WS_BORDER  | WS_TABSTOP,
+                    8, 110, 313, 49
 
+    LTEXT           "Recipient which were NOT found", IDC_ENC_NOTFOUND_T,
+                    8, 161, 128, 8
+
+    LISTBOX         IDC_ENC_NOTFOUND,
+                    8, 170, 313, 22,  LBS_SORT   | LBS_NOINTEGRALHEIGHT |
+                                      WS_VSCROLL | WS_TABSTOP
+
+    DEFPUSHBUTTON   "&OK", IDOK,
+                     221, 196, 50, 14
+
+    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
+                     273, 196, 50, 14
+END
+
+
+/* 
+   The decryption dialog used to select the secret key.
+*/
+IDD_DEC DIALOG DISCARDABLE  0, 0, 225, 101
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Secret Key Selection"
+FONT 8, "MS Sans Serif"
+BEGIN
+    COMBOBOX        IDC_DEC_KEYLIST, 
+                    9, 7, 209, 58,  CBS_DROPDOWNLIST | WS_VSCROLL | 
+                                    WS_TABSTOP
+
+    LTEXT           "", IDC_DEC_HINT,
+                    9, 25, 201, 10
+
+    LTEXT           "enter-passphrase", IDC_DEC_PASSINF,
+                    9, 37, 158, 8
+
+    EDITTEXT        IDC_DEC_PASS,
+                    9, 51, 207, 12,  ES_PASSWORD | ES_AUTOHSCROLL
+
+    CONTROL         "&Hide Typing", IDC_DEC_HIDE,
+                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+                    138, 64, 81, 10
+
+    DEFPUSHBUTTON   "&OK", IDOK,
+                    115, 83, 50, 14
+
+    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
+                    167, 83, 50, 14
+END
+
+
+/* 
+   The extended decryption dialog used to select the secret key.
+*/
+IDD_DECEXT DIALOG DISCARDABLE  0, 0, 207, 134
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "GpgOL - Secret Key Selection"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "encrypted-to",IDC_DECEXT_RSET_T,
+                    7, 4, 128, 8
+
+    LISTBOX         IDC_DECEXT_RSET,
+                    7, 16, 193, 25,  LBS_NOINTEGRALHEIGHT | 
+                                     WS_VSCROLL | WS_TABSTOP
+
+    COMBOBOX        IDC_DECEXT_KEYLIST,
+                    8, 54, 191, 14,  CBS_DROPDOWN | CBS_SORT | 
+                                     WS_DISABLED | WS_VSCROLL | WS_TABSTOP
+
+    LTEXT           "", IDC_DECEXT_HINT,
+                    7, 73, 193, 8
+
+    LTEXT           "enter-passphrase", IDC_DECEXT_PASSINF,
+                    7, 85, 158, 8
+
+    EDITTEXT        IDC_DECEXT_PASS,
+                    7, 96, 192, 12,  ES_PASSWORD | ES_AUTOHSCROLL
+
+    CONTROL         "hide-typing", IDC_DECEXT_HIDE,
+                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+                    122, 108, 81, 10
+
+    DEFPUSHBUTTON   "OK", IDOK,
+                    98, 125, 50, 14
+
+    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
+                    149, 125, 50, 14
+END
+
+
+/* 
+   The dialog to display verification results.  
+*/
+IDD_VRY DIALOG DISCARDABLE  0, 0, 253, 116
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
+CAPTION "GpgOL - Signature Verification Result"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "made-at", IDC_VRY_TIME_T,
+                    3, 6, 50, 8
+
+    EDITTEXT        IDC_VRY_TIME,
+                    55, 4, 76, 12,  ES_AUTOHSCROLL | ES_READONLY
+
+    LTEXT           "using", IDC_VRY_PKALGO_T,
+                    132, 6, 18, 8
+
+    EDITTEXT        IDC_VRY_PKALGO,
+                    152, 4, 20, 12,  ES_AUTOHSCROLL | ES_READONLY
+
+    LTEXT           "key-id", IDC_VRY_KEYID_T,
+                    174, 7, 50, 8
+
+    EDITTEXT        IDC_VRY_KEYID,
+                    196, 4, 51, 12,  ES_AUTOHSCROLL | ES_READONLY
+
+    EDITTEXT        IDC_VRY_STATUS,
+                    3, 29, 92, 12,   ES_AUTOHSCROLL | ES_READONLY
+
+    LTEXT           "from", IDC_VRY_ISSUER_T,
+                    98, 31, 14, 8
+
+    EDITTEXT        IDC_VRY_ISSUER,
+                    117, 29, 131, 13,  ES_AUTOHSCROLL | ES_READONLY
+
+    LTEXT           "aka", IDC_VRY_AKALIST_T,
+                    3, 47, 56, 8
+
+    LISTBOX         IDC_VRY_AKALIST,
+                    3, 56, 245, 25,  LBS_SORT | LBS_NOINTEGRALHEIGHT |
+                                     WS_VSCROLL | WS_TABSTOP
+
+    LTEXT           "", IDC_VRY_HINT,
+                    3, 83, 245, 10
+
+    DEFPUSHBUTTON   "&OK", IDOK,
+                    198, 96, 50, 14
+END
+

Modified: trunk/src/passphrase-dialog.c
===================================================================
--- trunk/src/passphrase-dialog.c	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/passphrase-dialog.c	2007-10-12 18:11:41 UTC (rev 192)
@@ -1,6 +1,6 @@
 /* passphrase-dialog.c
  *	Copyright (C) 2004 Timo Schulz
- *	Copyright (C) 2005, 2006 g10 Code GmbH
+ *	Copyright (C) 2005, 2006, 2007 g10 Code GmbH
  *
  * This file is part of GpgOL.
  * 
@@ -29,6 +29,7 @@
 
 #include "common.h"
 #include "gpgol-ids.h"
+#include "olflange-ids.h"
 #include "passcache.h"
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
@@ -80,7 +81,7 @@
         key_hint[i] = 0;
     }
   else
-    key_hint = xstrdup (_("No key hint given."));
+    key_hint = xstrdup (_("No certificate hint given."));
   SendDlgItemMessage (dlg, ctrlid, CB_ADDSTRING, 0, 
                       (LPARAM)(const char *)key_hint);
   SendDlgItemMessage (dlg, ctrlid, CB_SETCURSEL, 0, 0);
@@ -301,6 +302,26 @@
 }
 
 
+/* To avoid writing a dialog template for each language we use gettext
+   for the labels and hope that there is enough space in the dialog to
+   fit teh longest translation.  */
+static void
+decrypt_key_dlg_set_labels (HWND dlg)
+{
+  static struct { int itemid; const char *label; } labels[] = {
+    { IDC_DEC_PASSINF, N_("Enter passphrase to unlock the secret key")},
+    { IDC_DEC_HIDE,    N_("Hide typing")},
+    { IDCANCEL,        N_("&Cancel")},
+    { 0, NULL}
+  };
+  int i;
+
+  for (i=0; labels[i].itemid; i++)
+    SetDlgItemText (dlg, labels[i].itemid, _(labels[i].label));
+}  
+
+
+
 static BOOL CALLBACK
 decrypt_key_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
 {
@@ -327,19 +348,21 @@
                         (dec && dec->last_was_bad)?
                         _("Invalid passphrase; please try again..."):"");
 
-      if (dec && !context->use_as_cb) {
-	context->keyarray = load_secbox (dlg, IDC_DEC_KEYLIST, &n);
-	/* if only one secret key is availble, it makes no sense to
-	   ask the user to select one. */
-	if (n == 1) 
-	  {
-	    dec->signer = context->keyarray[0];
-	    gpgme_key_ref (context->keyarray[0]);
-	    EndDialog (dlg, TRUE);
-	    return FALSE;
-	  }
-      }
+      if (dec && !context->use_as_cb)
+        {
+          context->keyarray = load_secbox (dlg, IDC_DEC_KEYLIST, &n);
+          /* If only one secret key is available, it makes no sense to
+             ask the user to select one. */
+          if (n == 1) 
+            {
+              dec->signer = context->keyarray[0];
+              gpgme_key_ref (context->keyarray[0]);
+              EndDialog (dlg, TRUE);
+              return FALSE;
+            }
+        }
 
+      decrypt_key_dlg_set_labels (dlg);
       CheckDlgButton (dlg, IDC_DEC_HIDE, BST_CHECKED);
       center_window (dlg, NULL);
       if (dec && dec->hide_pwd) 
@@ -429,6 +452,25 @@
 }
 
 
+/* To avoid writing a dialog template for each language we use gettext
+   for the labels and hope that there is enough space in the dialog to
+   fit teh longest translation.  */
+static void
+decrypt_key_ext_dlg_set_labels (HWND dlg)
+{
+  static struct { int itemid; const char *label; } labels[] = {
+    { IDC_DECEXT_RSET_T,  N_("Encrypted to the following certificates:")},
+    { IDC_DECEXT_PASSINF, N_("Enter passphrase to unlock the secret key")},
+    { IDC_DECEXT_HIDE,    N_("Hide typing")},
+    { IDCANCEL,           N_("&Cancel")},
+    { 0, NULL}
+  };
+  int i;
+
+  for (i=0; labels[i].itemid; i++)
+    SetDlgItemText (dlg, labels[i].itemid, _(labels[i].label));
+}  
+
 static BOOL CALLBACK
 decrypt_key_ext_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
 {
@@ -457,6 +499,7 @@
       if (dec)
         load_recipbox (dlg, IDC_DECEXT_RSET, dec->ctx);
 
+      decrypt_key_ext_dlg_set_labels (dlg);
       CheckDlgButton (dlg, IDC_DECEXT_HIDE, BST_CHECKED);
       center_window (dlg, NULL);
       SetFocus (GetDlgItem (dlg, IDC_DECEXT_PASS));
@@ -537,10 +580,7 @@
   context.dec = &dec;
   context.no_encrypt_warning = encrypting;
 
-  if (!strncmp (gettext_localename (), "de", 2))
-    resid = IDD_DEC_DE;
-  else
-    resid = IDD_DEC;
+  resid = IDD_DEC;
   DialogBoxParam (glob_hinst, (LPCTSTR)resid, GetDesktopWindow (),
                   decrypt_key_dlg_proc, (LPARAM)&context);
 
@@ -700,20 +740,14 @@
       dec->last_was_bad = prev_was_bad;
       if (!dec->decrypt_cmd)
         {
-          if (!strncmp (gettext_localename (), "de", 2))
-            resid = IDD_DEC_DE;
-          else
-            resid = IDD_DEC;
+          resid = IDD_DEC;
           rc = DialogBoxParam (glob_hinst, (LPCSTR)resid,
                                GetDesktopWindow (),
                                decrypt_key_dlg_proc, (LPARAM)&context);
         }
       else
         {
-          if (!strncmp (gettext_localename (), "de", 2))
-            resid = IDD_DEC_EXT_DE;
-          else
-            resid = IDD_DEC_EXT;
+          resid = IDD_DECEXT;
           rc = DialogBoxParam (glob_hinst, (LPCTSTR)resid,
                                GetDesktopWindow (),
                                decrypt_key_ext_dlg_proc, (LPARAM)&context);

Modified: trunk/src/recipient-dialog.c
===================================================================
--- trunk/src/recipient-dialog.c	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/recipient-dialog.c	2007-10-12 18:11:41 UTC (rev 192)
@@ -1,6 +1,6 @@
 /* recipient-dialog.c
  *	Copyright (C) 2004 Timo Schulz
- *	Copyright (C) 2005, 2006 g10 Code GmbH
+ *	Copyright (C) 2005, 2006, 2007 g10 Code GmbH
  *
  * This file is part of GpgOL.
  * 
@@ -34,6 +34,7 @@
 
 #include "common.h"
 #include "gpgol-ids.h"
+#include "olflange-ids.h"
 
 
 #define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
@@ -372,7 +373,25 @@
     }  
 }
 
+/* To avoid writing a dialog template for each language we use gettext
+   for the labels and hope that there is enough space in the dialog to
+   fit teh longest translation.  */
+static void
+recipient_dlg_set_labels (HWND dlg)
+{
+  static struct { int itemid; const char *label; } labels[] = {
+    { IDC_ENC_RSET2_T,    N_("Selected recipients:")},
+    { IDC_ENC_NOTFOUND_T, N_("Recipient which were NOT found")},
+    { IDCANCEL,           N_("&Cancel")},
+    { 0, NULL}
+  };
+  int i;
 
+  for (i=0; labels[i].itemid; i++)
+    SetDlgItemText (dlg, labels[i].itemid, _(labels[i].label));
+}  
+
+
 BOOL CALLBACK
 recipient_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
 {
@@ -387,6 +406,7 @@
     case WM_INITDIALOG:
       rset_cb = (struct recipient_cb_s *)lparam;
       assert (rset_cb != NULL);
+      recipient_dlg_set_labels (dlg);
       initialize_rsetbox (GetDlgItem (dlg, IDC_ENC_RSET1));
       rset_cb->keyarray = load_rsetbox (GetDlgItem (dlg, IDC_ENC_RSET1),
                                         &rset_cb->keyarray_count);
@@ -396,8 +416,8 @@
         initialize_keybox (dlg, rset_cb);
       else
         {
-          /* No unknown keys and thus we need unwanted dialog windows. */
-          ShowWindow (GetDlgItem (dlg, IDC_ENC_INFO), SW_HIDE);
+          /* No unknown keys; thus we do not need the unwanted key box. */
+          ShowWindow (GetDlgItem (dlg, IDC_ENC_NOTFOUND_T), SW_HIDE);
           ShowWindow (GetDlgItem (dlg, IDC_ENC_NOTFOUND), SW_HIDE);
 	}
 
@@ -420,8 +440,9 @@
           hrset = GetDlgItem (dlg, IDC_ENC_RSET2);
           if (ListView_GetItemCount (hrset) == 0) 
             {
-              MessageBox (dlg, _("Please select at least one recipient key."),
-                          _("Recipient Dialog"), MB_ICONINFORMATION|MB_OK);
+              MessageBox (dlg, 
+                      _("Please select at least one recipient certificate."),
+                      _("Recipient Dialog"), MB_ICONINFORMATION|MB_OK);
               return TRUE;
 	    }
 
@@ -501,10 +522,7 @@
   *ret_rset = NULL;
 
   memset (&cb, 0, sizeof (cb));
-  if (!strncmp (gettext_localename (), "de", 2))
-    resid = IDD_ENC_DE;
-  else
-    resid = IDD_ENC;
+  resid = IDD_ENC;
   DialogBoxParam (glob_hinst, (LPCTSTR)resid, GetDesktopWindow(),
                   recipient_dlg_proc, (LPARAM)&cb);
   if (cb.opts & OPT_FLAG_CANCEL)
@@ -539,10 +557,7 @@
   cb.fnd_keys = fnd;
   cb.unknown_keys = unknown;
 
-  if (!strncmp (gettext_localename (), "de", 2))
-    resid = IDD_ENC_DE;
-  else
-    resid = IDD_ENC;
+  resid = IDD_ENC;
   DialogBoxParam (glob_hinst, (LPCTSTR)resid, GetDesktopWindow (),
 		  recipient_dlg_proc, (LPARAM)&cb);
 

Modified: trunk/src/verify-dialog.c
===================================================================
--- trunk/src/verify-dialog.c	2007-10-11 19:04:51 UTC (rev 191)
+++ trunk/src/verify-dialog.c	2007-10-12 18:11:41 UTC (rev 192)
@@ -125,14 +125,14 @@
   else if (!stat || (stat & GPGME_SIGSUM_GREEN))
     s = _("Good signature");
   else if (stat & GPGME_SIGSUM_KEY_REVOKED)
-    s = _("Good signature from revoked key");
+    s = _("Good signature from revoked certificate");
   else if (stat & GPGME_SIGSUM_KEY_EXPIRED)
-    s = _("Good signature from expired key");
+    s = _("Good signature from expired certificate");
   else if (stat & GPGME_SIGSUM_SIG_EXPIRED)
     s = _("Good expired signature");
   else if (stat & GPGME_SIGSUM_KEY_MISSING) 
     {
-      s = _("Could not check signature: missing key");
+      s = _("Could not check signature: missing certificate");
       no_key = 1;
     }
   else
@@ -183,14 +183,14 @@
       switch (valid) 
 	{
 	case GPGME_VALIDITY_NEVER:
-	  s = _("Signature issued by a key we do NOT trust.");
+	  s = _("Signature issued by a certificate we do NOT trust.");
 	  break;
 	  
 	default:
 	  if (no_key)
 	    s = "";
 	  else
-	    s = _("Signature issued by a non-valid key.");
+	    s = _("Signature issued by a non-valid certificate.");
 	  break;
 	}
       SetDlgItemText (dlg, IDC_VRY_HINT, s);
@@ -198,53 +198,79 @@
 }
 
 
+
+/* To avoid writing a dialog template for each language we use gettext
+   for the labels and hope that there is enough space in the dialog to
+   fit teh longest translation.  */
+static void
+verify_dlg_set_labels (HWND dlg)
+{
+  static struct { int itemid; const char *label; } labels[] = {
+    { IDC_VRY_TIME_T,   N_("Signature made")},
+    { IDC_VRY_PKALGO_T, N_("using")},
+    { IDC_VRY_KEYID_T,  N_("cert-ID")},
+    { IDC_VRY_ISSUER_T, N_("from")},
+    { IDC_VRY_AKALIST_T,N_("also known as")},
+    { 0, NULL}
+  };
+  int i;
+
+  for (i=0; labels[i].itemid; i++)
+    SetDlgItemText (dlg, labels[i].itemid, _(labels[i].label));
+}  
+
+
+
 static BOOL CALLBACK
 verify_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
 {
-    static struct dialog_context *ctx;
+  static struct dialog_context *ctx;
 
-    switch (msg) {
+  switch (msg) 
+    {
     case WM_INITDIALOG:
-      
-	ctx = (struct dialog_context *)lparam;
-	load_sigbox (dlg, ctx->res, ctx->protocol);
-	center_window (dlg, NULL);
-	SetForegroundWindow (dlg);
-        if (ctx->filename)
-          {
-            const char *s;
-
-            switch (ctx->protocol)
-              {
-              case GPGME_PROTOCOL_OpenPGP:
-                s = _("OpenPGP Verification Result");
-                break;
-              case GPGME_PROTOCOL_CMS:
-                s = _("S/MIME Verification Result");
-                break;
+      ctx = (struct dialog_context *)lparam;
+      load_sigbox (dlg, ctx->res, ctx->protocol);
+      verify_dlg_set_labels (dlg);
+      center_window (dlg, NULL);
+      SetForegroundWindow (dlg);
+      if (ctx->filename)
+        {
+          const char *s;
+          
+          switch (ctx->protocol)
+            {
+            case GPGME_PROTOCOL_OpenPGP:
+              s = _("OpenPGP Verification Result");
+              break;
+            case GPGME_PROTOCOL_CMS:
+              s = _("S/MIME Verification Result");
+              break;
               default:
                 s = "?";
                 break;
-              }
-                  
-            char *tmp = xmalloc (strlen (ctx->filename) 
-                                 + strlen (s) + 100);
-            strcpy (stpcpy (stpcpy (stpcpy (tmp, s),
-                                    " ("), ctx->filename), ")");
-            SetWindowText (dlg, tmp);
-            xfree (tmp);
+            }
+          
+          char *tmp = xmalloc (strlen (ctx->filename) 
+                               + strlen (s) + 100);
+          strcpy (stpcpy (stpcpy (stpcpy (tmp, s),
+                                  " ("), ctx->filename), ")");
+          SetWindowText (dlg, tmp);
+          xfree (tmp);
           }
-	break;
-
+      break;
+      
     case WM_COMMAND:
-	switch (LOWORD(wparam)) {
-	case IDOK:
-	    EndDialog (dlg, TRUE);
-	    break;
-	}
-	break;
+      switch (LOWORD(wparam))
+        {
+        case IDOK:
+          EndDialog (dlg, TRUE);
+          break;
+        }
+      break;
     }
-    return FALSE;
+
+  return FALSE;
 }
 
 
@@ -263,10 +289,7 @@
   ctx.protocol = protocol;
   ctx.filename = filename;
 
-  if (!strncmp (gettext_localename (), "de", 2))
-    resid = IDD_VRY_DE;
-  else
-    resid = IDD_VRY;
+  resid = IDD_VRY;
   DialogBoxParam (glob_hinst, (LPCTSTR)resid, GetDesktopWindow (),
                   verify_dlg_proc, (LPARAM)&ctx);
   return res->signatures->summary == GPGME_SIGSUM_GREEN? 0 : -1;




More information about the Gnupg-commits mailing list