Skip to content

Conversation

@L0neGamer
Copy link
Contributor

@L0neGamer
Copy link
Contributor Author

@jezen this one after #290

The `renderMessage` function takes in the site as its first variable, but for most
cases does nothing with it except pass it to recursive cases. This commit allows
the user to choose and name this site parameter, meaning it can be used in the
various messages that `mkMessage` generates. This can allow for a message to
include content based on some site data, as long as that data is present from the
site data purely. For example, this can be used to change what the name of some
component is between different instances of the same subsite.
@L0neGamer L0neGamer changed the title Use site Add option for site variable in mkMessage's generated messages Jul 15, 2025
@L0neGamer
Copy link
Contributor Author

This is potentially an unwanted change for shakespearean internationalisation. The reason for that is the recommended way of doing what this sets out to do may be to create alternative sets of messages for each different input, or for the message data structure to store the values you are getting from the site data.

@jezen
Copy link
Member

jezen commented Jul 15, 2025

This is great. Thanks! 🎉

@jezen jezen merged commit bec6151 into yesodweb:master Jul 15, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants