]> granicus.if.org Git - neomutt/commitdiff
I18N: handler.c: Pass the complete string to the translator
authorReis Radomil <reisradomil@fake-box.com>
Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 24 Apr 2018 20:30:56 +0000 (21:30 +0100)
Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

handler.c

index 2de4db5975885009542d8d2fce8969cb953834b7..2a7deeb75666895c0e12b43d323387ac2e269d8e 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1586,11 +1586,18 @@ static int external_body_handler(struct Body *b, struct State *s)
   {
     if (s->flags & MUTT_DISPLAY)
     {
-      state_mark_attach(s);
-      state_printf(s, _("[-- This %s/%s attachment is not included, --]\n"),
-                   TYPE(b->parts), b->parts->subtype);
-      state_mark_attach(s);
-      state_printf(s, _("[-- and the indicated access-type %s is unsupported --]\n"), access_type);
+      /* L10N: If the translation of this string is a multi line string, then
+         each line should start with "[-- " and end with " --]".
+         The "%s/%s" is a MIME type, e.g. "text/plain".  The %s after
+         access-type is an access-type as defined by the MIME RFCs, e.g. "FTP",
+         "LOCAL-FILE", "MAIL-SERVER".
+       */
+      snprintf(strbuf, sizeof(strbuf),
+               _("[-- This %s/%s attachment is not included, --]\n"
+                 "[-- and the indicated access-type %s is unsupported --]\n"),
+               TYPE(b->parts), b->parts->subtype, access_type);
+      state_attach_puts(strbuf, s);
+
       mutt_copy_hdr(s->fpin, s->fpout, ftello(s->fpin), b->parts->offset,
                     (Weed ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_DISPLAY, NULL);
     }