#!/usr/bin/env bash

prev_tag=`git tag --sort=taggerdate|tail -1`

echo -e "The authors list is autogenerated from the git history; sorted by number of commits\n"

(
if [ -z $prev_tag ]; then
  git shortlog -sen
else
  git shortlog -sen ${prev_tag}..
fi
) | cut -f 2 | sed 's/@/ at /g'

#(
#if [ -z $prev_tag ]; then
#  git log --reverse|grep -i reported|cut -d':' -f2|cut -d'<' -f1|cut -d' ' -f2-|tr -d '"'
#else
#  git log ${prev_tag}.. --reverse|grep -i reported|cut -d':' -f2|cut -d'<' -f1|cut -d' ' -f2-|tr -d '"'
#fi
#) | sort -u

echo -e "\n\nThe translators list is autogenerated from po file history\n"

sed -n 's/.*Last-Translator: *\(.*\) *<.*/\1/p' po/*.po | sort -u