<s> from grow . pods import pods <EOL> from grow . pods import storage <EOL> import click <EOL> import os <EOL> @ click . command ( ) <EOL> @ click . argument ( '<STR_LIT>' , default = '<STR_LIT:.>' ) <EOL> @ click . option ( '<STR_LIT>' , type = click . Path ( ) , required = True , <EOL> help = '<STR_LIT>' ) <EOL> @ click . option ( '<STR_LIT>' , type = str , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> def import_translations ( pod_path , source , locale ) : <EOL> """<STR_LIT>""" <EOL> if source . endswith ( '<STR_LIT>' ) and locale is None : <EOL> text = '<STR_LIT>' <EOL> raise click . ClickException ( text ) <EOL> if not source . endswith ( '<STR_LIT>' ) and locale is not None : <EOL> text = '<STR_LIT>' <EOL> raise click . ClickException ( text ) <EOL> source = os . path . expanduser ( source ) <EOL> root = os . path . abspath ( os . path . join ( os . getcwd ( ) , pod_path ) ) <EOL> pod = pods . Pod ( root , storage = storage . FileStorage ) <EOL> if not pod . exists : <EOL> raise click . ClickException ( '<STR_LIT>' . format ( pod . root ) ) <EOL> pod . catalogs . import_translations ( source , locale = locale ) </s>
