import optparse
import textwrap


def get_optparser(help):
    """Construct an OptionParser for the language scripts."""

    parser = optparse.OptionParser(description=textwrap.dedent(help))

    parser.add_option('-d', '--domain', dest='domain',
                      help='Name of the translation domain to manipulate.')
    parser.add_option('-l', '--lang', dest='language',
                      help='Language code(s) to remove from; separate '
                      'language codes with a comma.  If no language is '
                      'specified, the string will be removed from all '
                      'languages.')
    parser.add_option('-m', '--message', dest='msgid',
                      help='Message ID to remove.')

    parser.add_option('-c', '--config', dest='config',
                      help='Path to application configuration to load.')

    parser.set_defaults(domain=None,
                        language=None,
                        msgid=None,
                        config='development.ini')

    return parser