~cypheon/elfelli

ref: d62f0945c78677b2fe75fe2a71484afb4875f9a2 elfelli/tools/gettext.py -rw-r--r-- 363 bytes
d62f0945 — Johann Rudloff Try enabling Travis macOS build env. 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')