Mehdi ABAAKOUK [Wed, 30 May 2018 14:27:38 +0000 (16:27 +0200)]
pager: index must be rebuilt on MUTT_REOPENED
When we call mx_check_mailbox() and something change
header in Context->hdrs may have been updated.
In case of MUTT_NEW_MAIL, the page rebuild the index, and fixup
rd.index->current/max and extra->hdr. If the extra->hdr change
like when an above the opened one, or the selected one, is deleted, the
pager is closed.
In case of MUTT_REOPENED we do nothing. Making rd.index->current/max
wrong and extra->hdr perhaps pointing to something that doesn't exist
anymore.
This change makes the MUTT_REOPENED behavior similar to MUTT_NEW_MAIL.
Note that we this the pager have good change to be closed with the
mailbox is modified externally, just like the current MUTT_NEW_MAIL
behavior.
Pietro Cerutti [Wed, 30 May 2018 12:44:14 +0000 (13:44 +0100)]
Handle a BAD response in AUTH PLAIN w/o initial response (#1237)
The incorrect assumption was that the first line of an AUTH PLAIN w/o
I-R was always successful, so the client could write the second line and
end up with a readable socket that would be activated by the server
sending the final OK or BAD response.
If however the first line results in a BAD response already, the server
wouldn't write anything else and the client would be left polling for an
additional response that never arrives, effectively hanging the process.
Pietro Cerutti [Tue, 29 May 2018 15:39:23 +0000 (15:39 +0000)]
Avoid regenerating hcache/hcversion.h after building objects in hcache
Specifying the hcache directory asqa dependency for hcache/hcversion.h
means that the latter will be regenerated whenever the hcache directory
is changed, such as when object files are written into it. The net
effect is that "make; make" regenerates hcache/hcversion.h twice.
This commit fixes this problem by explicitely creating the hcache
directory as part of the hcache/hcversion.h target.
Pietro Cerutti [Tue, 29 May 2018 13:29:02 +0000 (14:29 +0100)]
Add the mutt_ch_check API (#1139)
* Add the mutt_ch_check API
This adds the mutt_ch_check API that can be used to check whether a
string can be converted between character sets. It is stricter than
mutt_ch_convert_string in that it doesn't apply any replacement chars to
unconvertible characters and doesn't return the converted string.
And i want to make clear for that:if i place %d into msgstr[0],then
msgid "Print tagged attachment" how to translate?Under my understand,if
program invokes msgid, it will display "打印 件已标记的附件",just left a
space.
Reis Radomil [Tue, 22 May 2018 14:18:53 +0000 (14:18 +0000)]
Update po files to match new code base
Most changes are splitting up plural constructions into more "saner"
versions, e.g. _("message(s)") becomes ngettext("message", "messages",
n). In all the cases we used the old translation for the new pluralised
translation (in all plural forms). This might not be correct but yields
the same result as before the change to the end user.
Reis Radomil [Tue, 22 May 2018 14:16:12 +0000 (14:16 +0000)]
opcodes.h: Fix plural messages with "<word>(s)"
Due to the implementation details we do not know whether we work with
zero, 1, 12, ... messages/files/.... So in English we use normal plural.
We leave it up to the translator to choose a fitting translation. Some
language might have other means to express this situation.
Reis Radomil [Tue, 22 May 2018 14:16:12 +0000 (14:16 +0000)]
curs_main.c: Fix plural messages with "messages"
Due to the implementation details we do not know whether we
delete/undelete/mark/... zero, 1, 12, ... messages. So in English we use
"messages". We leave it up to the translator to choose a fitting
translation. Some language might have other means to express this
situation.
Reis Radomil [Tue, 22 May 2018 14:16:12 +0000 (14:16 +0000)]
pager.c: Fix plural messages with "messages"
Due to the implementation details we do not know whether we
delete/undelete zero, 1, 12, ... messages. So in English we use
"messages". We leave it up to the translator to choose a fitting
translation. Some language might have other means to express this
situation.
Reis Radomil [Tue, 22 May 2018 14:16:12 +0000 (14:16 +0000)]
handler.c: Partly fix plural message about attachment size
Use ngettext() to choose a (more) correct plural form for 'byte'
depending on the attachment size. There is a caveat though: We do not
print the size as number but as a prettified number, e.g. 2048 will be
printed as 2K. Some languages might inflect 'byte' different depending
on whether it is '1K byte' or '1024'. Sadly there is nothing we can do
about that in the moment (besides not using the prettified version but
that is not an option).
Due to the implementation details (e.g. some passwords are managed by
gpg-agent) we cannot know whether we forgot zero, 1, 12, ... passwords.
So in English we use a generic plural. Different languages might have
other means, so we leave the decision what to choose to the translator.
to populate the buffy list when *first* opening a connection to foo.com,
but not on subsequent back-and-forth between IMAP servers.
The new code moves the LSUB call - and thus the population of the buffy
list - to just before a mailbox is selected.
This fixes the above-mentioned issue, at the cost of additional LSUB
calls when switching between mailboxes on the same server. Given that
the list of subscribed mailboxes is expected to be in the tens, I think
this is a reasonable tradeoff.
Marius Gedminas [Tue, 15 May 2018 12:03:16 +0000 (15:03 +0300)]
Update lt_LT translation
Mostly reviewing fuzzy entries in the first 60% of the file, but I also
added some missing translations and reviewed some older translations for
consistency.