]> granicus.if.org Git - neomutt/log
neomutt
6 years agofix mkstemp comment
Richard Russon [Mon, 23 Apr 2018 11:55:28 +0000 (12:55 +0100)]
fix mkstemp comment

6 years agoAdd $browser_abbreviate_mailboxes.
Kevin McCarthy [Thu, 19 Apr 2018 20:51:07 +0000 (13:51 -0700)]
Add $browser_abbreviate_mailboxes.

This allows '=' and '~' mailboxes shortcuts to be turned off in the
browser mailbox list.

The default $sort_browser value of "alpha" uses strcoll(3), which
ignores some punctuation.  When using multiple accounts with
dynamically changing values of $folder, this can lead to an
unintuitive sorting order.  (See issue #22 for an example.)

This problem came about because of commit 8328ce68, which enabled
mutt_pretty_mailbox() calls for IMAP and POP mailboxes too.  The
commit had a valid point about consistency and too-wide mailbox
listings, so I don't really want to revert it.

This option provides an alternative to completely enable/disable the
shortcuts for those who run into an issue.

6 years agoUpdate .gitignore
Pietro Cerutti [Wed, 25 Apr 2018 14:13:27 +0000 (14:13 +0000)]
Update .gitignore

6 years agoRespect environment VISUAL and EDITOR variables
Austin Ray [Wed, 25 Apr 2018 10:34:04 +0000 (06:34 -0400)]
Respect environment VISUAL and EDITOR variables

* Respect environment VISUAL and EDITOR variables

Commit 0ef255e repositioned where Neomutt set its standard defaults in
init.c to after the logic for loading the VISUAL and EDITOR variables.
As a result, Neomutt overrides the values it retrieved from the
environment with the ones from the configuration file. This matches the
desired precedence of config->environment->code.

However, if `editor` is not set in the configuration file then Neomutt
does not retrieve EDITOR and VISUAL again. This results in Neomutt
falling back to the editor specified in the code. Thus the precedence is
config->code.

This commit returns the standard default set loop to its initial
location allowing for the environment variables to be usable.

Fixes #1162

6 years agomerge: Re-sort resources for better documents
Richard Russon [Wed, 25 Apr 2018 09:33:25 +0000 (10:33 +0100)]
merge: Re-sort resources for better documents

 * doc/neomuttrc.man.head: Sort commands
 * doc/neomuttrc.man.head: Add and fix command definitions
 * doc/neomuttrc.man.head: Small tidying
 * doc/neomuttrc.man.{head,tail}: Catch up overlooked parts
 * doc/neomutt.man: Keep man-pages consistent
 * Provide timestamp expansion and fix man pages date
 * Minor tidying of inner/trailing whitespace
 * auto.def: Use nested evaluations
 * auto.def: Simplify PACKAGE_VERSION fallback case
 * Simplify generation of man date
 * Fix man substitutions
 * Remove useless defines
 * auto.def: Refine PACKAGE_DATE comment
 * Correct */mime.types lookup order in comments
 * doc/manual.xml.head: Adapt definitions of commands
 * doc/manual.xml.head: Remove logical NOT operator
 * doc/manual.xml.head: Sort/Group command definitions
 * Rewrite manual page neomutt(1)
 * Rewrite manual page neomuttrc(5)
 * doc/manual.xml.head: Complete table command line options
 * Document command line option -l
 * main.c: Rewrite `neomutt -h` output
 * Adopt formatting and finalise syntax sanitising

6 years agoAdopt formatting and finalise syntax sanitising 1105/head
Floyd Anderson [Tue, 24 Apr 2018 04:07:58 +0000 (06:07 +0200)]
Adopt formatting and finalise syntax sanitising

6 years agomain.c: Rewrite `neomutt -h` output
Floyd Anderson [Sun, 15 Apr 2018 17:47:21 +0000 (19:47 +0200)]
main.c: Rewrite `neomutt -h` output

...and affected paragraphs in:

  • doc/manual.xml.head
  • doc/neomutt.man

6 years agoDocument command line option -l
Floyd Anderson [Fri, 13 Apr 2018 17:38:24 +0000 (19:38 +0200)]
Document command line option -l

6 years agodoc/manual.xml.head: Complete table command line options
Floyd Anderson [Fri, 13 Apr 2018 04:32:27 +0000 (06:32 +0200)]
doc/manual.xml.head: Complete table command line options

Also refine doc/neomutt.man in this conjunction.

6 years agoRewrite manual page neomuttrc(5)
Floyd Anderson [Thu, 12 Apr 2018 17:07:42 +0000 (19:07 +0200)]
Rewrite manual page neomuttrc(5)

The intended goal is to be more consistent with other documents (mainly
the full manual).

6 years agoRewrite manual page neomutt(1)
Floyd Anderson [Wed, 11 Apr 2018 17:34:15 +0000 (19:34 +0200)]
Rewrite manual page neomutt(1)

The intended goal is to be more consistent with other documents (mainly
the full manual).

6 years agodoc/manual.xml.head: Sort/Group command definitions
Floyd Anderson [Sun, 8 Apr 2018 23:30:43 +0000 (01:30 +0200)]
doc/manual.xml.head: Sort/Group command definitions

Also add, group and sort the hooks list in section “Using Hooks”.

6 years agodoc/manual.xml.head: Remove logical NOT operator
Floyd Anderson [Sun, 8 Apr 2018 22:03:27 +0000 (00:03 +0200)]
doc/manual.xml.head: Remove logical NOT operator

This optional pattern operator prefix:

  • should be known as negation operator, so no reason to mention it
  • where important, hopefully all commands describe it, like folder-hook
  • is not used on all configuration commands which support patterns and
    even it has been, that would like express a positive number 42 as +42
  • is curiously used for regex, which has the caret ‘^’ for negation
  • may mistaken as $spoolfile mailbox shortcut
  • is not special; otherwise ‘^’ prefix to match all email addresses in
    a list ^) and maybe others must also mentioned in command definitions

