]> granicus.if.org Git - neomutt/commitdiff
Add L10N translation message comments
authorKevin McCarthy <kevin@8t8.us>
Fri, 26 Jul 2019 23:27:04 +0000 (16:27 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:27 +0000 (00:14 +0100)
Co-authored-by: Richard Russon <rich@flatcap.org>
autocrypt/autocrypt.c
autocrypt/autocrypt_db.c
autocrypt/autocrypt_gpgme.c
compose.c

index 0216bdea20ae6946decf85127e37c68c9f4e7e2f..42cf5d457ee580469914e2008403820465d2c1ae 100644 (file)
@@ -51,11 +51,20 @@ static int autocrypt_dir_init(int can_create)
     return -1;
 
   prompt = mutt_buffer_pool_get();
+  /* L10N:
+     %s is a directory.  Mutt is looking for a directory it needs
+     for some reason (e.g. autocrypt, header cache, bcache), but it
+     doesn't exist.  The prompt is asking whether to create the directory
+  */
   mutt_buffer_printf(prompt, _("%s does not exist. Create it?"), C_AutocryptDir);
   if (mutt_yesorno(mutt_b2s(prompt), MUTT_YES) == MUTT_YES)
   {
     if (mutt_file_mkdir(C_AutocryptDir, S_IRWXU) < 0)
     {
+      /* L10N:
+         mkdir() on the directory %s failed.  The second %s is the
+         error message returned by libc
+      */
       mutt_error(_("Can't create %s: %s."), C_AutocryptDir, strerror(errno));
       rv = -1;
     }
@@ -122,6 +131,11 @@ int mutt_autocrypt_account_init(void)
 
   do
   {
+    /* L10N:
+       Autocrypt is asking for the email address to use for the
+       autocrypt account.  This will generate a key and add a record
+       to the database for use in autocrypt operations.
+    */
     if (mutt_edit_address(&al, _("Autocrypt account address: "), 0) != 0)
       goto cleanup;
 
@@ -130,7 +144,8 @@ int mutt_autocrypt_account_init(void)
     {
       /* L10N:
          Autocrypt prompts for an account email address, and requires
-         a single address.
+         a single address.  This is shown if they entered something invalid,
+         nothing, or more than one address for some reason.
       */
       mutt_error(_("Please enter a single email address"));
       done = false;
index 2e628ef0d3a9f511266894309334b3fd2f0c857f..5fd7281643bbb486177ba6aecb516634ba622b76 100644 (file)
@@ -44,6 +44,10 @@ static int autocrypt_db_create(const char *db_path)
   if (sqlite3_open_v2(db_path, &AutocryptDB,
                       SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL) != SQLITE_OK)
   {
+    /* L10N:
+       %s is the path to the database.  For some reason sqlite3 failed
+       to open that database file.
+    */
     mutt_error(_("Unable to open autocrypt database %s"), db_path);
     return -1;
   }
index f8c33be3a0fb9db39291a2ae75b29eb335055061..32ad6b1912f7ddd3c2daf3e8cb3d6663d9669fbe 100644 (file)
@@ -135,6 +135,10 @@ int mutt_autocrypt_gpgme_create_key(struct Address *addr, struct Buffer *keyid,
                            GPGME_CREATE_NOPASSWD | GPGME_CREATE_FORCE | GPGME_CREATE_NOEXPIRE);
   if (err)
   {
+    /* L10N:
+       GPGME was unable to generate a key for some reason.
+       %s is the error message returned by GPGME.
+    */
     mutt_error(_("Error creating autocrypt key: %s\n"), gpgme_strerror(err));
     goto cleanup;
   }
index 79caa1056d9569a07a7d4e6a130ca78aba9ca45d..10b60fb83216e06a3a8b39a9076c2fa915ce58c0 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -330,7 +330,7 @@ static void autocrypt_compose_menu(struct Email *e)
      The letter corresponding to the compose menu autocrypt prompt
      (e)ncrypt, (c)lear, (a)utomatic
    */
-  const char *letters = "eca";
+  const char *letters = _("eca");
 
   int choice = mutt_multi_choice(prompt, letters);
   switch (choice)