parameters: (env,**kw)
docstring: Generate the `msginit` tool
docstring_summary: Generate the `msginit` tool
docstring_tokens: Generate the msginit tool
function: def generate(env,**kw):
    """ Generate the `msginit` tool """
    import sys
    import os
    import SCons.Util
    import SCons.Tool
    from SCons.Tool.GettextCommon import _detect_msginit
    from SCons.Platform.mingw import MINGW_DEFAULT_PATHS
    from SCons.Platform.cygwin import CYGWIN_DEFAULT_PATHS
  
    if sys.platform == 'win32':
        msginit = SCons.Tool.find_program_path(env, 'msginit', default_paths=MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS )
        if msginit:
            msginit_bin_dir = os.path.dirname(msginit)
            env.AppendENVPath('PATH', msginit_bin_dir)
        else:
            SCons.Warnings.SConsWarning('msginit tool requested, but binary not found in ENV PATH')
  
    try:
      env['MSGINIT'] = _detect_msginit(env)
    except:
      env['MSGINIT'] = 'msginit'
    msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \
               + ' $MSGINITFLAGS -i $SOURCE -o $TARGET'
    # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded
    #       (sometimes we really don't need it)
    env.SetDefault(
      POSUFFIX = ['.po'],
      POTSUFFIX = ['.pot'],
      _MSGINITLOCALE = '${TARGET.filebase}',
      _MSGNoTranslator = _optional_no_translator_flag,
      MSGINITCOM = msginitcom,
      MSGINITCOMSTR = '',
      MSGINITFLAGS = [ ],
      POAUTOINIT = False,
      POCREATE_ALIAS = 'po-create'
    )
    env.Append( BUILDERS = { '_POInitBuilder' : _POInitBuilder(env) } )
    env.AddMethod(_POInitBuilderWrapper, 'POInit')
    env.AlwaysBuild(env.Alias('$POCREATE_ALIAS'))
function_tokens: def generate ( env , * * kw ) : import sys import os import SCons . Util import SCons . Tool from SCons . Tool . GettextCommon import _detect_msginit from SCons . Platform . mingw import MINGW_DEFAULT_PATHS from SCons . Platform . cygwin import CYGWIN_DEFAULT_PATHS if sys . platform == 'win32' : msginit = SCons . Tool . find_program_path ( env , 'msginit' , default_paths = MINGW_DEFAULT_PATHS + CYGWIN_DEFAULT_PATHS ) if msginit : msginit_bin_dir = os . path . dirname ( msginit ) env . AppendENVPath ( 'PATH' , msginit_bin_dir ) else : SCons . Warnings . SConsWarning ( 'msginit tool requested, but binary not found in ENV PATH' ) try : env [ 'MSGINIT' ] = _detect_msginit ( env ) except : env [ 'MSGINIT' ] = 'msginit' msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' + ' $MSGINITFLAGS -i $SOURCE -o $TARGET' # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded #       (sometimes we really don't need it) env . SetDefault ( POSUFFIX = [ '.po' ] , POTSUFFIX = [ '.pot' ] , _MSGINITLOCALE = '${TARGET.filebase}' , _MSGNoTranslator = _optional_no_translator_flag , MSGINITCOM = msginitcom , MSGINITCOMSTR = '' , MSGINITFLAGS = [ ] , POAUTOINIT = False , POCREATE_ALIAS = 'po-create' ) env . Append ( BUILDERS = { '_POInitBuilder' : _POInitBuilder ( env ) } ) env . AddMethod ( _POInitBuilderWrapper , 'POInit' ) env . AlwaysBuild ( env . Alias ( '$POCREATE_ALIAS' ) )