import logging
import os
import sys
import googkit.lib.path
import googkit.lib.plugin
from googkit.lib.argument import ArgumentParser
from googkit.lib.command_tree import CommandTree
from googkit.lib.environment import Environment
from googkit.lib.error import GoogkitError
from googkit.lib.error import InvalidOptionError
from googkit.lib.i18n import _
from googkit.lib.help import Help


VERSION = '0.2.0'


def print_version():
    print(_('googkit {version}').format(version=VERSION))


def main():
    cwd = os.getcwd()
    logging.basicConfig(level=logging.INFO, format='%(message)s')
    tree = CommandTree()
    googkit.lib.plugin.load(tree)

    arg = ArgumentParser.parse(sys.argv)

    if not arg.commands and arg.option('--version'):
        print_version()
        sys.exit()

    CommandClass = tree.command_class(arg.commands)
    if CommandClass is None:
        Help(tree, arg).print_help()
        sys.exit()

    try:
        env = Environment(cwd, arg, tree)
        command = CommandClass(env)
        command.run()
    except InvalidOptionError as e:
        logging.error(_('[Error] {error}').format(error=str(e)))
        Help(tree, arg).print_help()
        sys.exit(1)
    except GoogkitError as e:
        logging.error(_('[Error] {error}').format(error=str(e)))
        sys.exit(1)

@@ -1092,37 +1092,39 @@
 ror(_('%5BError%5D %7B
-error
+message
 %7D').format(error
@@ -1110,37 +1110,39 @@
 ssage%7D').format(
-error
+message
 =str(e)))%0A      
@@ -1256,21 +1256,23 @@
 Error%5D %7B
-error
+message
 %7D').form
@@ -1274,21 +1274,23 @@
 .format(
-error
+message
 =str(e))

Rename format key