-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When trying to propagate a new language folder from an original english file with terms, npx mfv add-missing threw this error:
TypeError: Cannot read properties of undefined (reading 'comma')
at C:\D2L\web-components\activities\node_modules\messageformat-validator\bin\cli.js:277:65
at Array.forEach (<anonymous>)
at C:\D2L\web-components\activities\node_modules\messageformat-validator\bin\cli.js:259:29
at Array.forEach (<anonymous>)
at C:\D2L\web-components\activities\node_modules\messageformat-validator\bin\cli.js:234:14All other files were created using the script:
echo -e "/* eslint quotes: 0 */\n\nexport default {\n};" | tee -a ar.js cy.js da.js de.js en.js es-es.js es.js fr-fr.js fr-on.js fr.js hi.js ja.js ko.js nl.js pt.js sv.js tr.js zh-cn.js zh-tw.js
It did not like trying to read the properties of an empty object. They all looked like this:
/* eslint quotes: 0 */
export default {
};
This issue can be circumvented by adding a dummy data to all files:
/* eslint quotes: 0 */
export default {
"dummy":"dummy"
};
Then re-running npx mfv add-missing, and removing all instances of "dummy":"dummy".
In this scenario, it would be nice to be able to propagate the terms to new files in the case of new lang folders, or an extra supported language being added to old components.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working