You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen there is only a $description property which seems, according to the examples, to be used to display a message to the user when they reach the achievement.
This is misleading, IMHO, since the description should describe (sic) the achievement and, therefore, be displayed in the list of achievements, so that users know what they have to do to reach the achievement.
The $description should then describe the achievement, and a $message property should be displayed when the user unlocks the achievement.
Since the property is public, we can obviously add another property to achieve this. But the examples in the documentation are not very explicit about the contexts.
Also, since the package is designed for Laravel, what about adding localization? Rather than using description property, we could have a getDescription() method which would return the description translated (or not, depending on configuration). Also, a getMessage() method would display the message.
A getter would allow developer to add some logic before returning the message/description (maybe you want to return the text with a different vocabulary, for example for adults or children users).
I'd be happy to submit proposals and PRs after discussing this.
The text was updated successfully, but these errors were encountered:
Hi again,
I've seen there is only a
$description
property which seems, according to the examples, to be used to display a message to the user when they reach the achievement.This is misleading, IMHO, since the description should describe (sic) the achievement and, therefore, be displayed in the list of achievements, so that users know what they have to do to reach the achievement.
The
$description
should then describe the achievement, and a$message
property should be displayed when the user unlocks the achievement.Since the property is public, we can obviously add another property to achieve this. But the examples in the documentation are not very explicit about the contexts.
Also, since the package is designed for Laravel, what about adding localization? Rather than using description property, we could have a
getDescription()
method which would return the description translated (or not, depending on configuration). Also, agetMessage()
method would display the message.A getter would allow developer to add some logic before returning the message/description (maybe you want to return the text with a different vocabulary, for example for adults or children users).
I'd be happy to submit proposals and PRs after discussing this.
The text was updated successfully, but these errors were encountered: