DockYard / ember-i18n-to-intl-migrator

Migrate ember-i18n to ember-intl
MIT License
21 stars 9 forks source link

TypeError: Cannot convert undefined or null to object #23

Open Mifrill opened 3 years ago

Mifrill commented 3 years ago
yarn global add ember-i18n-intl-migrator
ember-i18n-intl-migrator

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at isPluralObject (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:70:17)
    at Object.keys.forEach.key (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:50:45)
    at Array.forEach (<anonymous>)
    at walk (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:40:20)
    at Object.keys.forEach.key (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:56:18)
    at Array.forEach (<anonymous>)
    at walk (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:40:20)
    at Object.keys.forEach.key (/home/mifrill/.config/yarn/global/node_modules/ember-i18n-intl-migrator/lib/translation-transform.js:56:18)
    at Array.forEach (<anonymous>)
    "ember-source": "~2.14.0",

    "ember-i18n": "4.5.0",
    "ember-i18n-cp-validations": "^3.1.0",
    "ember-i18n-errors": "0.2.0",
Mifrill commented 3 years ago

Got the same issue on "ember-source": "~3.2.0", Hello, @snewcomer are you able to help with it? Not sure what I'm doing wrong

Mifrill commented 3 years ago

okay, it looks like it's related to multiline strings concatenation, for example:

{
    "jamesBond19": "The world" + 
    "Is Not Enough",
}