<commit_before>#LIBRARIES
import time
import json
import polib

from django.conf import settings
from django.http import HttpResponse
from django.utils import timezone
from django.utils.datastructures import SortedDict

#FLUENT
from .models import MasterTranslation, Translation
from . import cldr
from .cldr.rules import LANGUAGE_LOOKUPS


def export_translations_as_arb(masters):
    response = HttpResponse(content_type="application/arb")
    response['Content-Disposition'] = 'attachment; filename="translations.arb"'

    data = SortedDict()
    data["@@locale"] = settings.LANGUAGE_CODE
    data["@@last_modified"] = timezone.now().strftime("%Y-%m-%dT%H:%M") + str.format('{0:+06.2f}', float(time.timezone) / 3600)

    for master in masters:
        key = str(master.pk)<commit_msg>Makes fluent Django 1.9 compatible<commit_after>#LIBRARIES
import time
import json
import polib

from django.conf import settings
from django.http import HttpResponse
from django.utils import timezone
from collections import OrderedDict as SortedDict

#FLUENT
from .models import MasterTranslation, Translation
from . import cldr
from .cldr.rules import LANGUAGE_LOOKUPS


def export_translations_as_arb(masters):
    response = HttpResponse(content_type="application/arb")
    response['Content-Disposition'] = 'attachment; filename="translations.arb"'

    data = SortedDict()
    data["@@locale"] = settings.LANGUAGE_CODE
    data["@@last_modified"] = timezone.now().strftime("%Y-%m-%dT%H:%M") + str.format('{0:+06.2f}', float(time.timezone) / 3600)

    for master in masters:
        key = str(master.pk)
{'fraction_non_alphanumeric': 0.11576971214017522, 'fraction_numerical': 0.011264080100125156, 'mean_word_length': 5.1976744186046515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4516187', 'n_tokens_mistral': 518, 'n_tokens_neox': 492, 'n_words': 121}