diff --git a/.travis.yml b/.travis.yml index 34a11f29c..e16c5a8d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: - node --version - npm --version - npm upgrade -g npm - - npm install -g po2json@0.4.5 + - npm install - | if [[ $GROUP == js* ]]; then npm install -g casperjs@1.1.3 phantomjs-prebuilt@2.1.7 diff --git a/setupbase.py b/setupbase.py index 972ed24d6..1b1549c54 100644 --- a/setupbase.py +++ b/setupbase.py @@ -539,11 +539,11 @@ class CompileJS(Command): print(source, target) return True return False - + def build_main(self, name): """Build main.min.js""" target = pjoin(static, name, 'js', 'main.min.js') - + if not self.should_run(name, target): log.info("%s up to date" % target) return @@ -552,12 +552,14 @@ class CompileJS(Command): def build_jstranslation(self, trd): lang = trd[-5:] - run(['po2json', '-p', '-F', - '-f', 'jed1.x', - '-d', 'nbjs', - pjoin('notebook', 'i18n', lang ,'LC_MESSAGES', 'nbjs.po'), - pjoin('notebook', 'i18n', lang, 'LC_MESSAGES', 'nbjs.json') - ]) + run([ + pjoin('node_modules', '.bin', 'po2json'), + '-p', '-F', + '-f', 'jed1.x', + '-d', 'nbjs', + pjoin('notebook', 'i18n', lang, 'LC_MESSAGES', 'nbjs.po'), + pjoin('notebook', 'i18n', lang, 'LC_MESSAGES', 'nbjs.json'), + ]) def run(self): self.run_command('jsdeps')