Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Achievement description #39

Open
Arcesilas opened this issue Feb 18, 2019 · 0 comments
Open

Achievement description #39

Arcesilas opened this issue Feb 18, 2019 · 0 comments

Comments

@Arcesilas
Copy link

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, 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.

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

No branches or pull requests

1 participant