def common_replacements(setting, item):
    """Maps keys to values from setting and item for replacing string
    templates.

    """
    return {"$name": setting.lower(),
            "$setting": setting,
            "$prettyname": item.py_name,
            "$doc_str": item.doc_str}