~cypheon/elfelli

ref: bd0b8f1cdf17134805763256687e0b7a2846927e elfelli/tools/gettext.py -rw-r--r-- 363 bytes
bd0b8f1c — Johann Rudloff Speed up Travis build by using multiple cores. 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='msgfmt -o $TARGET $SOURCE',
                               suffix='.mo', src_suffix='.po')
    env['BUILDERS']['MO'] = GettextMOBuilder

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