6 years agodoc/manual.xml.head: Adapt definitions of commands
Floyd Anderson [Sun, 8 Apr 2018 21:42:01 +0000 (23:42 +0200)]
doc/manual.xml.head: Adapt definitions of commands

6 years agoCorrect */mime.types lookup order in comments
Floyd Anderson [Fri, 6 Apr 2018 17:35:51 +0000 (19:35 +0200)]
Correct */mime.types lookup order in comments

6 years agoauto.def: Refine PACKAGE_DATE comment
Floyd Anderson [Tue, 3 Apr 2018 23:42:05 +0000 (01:42 +0200)]
auto.def: Refine PACKAGE_DATE comment

6 years agoRemove useless defines
Pietro Cerutti [Tue, 3 Apr 2018 16:24:15 +0000 (16:24 +0000)]
Remove useless defines

6 years agoFix man substitutions
Pietro Cerutti [Fri, 30 Mar 2018 13:04:40 +0000 (13:04 +0000)]
Fix man substitutions

6 years agoSimplify generation of man date
Pietro Cerutti [Fri, 30 Mar 2018 12:57:06 +0000 (12:57 +0000)]
Simplify generation of man date

6 years agoauto.def: Simplify PACKAGE_VERSION fallback case
Floyd Anderson [Mon, 26 Mar 2018 18:14:41 +0000 (20:14 +0200)]
auto.def: Simplify PACKAGE_VERSION fallback case

get-author-date() procedure:

Assuming definition of PACKAGE_VERSION and its format never change,
allows a code simplification for parsing the value as date.

6 years agoauto.def: Use nested evaluations
Floyd Anderson [Sun, 25 Mar 2018 04:37:25 +0000 (06:37 +0200)]
auto.def: Use nested evaluations

6 years agoMinor tidying of inner/trailing whitespace
Floyd Anderson [Fri, 23 Mar 2018 03:57:42 +0000 (04:57 +0100)]
Minor tidying of inner/trailing whitespace

6 years agoProvide timestamp expansion and fix man pages date
Floyd Anderson [Fri, 23 Mar 2018 03:55:31 +0000 (04:55 +0100)]
Provide timestamp expansion and fix man pages date

