<commit_before><%! from django.utils.translation import ugettext as _ %>
% if detail_url:

${_("Your {task_name} task has completed with the status '{task_status}'. Use this URL to view task details or download any files created: {detail_url}").format(task_name=task_name, task_status=task_status, detail_url=detail_url)}

% else:

${_("Your {task_name} task has completed with the status '{task_status}'. Sign in to view the details of your task or download any files created.").format(task_name=task_name, task_status=task_status)}

% endif

% if olx_validation_errors:
<%
    warnings = olx_validation_errors.get('warnings')
    errors = olx_validation_errors.get('errors')
%>
${_("Here are some validations we found with your course content.")}

% if errors:
${_("Errors: ")} ${len(errors)}
% for index, error in enumerate(errors, start=1):
  ${index}.  ${error}
% endfor
% endif

% if warnings:
${_("Warnings: ")} ${len(warnings)}
% for warning in enumerate(warnings, start=1):
  ${index}.  ${warning}
% endfor
%endif
% endif<commit_msg>Fix index bug in the email (#27353)<commit_after><%! from django.utils.translation import ugettext as _ %>
% if detail_url:

${_("Your {task_name} task has completed with the status '{task_status}'. Use this URL to view task details or download any files created: {detail_url}").format(task_name=task_name, task_status=task_status, detail_url=detail_url)}

% else:

${_("Your {task_name} task has completed with the status '{task_status}'. Sign in to view the details of your task or download any files created.").format(task_name=task_name, task_status=task_status)}

% endif

% if olx_validation_errors:
<%
    warnings = olx_validation_errors.get('warnings')
    errors = olx_validation_errors.get('errors')
%>
${_("Here are some validations we found with your course content.")}

% if errors:
${_("Errors: ")} (${len(errors)})
% for index, error in enumerate(errors, start=1):
  ${index}.  ${error}
% endfor
% endif

% if warnings:
${_("Warnings: ")} (${len(warnings)})
% for index, warning in enumerate(warnings, start=1):
  ${index}.  ${warning}
% endfor
% endif
% endif
{'fraction_non_alphanumeric': 0.14447592067988668, 'fraction_numerical': 0.00424929178470255, 'mean_word_length': 5.684542586750789, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5621977', 'n_tokens_mistral': 697, 'n_tokens_neox': 676, 'n_words': 210}