Giter Club home page Giter Club logo

Comments (4)

AddisonG avatar AddisonG commented on June 19, 2024 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.

AddisonG avatar AddisonG commented on June 19, 2024 1

@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.

snewcomer avatar snewcomer commented on June 19, 2024

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.

rreckonerr avatar rreckonerr commented on June 19, 2024

@AddisonG did you figure out how to deal with this error eventually?

from ember-i18n-to-intl-migrator.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.