6 years agodoc/neomutt.man: Keep man-pages consistent
Floyd Anderson [Tue, 20 Mar 2018 17:52:24 +0000 (18:52 +0100)]
doc/neomutt.man: Keep man-pages consistent

6 years agodoc/neomuttrc.man.{head,tail}: Catch up overlooked parts
Floyd Anderson [Tue, 20 Mar 2018 17:43:11 +0000 (18:43 +0100)]
doc/neomuttrc.man.{head,tail}: Catch up overlooked parts

6 years agodoc/neomuttrc.man.head: Small tidying
Floyd Anderson [Tue, 20 Mar 2018 16:11:48 +0000 (17:11 +0100)]
doc/neomuttrc.man.head: Small tidying

6 years agodoc/neomuttrc.man.head: Add and fix command definitions
Floyd Anderson [Tue, 20 Mar 2018 15:54:16 +0000 (16:54 +0100)]
doc/neomuttrc.man.head: Add and fix command definitions

These command definitions based on generated manual.xml file.

6 years agodoc/neomuttrc.man.head: Sort commands
Floyd Anderson [Tue, 20 Mar 2018 11:27:36 +0000 (12:27 +0100)]
doc/neomuttrc.man.head: Sort commands

Sorting based on (but not entirely) generated manual.xml file.
Current exceptions are:

  • append-hook, close-hook and open-hook
  • fcc-hook, save-hook and fcc-save-hook
  • lists, unlists, subscribe and unsubscribe

because they are contextually-related commands and therefore grouped and
described together.

Further changes (consistency/readability):

  • macro .TP replaced with .PP or .IP (normal/indented paragraph)
  • command definition(s) enclosed with .nf and .fi (Nofill/Fill mode)

