<commit_before>#!/bin/sh

cd `dirname "$0"`

. ./funcs.sh

finddiffs () {
    echo "translations missing or not in the right place for language '$1':" > $1.missing
    diff -y en.str $1.str > tmp.str
    echo "Only in values/strings.xml:" >> $1.missing
    grep "<\||" tmp.str | cut -d " " -f 1 | while read s; do
	    egrep "<(string|plurals)" ../../res/values/strings.xml | grep "name=\"$s\""
    done | egrep -v '<string name="(contributors|changelog)">'>> $1.missing
    echo "Only in values-$1/strings.xml:" >> $1.missing
    grep ">\||" tmp.str | sed "s/^/x/;s/\s\s*/ /g" | cut -d " " -f 3 | while read s; do
	    egrep "<(string|plurals)" ../../res/values-$1/strings.xml | grep "name=\"$s\""
    done >> $1.missing<commit_msg>Omit non-translatable strings from findmissingtranslations script<commit_after>#!/bin/sh

cd `dirname "$0"`

. ./funcs.sh

finddiffs () {
    echo "translations missing or not in the right place for language '$1':" > $1.missing
    diff -y en.str $1.str > tmp.str
    echo "Only in values/strings.xml:" >> $1.missing
    grep "<\||" tmp.str | cut -d " " -f 1 | while read s; do
	    egrep "<(string|plurals)" ../../res/values/strings.xml | grep "name=\"$s\""
    done | egrep -v 'translatable="false"' \
         | egrep -v '<string name="(contributors|changelog)">'>> $1.missing
    echo "Only in values-$1/strings.xml:" >> $1.missing
    grep ">\||" tmp.str | sed "s/^/x/;s/\s\s*/ /g" | cut -d " " -f 3 | while read s; do
	    egrep "<(string|plurals)" ../../res/values-$1/strings.xml | grep "name=\"$s\""
    done >> $1.missing
{'fraction_non_alphanumeric': 0.218170185540627, 'fraction_numerical': 0.015355086372360844, 'mean_word_length': 2.68, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '6434659', 'n_tokens_mistral': 606, 'n_tokens_neox': 580, 'n_words': 157}