yarn merge-i18n doesn't merge *deletions* from en.json5 file?

72 views
Skip to first unread message

Amy Ball Wicklund

unread,
Jul 11, 2023, 7:46:50 PM7/11/23
to DSpace Technical Support
Using the theme override approach, if I remove some of my custom text from my theme's en.json5 file and run the yarn merge-i18n command, the deletion doesn't propagate to the dist directory. New or changed custom text gets merged, but it seems the only way to undo custom text and revert back to the default text is to make the change manually in my theme AND in the production/dist file. 

Is this behavior intentional, by design?

~Amy

Mark H. Wood

unread,
Jul 12, 2023, 8:36:20 AM7/12/23
to dspac...@googlegroups.com
I think it's an unfortunate limitation of the current approach to
customizing message texts. Where would the merge script get the
original text, once it's been replaced in the stock catalog?

I would like to replace the current approach with this: both the
*unaltered* stock catalogs and the custom catalogs are built into the
frontend, and localization code would consult an ordered list of
catalogs until the key is found. I haven't yet had time to work out
how to do this using the available facilities.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Amy Ball Wicklund

unread,
Jul 13, 2023, 5:38:01 PM7/13/23
to DSpace Technical Support
Oh yes, that's a great idea for a future improvement that doesn't obliterate the default stock text. Similar to config file precedence. In the meantime, I'll edit by hand and also be sure to keep my own backups of the stock text. Thanks Mark! ~Amy
Reply all
Reply to author
Forward
0 new messages