6 years agomerge: sanitize usage of gettext
Richard Russon [Tue, 24 Apr 2018 23:32:45 +0000 (00:32 +0100)]
merge: sanitize usage of gettext

 * I18N: ncrypt/smime.c: Remove outdated comment
 * I18N: recvattach.c: Add comment to translation string
 * I18N: Document the choice strings for translators
 * I18N: Use _() instead of N_() for marking strings for translation
 * I18N: Combine split translatable strings into one translatable string
 * I18N: ncrypt/smime.c: Translate strings and document them
 * I18N: Define ngettext macro when compiling without gettext support
 * I18N: Use ngettext to choose correct plural form
 * I18N: Use ngettext to select plural form for a string
 * I18N: Choose correct plural form in recvcmd.c
 * I18N: No need to translate "%s: %s"
 * I18N: Choose correct plural form in commands.c
 * I18N: Choose correct plural form and avoid gluing translations
 * I18N: commands.c: Do not glue translations together
 * I18N: handler.c: Do not glue translations together
 * I18N: handler.c: Pass the complete line to the translators
 * I18N: handler.c: Pass the complete line to the translators
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: handler.c: Pass the complete string to the translator
 * I18N: Unify printed string on signal caught
 * I18N: Combine help string into a single string for translation
 * I18N: version.c: Pass the complete license string to the translator
 * I18N: po/*.po updated to match new master
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files
 * I18N: Update po files to new messages
 * I18N: Update po files
 * I18N: Update po files for handler.c
 * I18N: Update po files for handler.c
 * I18N: Update po files for handler.c
 * I18N: Update po files for signal.c and mutt/signal.c
 * I18N: Update po files
 * I18N: Update po files
 * L10N: Review British English translation
 * add missing state_mark_attach()

6 years agoadd missing state_mark_attach() 1156/head
Richard Russon [Tue, 24 Apr 2018 23:12:24 +0000 (00:12 +0100)]
add missing state_mark_attach()

6 years agoL10N: Review British English translation
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
L10N: Review British English translation

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
I18N: Update po files

Merge the two old separate translations into a single translation of the
new string.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files

We merged the translations of the individual strings to a translation of
the new string. Note that for some strings the translation did not
exists. In that case we used the original English version, which yields
a mixture between English and the other language.

6 years agoI18N: Update po files for signal.c and mutt/signal.c
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files for signal.c and mutt/signal.c

The original string was changed from "Caught signal %s... Exiting.\n"
to include also the signal number:

   "Caught signal %d (%s) ...  Exiting.\n"

We adapted the translation by inserting " (%s)" after "%d" in the
translation of "Caught signal %d... Exiting.\n".

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    "[-- This is an attachment "]

    "[-- %s/%s is unsupported "]

    "(use '%s' to view this part)"]

    "(need 'view-attachments' bound to key!)"]

into a translation for the following six strings. These strings have
also a " --]\n" appended at the end.

    "[-- This is an attachment (use '%3$s' to view this part) --]\n"

    "[-- %s/%s is unsupported (use '%s' to view this part) --]\n"

    "[-- This is an attachment (need 'view-attachments' bound to key!) --]\n"

    "[-- %s/%s is unsupported (need 'view-attachments' bound to key!) --]\n"

    "[-- This is an attachment --]\n"

    "[-- %s/%s is unsupported --]\n"

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    s1 =
    "[-- This %s/%s attachment is not included, --]\n"

    s2 =
    "[-- and the indicated access-type %s is unsupported --]\n"

into one translation for the single string

    s_new =
    "[-- This %s/%s attachment is not included, --]\n"
    "[-- and the indicated access-type %s is unsupported --]\n"

Four translators (Galician (gl), Lithuanian (lt), Slovak (sk), Taiwanese
Mandarin (zh_WT)) seemed to have translated the old s2 as "s1 s2", so
the translation of s_new would have a doubling at the start. In these
versions we modified the translation to not have this doubling.

6 years agoI18N: Update po files for handler.c
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: Update po files for handler.c

Combine the old translations of the chopped strings

    s1 =
    "[-- This %s/%s attachment is not included, --]\n"

    s2 =
    "[-- and the indicated external source has --]\n"
    "[-- expired. --]\n"

into one translation for the single string

    s_new =
    "[-- This %s/%s attachment is not included, --]\n"
    "[-- and the indicated external source has --]\n"
    "[-- expired. --]\n"

Four translators (Galician (gl), Lithuanian (lt), Slovak (sk), Taiwanese
Mandarin (zh_WT)) seemed to have translated the old s2 as "s1 s2", so
the translation of s_new would have a doubling at the start. In these
versions we modified the translation to not have this doubling.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: Update po files

The old translations where build together in the C code. Now we pass the
complete string to gettext. Update the po files and combine the old
translations into new ones.

In the old version the strings translated where

    "[-- This %s/%s attachment "

    "(size %s bytes) "

    "has been deleted --]\n"

    "[-- on %s --]\n"

The four new strings are

    "[-- This %s/%s attachment (size %s bytes) has been deleted --]\n"
    "[-- on %s --]\n"

    "[-- This %s/%s attachment (size %s bytes) has been deleted --]\n"

    "[-- This %s/%s attachment has been deleted --]\n
    "[-- on %4$s --]\n"

    "[-- This %s/%s attachment has been deleted --]\n"

6 years agoI18N: Update po files to new messages
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: Update po files to new messages

The old translation was for "[-- Attachment #%d" and was extended in the
C code by either " --]" or ": %s --]". Now we translate the
complete string.

Update the po files to reflect this. Reuse the old translation and
append " --]" or ": %s --]" to it, respectively.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: Update po files

Join the old translations of

    "[-- Alternative Type #%d: "
    "[-- Type: "
    "%s/%s%s%s, Encoding: %s, Size: %s --]\n"

together to the translations of

    "[-- Alternative Type #%d: %s/%s%s%s, Encoding: %s, Size: %s --]\n"
    "[-- Type: %s/%s%s%s, Encoding: %s, Size: %s --]\n"

Some notes:

* Some translators translated "%s/%... ---]" with "[-- %s/%...  --]"
  (note the leading "[--" in the translation).  Thus, the new
  translation is "[-- .. [-- ... --]" which is kinda odd but still the
  same string as would previously be displayed to the user.

* The new string "[-- Alternative Type #%d: ... --]" has an additional
  parameter "%d". Some translators ignored it in their translation of
  the old "[-- Alternative Type #%d: " (by not translating it), so that
  the index for the '%s' would be off.

  This applies to the majority of translations. However, most of them
  are out of date and do not have enough '%s', to event print the old
  string correctly, i.e. "A %s%s B %s" was translated with "A %s B %s".
  We ignored those languages as a translator must take care of this.

  There were two exceptions, however, Polish (pl) and Turkish (tr).
  We used the untranslated version of "[-- Alternative Type #%d: " and
  "[-- Type: " and appended it to the start of the translation.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: Update po files

Merge the old translation of

    "Character set changed to %s; %s."

together with the translations of

    "not converting"
or

    "converting"

respectively, by replacing the second '%s' with the translated string.
The resulting translation might not be correct but it is better than
nothing. Although it is the current translation by NeoMutt as this merge
was done previously in the C code.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Update po files

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Update po files

Combine the separated singular and plural translations into a single
translation. For languages with more than a single plural form, the old
plural form is used in any case. This might not be correct but is better
than nothing (it also is the current behaviour).

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: Update po files

Combine the separated singular and plural translations into a single
translation. For languages with more than a single plural form, the old
plural form is used in any case. This might not be correct but is better
than nothing (it also is the current behaviour).

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Update po files

We merged the two translations of the singular message and plural
messages into one translation. If the language has more than one plural
the old plural translation is used for any plural form of the language.
This might not be accurate but more precise than leaving the plural
completely untranslated.

All the new places were marked as fuzzy.

6 years agoI18N: Update po files
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Update po files

Translations for the strings "s1" and "s2" which are now "s1 s2"  were
concatenated except for the cases where a translation of s1 or s2 was
not present.

6 years agoI18N: po/*.po updated to match new master
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: po/*.po updated to match new master

No changes to messages

6 years agoI18N: version.c: Pass the complete license string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:05 +0000 (04:16 +0000)]
I18N: version.c: Pass the complete license string to the translator

This partly reverses commit 9b7faeeb7eb3dd436444c98c662ab1656fb9ba14.

6 years agoI18N: Combine help string into a single string for translation
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Combine help string into a single string for translation

Do not chop the help string into multiple parts instead pass the
complete string on for translation.

Reverts partly 9b7faeeb7eb3dd436444c98c662ab1656fb9ba14.

6 years agoI18N: Unify printed string on signal caught
Reis Radomil [Sun, 22 Apr 2018 04:16:04 +0000 (04:16 +0000)]
I18N: Unify printed string on signal caught

Also include the signal number in the output.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:03 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete string to the translator
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete string to the translator

Pass the complete string to the translator instead of chopping it into
pieces and translate every piece.

6 years agoI18N: handler.c: Pass the complete line to the translators
Reis Radomil [Sun, 22 Apr 2018 04:16:02 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete line to the translators

Pass the complete string "This %s/%s attachment has been deleted on %s"
to gettext and not single parts gluing them together afterwards.

Although it is tempting to toggle optional sentence parts at the end,
this is a bad idea as this might not work in all languages since these
might have special rules (compare "manner before place before time" rule
for adverbs in the end-position or subject-verb-object order in English).

6 years agoI18N: handler.c: Pass the complete line to the translators
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: handler.c: Pass the complete line to the translators

6 years agoI18N: handler.c: Do not glue translations together
Reis Radomil [Sun, 22 Apr 2018 04:16:01 +0000 (04:16 +0000)]
I18N: handler.c: Do not glue translations together

Do not use this antipattern:

  printf(_("some %s sentence."), b ? _("big") : _("small"));

as the translation of "big"/"small" and depends on the sentence it is
used in. Instead give the translator the complete sentence:

  if (b)
    printf(_("some big sentence."));
  else
    printf(_("some small sentence."));

6 years agoI18N: commands.c: Do not glue translations together
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: commands.c: Do not glue translations together

Do not use this antipattern:

  printf(_("some %s sentence."), b ? _("big") : _("small"));

as the translation of "big"/"small" and depends on the sentence it is
used in. Instead give the translator the complete sentence:

  if (b)
    printf(_("some big sentence."));
  else
    printf(_("some small sentence."));

6 years agoI18N: Choose correct plural form and avoid gluing translations
Reis Radomil [Sun, 22 Apr 2018 04:16:00 +0000 (04:16 +0000)]
I18N: Choose correct plural form and avoid gluing translations

Split up the horrible construction of choosing the plural and gluing
translations together. This should make the job of a translator easier.

Gluing translations is

   printf(_("Decode-save%s to mailbox"), h ? _("") : _(" tagged"));

instead of the better

   if (h)
     printf(_("Decode-save to mailbox"));
   else
     printf(_("Decode-save tagged to mailbox"));

6 years agoI18N: Choose correct plural form in commands.c
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: Choose correct plural form in commands.c

Choose the correct plural depending on the number of messages handled.
Some choices are between one and not one as the precise number of
messages is not known. A clarifying comment is added for the translator
in these cases.

6 years agoI18N: No need to translate "%s: %s"
Reis Radomil [Sun, 22 Apr 2018 04:15:59 +0000 (04:15 +0000)]
I18N: No need to translate "%s: %s"

6 years agoI18N: Choose correct plural form in recvcmd.c
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Choose correct plural form in recvcmd.c

6 years agoI18N: Use ngettext to select plural form for a string
Reis Radomil [Sun, 22 Apr 2018 04:15:58 +0000 (04:15 +0000)]
I18N: Use ngettext to select plural form for a string

Convert some occurrences of

   printf("%d things", n);

to

   printf(ngettext("%d thing", "%d things", n), n);

6 years agoI18N: Use ngettext to choose correct plural form
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Use ngettext to choose correct plural form

Avoid the antipattern

   printf(n == 1 ? _("one thing") : _("%d things"), n);

instead use

   printf(ngettext("one thing", "%d things", n), n);

(note: n has to be passed to ngettext and printf)

Although most Germanic languages (including English) use the singular
form for n=1 and a (single) plural form for all other n (including n=0),
this is not the case in general. An example from the GNU gettext manual
[0] for Polish work plik (file):

1 plik
2,3,4 pliki
5-21 pliko'w
22-24 pliki
25-31 pliko'w

When using numbers in translatable strings, do not choose the translated
plural form in the code. Instead let GNU gettext capability pick the
correct translated plural (provided by a translator) depending on the
number.

[0] https://www.gnu.org/software/gettext/manual/html_chapter/gettext.html#Plural-forms

6 years agoI18N: Define ngettext macro when compiling without gettext support
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Define ngettext macro when compiling without gettext support

6 years agoI18N: ncrypt/smime.c: Translate strings and document them
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: ncrypt/smime.c: Translate strings and document them

Add a comment for translators that the strings must be padded with
spaces.

Also do actually translate the strings (using '_()') and not only mark
them for translation with 'N_()'.

6 years agoI18N: Combine split translatable strings into one translatable string
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Combine split translatable strings into one translatable string

Translatable strings should not be split in the middle but be one
self-contained and complete unit of thought. In particular do not split
them arbitrary at the end of a sentence.

Replace

  s1 = _("sentence 1.");
  printf("%s sentence2.", s1);

with

  s = _("sentence 1. sentence 2.");
  printf("%s", s);

6 years agoI18N: Use _() instead of N_() for marking strings for translation
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Use _() instead of N_() for marking strings for translation

Use _() directly instead of N_() followed by _() for strings where
this is applicable, i.e.

   s = N_("string");
   printf("...", _(s));

becomes

   s = _("string")
   printf("...", s);

6 years agoI18N: Document the choice strings for translators
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: Document the choice strings for translators

Document that the choice string (which contains the characters for the
choice) must match up with the translated string of the question.

6 years agoI18N: recvattach.c: Add comment to translation string
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: recvattach.c: Add comment to translation string

Document the '%s' parameter for translators.

6 years agoI18N: ncrypt/smime.c: Remove outdated comment
Reis Radomil [Sun, 22 Apr 2018 04:15:57 +0000 (04:15 +0000)]
I18N: ncrypt/smime.c: Remove outdated comment

The corresponding code to the comment was changed in
49a037a67b91e5965f747630f783804e60567d14.

6 years agomutt/file.c: split mutt_file_{lock,unlock} into flock/fcntl versions
Lars Kellogg-Stedman [Sun, 22 Apr 2018 00:42:28 +0000 (20:42 -0400)]
mutt/file.c: split mutt_file_{lock,unlock} into flock/fcntl versions

this splits mutt_file_lock and mutt_file_unlock into separate
fcntl() and flock() based versions.  It teaches ./configure
about the new --with-lock option (--with-lock=fcntl or
--with-lock=flock).

Includes updates to INSTALL and AUTOSETUP.md that reference the
removed --enable-fcntl and --enable-flock options.

Closes #1147

6 years agomutt/logging.c: set line buffering for logging stream
Vladimir Zakharov [Sun, 22 Apr 2018 17:15:32 +0000 (20:15 +0300)]
mutt/logging.c: set line buffering for logging stream

6 years agoinit.c: convert MyVars to use TAILQ
Vladimir Zakharov [Sat, 21 Apr 2018 22:15:36 +0000 (01:15 +0300)]
init.c: convert MyVars to use TAILQ

6 years agoRename and make another file-level variable static
Pietro Cerutti [Mon, 23 Apr 2018 13:37:14 +0000 (13:37 +0000)]
Rename and make another file-level variable static

6 years agoMake a file-level variable static
Pietro Cerutti [Mon, 23 Apr 2018 13:35:38 +0000 (13:35 +0000)]
Make a file-level variable static

6 years agoAvoid naming queue heads that are not referenced by name
Pietro Cerutti [Mon, 23 Apr 2018 12:48:32 +0000 (12:48 +0000)]
Avoid naming queue heads that are not referenced by name

6 years agoUpdate to latest autosetup
Pietro Cerutti [Mon, 23 Apr 2018 10:04:58 +0000 (10:04 +0000)]
Update to latest autosetup

6 years agoinit.c: remove unnecessary newline
Floyd Anderson [Sat, 14 Apr 2018 18:44:31 +0000 (20:44 +0200)]
init.c: remove unnecessary newline

6 years agoRefactor several callers of mutt_mktemp() to mutt_file_mkstemp()
Will Curry [Wed, 18 Apr 2018 03:32:04 +0000 (22:32 -0500)]
Refactor several callers of mutt_mktemp() to mutt_file_mkstemp()

6 years agoAdd mutt_file_mkstemp() to create temp file using mkstemp()
Will Curry [Wed, 18 Apr 2018 03:31:03 +0000 (22:31 -0500)]
Add mutt_file_mkstemp() to create temp file using mkstemp()

Relocated Tmpdir from globals.h to mutt library.

6 years agomerge: tidy the guide's docbook
Richard Russon [Sat, 21 Apr 2018 12:00:25 +0000 (13:00 +0100)]
merge: tidy the guide's docbook

 * Add Vim modeline
 * Reformat <screen> elements: too long or multi lines
 * Reformat <para> elements: indentation/wrapping
 * Reformat list/table elements: indentation/wrapping
 * Reformat new master commits (<para>, whitespace)

6 years agoReformat new master commits (<para>, whitespace)
Floyd Anderson [Sat, 21 Apr 2018 03:04:25 +0000 (05:04 +0200)]
Reformat new master commits (<para>, whitespace)

6 years agoReformat list/table elements: indentation/wrapping
Floyd Anderson [Thu, 19 Apr 2018 18:37:21 +0000 (20:37 +0200)]
Reformat list/table elements: indentation/wrapping

...to unify their children, tidy dashes and whitespace, add missing
items and reposition some anchor tags.

6 years agoReformat <para> elements: indentation/wrapping
Floyd Anderson [Thu, 19 Apr 2018 03:42:01 +0000 (05:42 +0200)]
Reformat <para> elements: indentation/wrapping

...and tidy dashes, trailing whitespace, try to fix all spaces around
brackets and punctuation marks etc., e.g. keep link tags on the same
line to avoid an underlined space after hyperlinks in rendered result.

6 years agoReformat <screen> elements: too long or multi lines
Floyd Anderson [Wed, 18 Apr 2018 03:37:24 +0000 (05:37 +0200)]
Reformat <screen> elements: too long or multi lines

...and tidy comments, dashes, potential Vim modelines, whitespace.

6 years agoAdd Vim modeline
Floyd Anderson [Tue, 17 Apr 2018 21:15:03 +0000 (23:15 +0200)]
Add Vim modeline

6 years agodoxygen: Add lots of new comment blocks
Richard Russon [Thu, 19 Apr 2018 16:13:51 +0000 (17:13 +0100)]
doxygen: Add lots of new comment blocks

6 years agodoxygen: Fix, improve, tidy comment blocks
Richard Russon [Thu, 19 Apr 2018 16:38:59 +0000 (17:38 +0100)]
doxygen: Fix, improve, tidy comment blocks

6 years agomerge: minor changes
Richard Russon [Tue, 17 Apr 2018 20:45:40 +0000 (21:45 +0100)]
merge: minor changes

 * Add a comment in auth_gss about RFCs and null-termination.
 * validate docs
 * fix the case of some variables
 * rename convert_to_7bit
 * doxy: add headers

6 years agodoxy: add headers
Richard Russon [Thu, 12 Apr 2018 10:00:59 +0000 (11:00 +0100)]
doxy: add headers

6 years agorename convert_to_7bit
Richard Russon [Tue, 17 Apr 2018 19:35:23 +0000 (20:35 +0100)]
rename convert_to_7bit

6 years agofix the case of some variables
Richard Russon [Sat, 14 Apr 2018 15:00:30 +0000 (16:00 +0100)]
fix the case of some variables

6 years agovalidate docs
Richard Russon [Thu, 12 Apr 2018 22:36:05 +0000 (23:36 +0100)]
validate docs

6 years agoAdd a comment in auth_gss about RFCs and null-termination.
Kevin McCarthy [Sun, 15 Apr 2018 22:57:28 +0000 (15:57 -0700)]
Add a comment in auth_gss about RFCs and null-termination.

6 years agoDocument the config priority
Richard Russon [Sun, 15 Apr 2018 20:37:34 +0000 (21:37 +0100)]
Document the config priority

6 years agoAdjust the precedence of some more config items
Richard Russon [Mon, 9 Apr 2018 17:08:24 +0000 (18:08 +0100)]
Adjust the precedence of some more config items

6 years agoLet config file have precedence over environment
Pietro Cerutti [Thu, 12 Apr 2018 09:58:59 +0000 (09:58 +0000)]
Let config file have precedence over environment

Issue #1140

6 years agoadd support for idn2 (IDNA2008)
Pietro Cerutti [Tue, 20 Feb 2018 13:34:14 +0000 (13:34 +0000)]
add support for idn2 (IDNA2008)

6 years agoImprove gss debug printing of status_string.
Kevin McCarthy [Sat, 14 Apr 2018 03:39:35 +0000 (20:39 -0700)]
Improve gss debug printing of status_string.

Commit f52ee2f7 ensured the debug strings were properly '\0'
terminated.  However, it did not prevent the strncpy from reading past
the end of the status_string.value data; it simply capped it
afterwards.  Improve the code so it only reads up to
status_string.length without overwriting the buffer.

6 years agoRemove trailing null count from gss_buffer_desc.length field.
Kevin McCarthy [Sat, 14 Apr 2018 02:03:29 +0000 (19:03 -0700)]
Remove trailing null count from gss_buffer_desc.length field.

RFC 2744 section 3.2.2 clearly states that trailing NULL characters
are not to be included in the length field, and are not to be assumed
to be present in the value field.

Thanks to Greg Hudson, who recently debugged this same issue with
fetchmail, and kindly took the time to look at Mutt's code too.