'Return all available substitutions'

@staticmethod
def _subst_for_translate(window):

    import locale
    res = {u'packages': sublime.packages_path(), u'installed_packages': sublime.installed_packages_path()}
    if window.folders():
        res[u'folder'] = window.folders()[0]
    res[u'editor'] = u'subl    -w'
    res[u'win_cmd_encoding'] = u'utf8'
    if (sublime.platform() == u'windows'):
        res[u'win_cmd_encoding'] = locale.getdefaultlocale()[1]
        res[u'editor'] = (u'"%s"' % (sys.executable,))
    av = window.active_view()
    if (av is None):
        return res
    filename = av.file_name()
    if (not filename):
        return res
    filename = os.path.abspath(filename)
    res[u'file'] = filename
    res[u'file_path'] = os.path.dirname(filename)
    res[u'file_basename'] = os.path.basename(filename)
    if (u'folder' not in res):
        res[u'folder'] = res[u'file_path']
    if sublime.load_settings(SETTINGS_FILE).get(u'use_build_system_hack', False):
        project_settings = sublimerepl_build_system_hack.get_project_settings(window)
        res.update(project_settings)
    return res
