[snappymail] Clean up exception descriptions in MailClient.php

The messages are currently shown in the main UI as e.g.:
	Can't create folder. New folder name contains delimiter

Including a period (which seems to be the preferred style in other source
files) means that the error message would read:

	Can't create folder. New folder name contains delimiter.

Also fix two typos.
This commit is contained in:
David Härdeman 2021-08-25 17:23:57 +02:00
parent 8608c18bbe
commit 691300da51

View file

@ -2100,8 +2100,8 @@ class MailClient
// TODO: Translate
throw new \MailSo\Mail\Exceptions\RuntimeException(
\strlen($sFolderParentFullNameRaw)
? 'Cannot create folder in non-existen parent folder'
: 'Cannot get folder delimiter');
? 'Cannot create folder in non-existent parent folder.'
: 'Cannot get folder delimiter.');
}
$sDelimiter = $aFolders[0]->Delimiter();
@ -2119,7 +2119,7 @@ class MailClient
{
// TODO: Translate
throw new \MailSo\Mail\Exceptions\RuntimeException(
'New folder name contains delimiter');
'New folder name contains delimiter.');
}
$sFullNameRawToCreate = $sFolderParentFullNameRaw.$sFullNameRawToCreate;
@ -2164,7 +2164,7 @@ class MailClient
if (!$aFolders)
{
// TODO: Translate
throw new \MailSo\Mail\Exceptions\RuntimeException('Cannot '.($bRename?'rename':'move').' non-existen folder');
throw new \MailSo\Mail\Exceptions\RuntimeException('Cannot '.($bRename?'rename':'move').' non-existent folder.');
}
$sDelimiter = $aFolders[0]->Delimiter();
@ -2189,7 +2189,7 @@ class MailClient
if (\strlen($sDelimiter) && false !== \strpos($sNewFolderFullNameRaw, $sDelimiter))
{
// TODO: Translate
throw new \MailSo\Mail\Exceptions\RuntimeException('New folder name contains delimiter');
throw new \MailSo\Mail\Exceptions\RuntimeException('New folder name contains delimiter.');
}
$sFolderParentFullNameRaw = false === $iLast ? '' : \substr($sPrevFolderFullNameRaw, 0, $iLast + 1);