Stream: community

Topic: Custom alert messages when dataset is locked or in review


view this post on Zulip Deirdre Kirmis (Jul 30 2024 at 19:17):

Hi there .. I apologize if this has been asked before .. I did search for existing discussions :smile:
Is there a way to customize the alert messages that appear on a dataset when the dataset is locked, or submitted for review?
Screenshot-2024-07-30-at-12.04.57PM.png

view this post on Zulip Philip Durbin 🚀 (Jul 30 2024 at 19:55):

I haven't played with this much but it should be possible to drop a custom version of Bundle.properties into place.

Here's one of the lines in question:

% ack 'review prior' src
src/main/java/propertyFiles/Bundle.properties
1499:dataset.inreview.infoMessage=The draft version of this dataset is currently under review prior to publication.

view this post on Zulip Deirdre Kirmis (Jul 30 2024 at 20:45):

where do i find that?

view this post on Zulip Philip Durbin 🚀 (Jul 30 2024 at 21:01):

Here's the file as of 6.3: https://github.com/IQSS/dataverse/blob/v6.3/src/main/java/propertyFiles/Bundle.properties

view this post on Zulip Deirdre Kirmis (Jul 30 2024 at 21:09):

ah thanks! i'll see what i can figure out :smile:

view this post on Zulip Philip Durbin 🚀 (Jul 30 2024 at 21:21):

Sure, you might need to configure the lang directory, but I'm not sure: https://guides.dataverse.org/en/6.3/installation/config.html#configuring-the-lang-directory

view this post on Zulip Philip Durbin 🚀 (Jul 30 2024 at 21:22):

You shouldn't have to recompile. But I'm not sure where you're supposed to put the updated file.

view this post on Zulip Deirdre Kirmis (Jul 30 2024 at 21:33):

if we would need to change it every time we upgrade, we prob don't want to do that .. maybe I should submit a feature request to allow custom alert messages? :grinning:

view this post on Zulip maría a. matienzo (Jul 30 2024 at 22:46):

if it's useful info: we're managing a set of the languageBundles as part of our customization repo - the idea there is that we then at least can reapply the same changes as we need to. however, we still need to grab the upstream bundle files when we upgrade since they'll have new strings in them.

view this post on Zulip Deirdre Kirmis (Jul 31 2024 at 15:41):

Thank you for the info! Are you just using this procedure to change those files? And a JVM option points to the new files?

view this post on Zulip Philip Durbin 🚀 (Jul 31 2024 at 20:29):

I'm not sure what procedure Jim from QDR is using but they replace "dataset" with "data project" by updating that Bundle.properties file. See https://data.qdr.syr.edu

view this post on Zulip maría a. matienzo (Jul 31 2024 at 22:56):

@Deirdre Kirmis yes, that's what we're doing. we either can upload the language bundle using the zip files directions described there, or deploying files to the configured location in dataverse and restarting it.

view this post on Zulip Philip Durbin 🚀 (Aug 01 2024 at 13:47):

Ah, great. Thanks for confirming, @María A. Matienzo

view this post on Zulip Philip Durbin 🚀 (Aug 01 2024 at 13:47):

Do we need better docs on this? Please feel free to start a thread in #docs!

view this post on Zulip Deirdre Kirmis (Aug 01 2024 at 14:36):

Yes thanks for the help/info! Will give it a try. :tada:

view this post on Zulip Deirdre Kirmis (Aug 02 2024 at 20:28):

hi there .. this seems to be working, however does it make sense that I have to have both a custom zip file uploaded with my changes, as well as the JVM option in place pointing to the language packs? It overrides the files in the local directory with the changes that I specify in the zip file, but why do I still need to point to the "lang" directory if I'm uploading a zip file with my customization?

view this post on Zulip maría a. matienzo (Aug 02 2024 at 21:08):

@Deirdre Kirmis Dataverse still needs to know where to extract those files to, and in general, where to look for the language packs on disk (e.g. if it were to restart).

view this post on Zulip Deirdre Kirmis (Aug 02 2024 at 21:33):

Ah okay, got it .. I thought it was either-or .. the uploaded zip overrides the default language packs or dataverse just points to the configured directory instead .. thanks for the help again! Cool that we can do this level of customization!

view this post on Zulip maría a. matienzo (Aug 02 2024 at 21:38):

the first time you do it, it's both - but from then on (e.g. if you're working with a sysadmin or developer) it's fine to place the files directly into that directory in the Dataverse configuration.

view this post on Zulip Oliver Bertuch (Aug 04 2024 at 08:42):

Just a thought - I haven't tried this, but might be worth a shot: instead of editing the Bundle.properties, maybe you can add a language variant? That way you don't need to worry about Bundle.properties updating. ResourceBundle files' names follow the pattern <name>_<langcode>_<region>_<variant>.properties (see also Locale JavaDocs). You can set the user.variant using a system property (aka JVM option) in domain.xml. Note that the variant is case-sensitive!

view this post on Zulip Oliver Bertuch (Aug 04 2024 at 08:47):

Obviously you'd need to add these locales with language, region and variant to the Languages setting :wink: Otherwise you'll end up with the default Locale "en" again.

view this post on Zulip maría a. matienzo (Aug 06 2024 at 15:53):

@Oliver Bertuch unfortunately, this doesn't seem to work - on restarting Payara, there are a series of warnings, and then there's an exception that prevents Dataverse from starting


Last updated: Nov 01 2025 at 14:11 UTC