Skip to content

Commit

Permalink
Modify extraction method
Browse files Browse the repository at this point in the history
Pybabel has trouble extracting from JSX files (see here
python-babel/babel#280). So we
decided to do extraction by compiling components into js
just for the extraction process and then using pybabel's js
config setting to get the translations.
  • Loading branch information
ezmiller committed Dec 26, 2015
1 parent 60c35d1 commit 8825f69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[javascript:**.jsx]
[javascript:**.js]
encoding = utf-8
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
extensions=jinja2.ext.autoescape,jinja2.ext.with_
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.1",
"description": "beavy frontend",
"scripts": {
"prepare-i18n": "./node_modules/babel-cli/bin/babel.js --out-dir beavy beavy && ./node_modules/babel-cli/bin/babel.js --out-dir beavy_modules beavy_modules && ./node_modules/babel-cli/bin/babel.js --out-dir beavy_apps beavy_apps",
"style-check": "eslint beavy/jsbeavy/**/**.jsx beavy_modules/**/**.jsx beavy_apps/**/**.jsx .infrastructure/**/*.js",
"style-fix": "eslint --fix beavy/jsbeavy/**/**.jsx beavy_modules/**/**.jsx beavy_apps/**/**.jsx .infrastructure/**/**.js",
"test": "jest --coverage jsbeavy beavy_modules/ beavy_apps",
Expand Down

0 comments on commit 8825f69

Please sign in to comment.