X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffunctions.php;h=08fa13dc1783c29bcdaf8fe0502ea790e97c86d1;hb=4867976d90c806a03bb0848886f1e175c68cf3a4;hp=c85d6fde9ab3ecafe1d007323eb746dac57a7dd4;hpb=2e613a3df528029df9b10f2b5bbf0089c405cc7f;p=mailer.git diff --git a/inc/functions.php b/inc/functions.php index c85d6fde9a..08fa13dc17 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2410,6 +2410,24 @@ function translateTaskType ($taskType) { return $message; } +// Translates points subject to human-readable +function translatePointsSubject ($subject) { + // Construct message id + $messageId = 'POINTS_SUBJECT_' . strtoupper($subject) . ''; + + // Is the message id there? + if (isMessageIdValid($messageId)) { + // Then construct message + $message = '{--' . $messageId . '--}'; + } else { + // Else it is an unknown task type + $message = '{%message,POINTS_SUBJECT_UNKNOWN=' . $subject . '%}'; + } // END - if + + // Return message + return $message; +} + // "Translates" 'true' to true and 'false' to false function convertStringToBoolean ($str) { // Trim it lower-case for validation