Comments (4)
Took another look at this @rreckonerr and @snewcomer. The problem seems to be that we were importing other generated json files into translations.js
, like so:
import external_import from './example';
export default {
"first": {
"key": "value"
},
"second": external_import
}
This caused it to fail on this line:
let obj = new Function(content.replace('export default', 'return'))();
The workaround is to manually resolve all the imports, by pasting the contents into the translations.js
file, so that it has no import statements or code other than the export default
line.
It would be nice to have this work for when multiple files are used, but that's a feature more than a bugfix.
from ember-i18n-to-intl-migrator.
@rreckonerr - No, sorry. If I recall correctly, a few of us at work dug down into the code, and found what appeared to be the root cause, but decided against attempting to fix it, since it wasn't worth the effort.
from ember-i18n-to-intl-migrator.
That first error seems like it might be app related code. Not sure where we are using import
in translation-transform.js
from ember-i18n-to-intl-migrator.
@AddisonG did you figure out how to deal with this error eventually?
from ember-i18n-to-intl-migrator.
Related Issues (9)
- SyntaxError: Unexpected identifier when running script HOT 9
- YAML conversion issues HOT 2
- Note: touchy about code in translations.js files HOT 1
- Replace translationMacro
- The codemode i18n -> intl is removing too many spaces HOT 1
- Translation Transform is missing the 'two' plural category HOT 1
- TypeError: Cannot convert undefined or null to object HOT 2
- quotes around yaml keys with dot notation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-i18n-to-intl-migrator.