If wl_dir is given, there may be a file called "<lang>.txt". If this is
        the case, this should be the wordlist we are looking for.

def get_wordlist(lang, wl_dir, po_path):
        #print("Looking for Wordlist in:\nlang {}\nwl_dir {}\npo_path {}".format(lang, wl_dir, po_path))
        po_path = os.path.abspath(po_path)

        """
        If wl_dir is given, there may be a file called "<lang>.txt". If this is
        the case, this should be the wordlist we are looking for.
        """
        if wl_dir is not None:
            wl_path = os.path.join(wl_dir, lang + '.txt')
            if os.path.isfile(wl_path):
                return wl_path

        """
        If wl_dir is not given, the wordlist should live in a file named
        "wordlist.txt" either in the locales_dir for the default language or in
        the same directory as the .po-files
        """
        if po_path.endswith("po"):
            # translated language
            po_dir = os.path.dirname(po_path)
            for f in os.scandir(po_dir):
                if f.name == "wordlist.txt":
                    #print("found wordlist in", f.path)
                    return f.path
            #print("Checked po-dir, None Found")

            """
            If no file was found so far, the po-files seem to lie in
            <lang>/LC_MESSAGES, and the wordlist should be in the directory
            above.
            """
            if os.path.basename(po_dir) == "LC_MESSAGES":
                for f in os.scandir(os.path.join(po_dir, "..")):
                    if f.name == "wordlist.txt":
                        #print("found wordlist in", f.path)
                        return f.path
            #print("Checked LC_MESSAGES-dir. none found")
        #print("Checked lang-specific files")

        if os.path.isdir(po_path):
            # default language
            for f in os.scandir(po_path):
                if f.name == "wordlist.txt":
                    #print("found wordlist in", f.path)
                    return f.path
        #print("If this shows up, no wordlist was found")
        return None