Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions makeMessages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import subprocess

commands = [
"rm -rf src/app/l10n.bak",
"cp -r src/app/l10n src/app/l10n.bak",
"rm -rf trans-tmp extracted-messages",
"node_modules/.bin/tsc -p . --target ES6 --module es6 --jsx preserve --outDir trans-tmp",
"node_modules/.bin/babel --plugins react-intl \"trans-tmp/**/*.jsx\"",
]

progress = ""

for command in commands:
progress += "."
sys.stdout.write('%s\r' % (progress)),
sys.stdout.flush()

proc = subprocess.Popen([ command ], stdout=subprocess.PIPE, shell=True, stderr=subprocess.STDOUT,)
(out, err) = proc.communicate()

if "SyntaxError:" in out:
print "SyntaxError occured. Stopping operation.\n"
print out
sys.exit(1)
break

subprocess.Popen([ "npm run manage:translations" ], shell=True).wait()

sys.exit(0)
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"babel-jest": "^20.0.3",
"concurrently": "^3.4.0",
"tslint": "^5.7.0",
"typescript": "^2.5.3"
"typescript": "^2.6.1"
},
"jest": {
"preset": "react-native"
Expand Down
Loading