~cypheon/elfelli

ref: 7ba73dd431ffeaa728cd7b3bbf4a8f8dc7392a6a elfelli/tools/gettext.py -rw-r--r-- 363 bytes
7ba73dd4 — Johann Rudloff Update SCons files to work with new (>2012) SCons versions. 3 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='msgfmt -o $TARGET $SOURCE',
                               suffix='.mo', src_suffix='.po')
    env['BUILDERS']['MO'] = GettextMOBuilder

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