protected File determineEmailTemplateFile() {
        return locale.map(Unchecked.function(loc -> {
            val originalFile = new File(properties.getText());
            val localizedName = String.format("%s_%s.%s", FilenameUtils.getBaseName(originalFile.getName()),
                loc.getLanguage(), FilenameUtils.getExtension(originalFile.getName()));
            val localizedFile = new File(originalFile.getParentFile(), localizedName);
            LOGGER.trace("Checking for localized email template file at [{}]", localizedFile.getPath());
            if (ResourceUtils.doesResourceExist(localizedFile.getPath())) {
                val templateResource = ResourceUtils.getRawResourceFrom(localizedFile.getPath());
                return templateResource.getFile();
            }
            return getDefaultEmailTemplateFile();
        })).orElseGet(Unchecked.supplier(this::getDefaultEmailTemplateFile));
    }
Add parameter.

@param key    the key
@param object the object
@return the email message body builder
core/cas-server-core-notifications-api/src/main/java/org/apereo/cas/notifications/mail/EmailMessageBodyBuilder.java