Richard Russon [Wed, 2 May 2018 18:05:12 +0000 (19:05 +0100)]
merge: Add support for multipart/multilingual emails
* Initial support for multipart/alternative
* support for multipart/alternative and multipart/mixed
* inline parts of a multipart/alternative email
* Clear the filename of an inline part
* clean up redraw
* Implement RFC8255 - multilingual email parts
* Enable editing of multipart/multilingual mails
* remove content-language checking when composing
* add doc for multipart/{alternative,multilingual}
message.c: retry message parse if first attempt is zero-length
On IMAP failure the message body can sometimes be truncated, which
leaves an empty message in the cache that must be manually deleted
to be properly re-fetched.
If the cached message body is zero-length, retry the message parse
once to be sure that the message body actually *is* empty.
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.
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.
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
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()
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.
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.
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.
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"
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.
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.
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).
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).
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.
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.
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).
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.
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):
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.
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.
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.