X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fdev%2Fmake_credits.py;h=d8952139095a598ae56395734b9d7a6b04ea56dc;hb=b7b30862631a1c5cae424289489409d02dadc7a9;hp=edd34c7515d0094b81a3c900a870956493676d1a;hpb=48aafe466234c7ccd8d3d2743a5306bc73e1e9e8;p=friendica.git diff --git a/bin/dev/make_credits.py b/bin/dev/make_credits.py index edd34c7515..d895213909 100755 --- a/bin/dev/make_credits.py +++ b/bin/dev/make_credits.py @@ -5,7 +5,7 @@ This script will collect the contributors to friendica and its translations from * the git log of the friendica core and addons repositories * the translated messages.po from core and the addons. -The collected names will be saved in /util/credits.txt which is also parsed from +The collected names will be saved in CREDITS.txt which is also parsed from yourfriendica.tld/credits. The output is not perfect, so remember to open a fresh (re)created credits.txt file @@ -23,10 +23,12 @@ import os, glob, subprocess # not work in some cases. dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m', 'leberwurscht', 'abinoam', 'fabrixxm', 'FULL NAME', 'Hauke Zuehl', - 'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', 'Alberto Díaz'] + 'Michal Supler', 'michal_s', 'Manuel Pérez', 'rabuzarus', + 'Alberto Díaz', 'hoergen oostende', 'Friendica', 'vinzv', + 'Vincent Vindarel'] -# this script is in the /util sub-directory of the friendica installation +# this script is in the /bin/dev directory of the friendica installation # so the friendica path is the 0th argument of calling this script but we # need to remove the name of the file and the name of the directory path = os.path.abspath(argv[0].split('bin/dev/make_credits.py')[0]) @@ -88,10 +90,14 @@ for f in glob.glob(path+'/addon/*/lang/*/messages.po'): for ll in l: if intrans and ll.strip()=='': intrans = False; - if intrans and ll[0]=='#': - name = ll.split('# ')[1].split(',')[0].split(' <')[0] - if not name in contributors and name not in dontinclude: - contributors.append(name) + # at this point Transifex sometimes includes a "#, fuzzy" we eill + # ignore all lines starting with "#," as they do not contains any + # "Name email, year" information. + if not "#," in ll: + if intrans and ll[0]=='#': + name = ll.split('# ')[1].split(',')[0].split(' <')[0] + if not name in contributors and name not in dontinclude: + contributors.append(name) if "# Translators:" in ll: intrans = True # done with the translators @@ -101,7 +107,7 @@ print(' > found %d translators' % (n3-n2)) print('> found a total of %d contributors and translators' % n3) contributors.sort(key=str.lower) -f = open(path+'/util/credits.txt', 'w') +f = open(path+'/CREDITS.txt', 'w') f.write("\n".join(contributors)) f.close() -print('> list saved to util/credits.txt') +print('> list saved to CREDITS.txt')