@translations.command('compile')
@click.option('is_all', '--all', '-a', default=True, is_flag=True, help='Compiles the plugin translations as well.')
@click.option('--plugin', '-p', type=click.STRING, help='Compiles the translations for a given plugin.')
def compile_translation(is_all, plugin):
 if (plugin is not None):
  validate_plugin(plugin)
  click.secho('[+] Compiling language files for plugin {}...'.format(plugin), fg='cyan')
  compile_plugin_translations(plugin)
 else:
  click.secho('[+] Compiling language files...', fg='cyan')
  compile_translations(include_plugins=is_all)

@ translations . command ( 'compile' ) @ click . option ( 'is_all' , '--all' , '-a' , default = True , is_flag = True , help = 'Compiles the plugin translations as well.' ) @ click . option ( '--plugin' , '-p' , type = click . STRING , help = 'Compiles the translations for a given plugin.' ) def compile_translation ( is_all , plugin ) : if ( plugin is not None ) : validate_plugin ( plugin ) click . secho ( '[+] Compiling language files for plugin {}...' . format ( plugin ) , fg = 'cyan' ) compile_plugin_translations ( plugin ) else : click . secho ( '[+] Compiling language files...' , fg = 'cyan' ) compile_translations ( include_plugins = is_all )
compiles the translations .