~cypheon/elfelli

ref: 81071c0ffe55c39496eb171e669897ac6e4bc98e elfelli/tools/gettext.py -rw-r--r-- 373 bytes
81071c0f — Johann Rudloff Explicitly specify destination for application binary. 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
import SCons.Builder

def generate(env, **kw):
    Builder = SCons.Builder.Builder

    env['MSGFMT'] = env.Detect('msgfmt') or 'msgfmt'

    GettextMOBuilder = Builder(action=env['MSGFMT'] + ' -o $TARGET $SOURCE',
                               suffix='.mo', src_suffix='.po')
    env['BUILDERS']['MO'] = GettextMOBuilder

def exists(env):
    return env.Detect('msgfmt')