<commit_before>#!/bin/bash

# update translations, report missing and fuzzy translations

if [ -z "$TRAVIS" ]; then
    # go into directory of script
    DIR="$( cd "$( dirname "$0" )" && pwd )"
    cd "$DIR"

    git pull -q
fi

python manage.py makemessages -l fr >&2
msggrep -v -T -e '.' locale/fr/LC_MESSAGES/django.po
awk -v RS='' '/#, fuzzy/' locale/fr/LC_MESSAGES/django.po

<commit_msg>ignore fuzzy translations when commented out<commit_after>#!/bin/bash

# update translations, report missing and fuzzy translations

if [ -z "$TRAVIS" ]; then
    # go into directory of script
    DIR="$( cd "$( dirname "$0" )" && pwd )"
    cd "$DIR"

    git pull -q
fi

python manage.py makemessages -l fr >&2
msggrep -v -T -e '.' locale/fr/LC_MESSAGES/django.po
# fuzzy translations are in a paragraph containing #, fuzzy
# but we must exclude those where msgstr is itself commented out
# (it is at BOL when not commented out, and preceded by a space otherwise)
awk -v RS='' '/#, fuzzy.*[^ ]msgstr/' locale/fr/LC_MESSAGES/django.po


{'fraction_non_alphanumeric': 0.13870029097963144, 'fraction_numerical': 0.0038797284190106693, 'mean_word_length': 3.3544303797468356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3589049', 'n_tokens_mistral': 383, 'n_tokens_neox': 332, 'n_words': 127}