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

Multilingual Support #11

Open
HDVinnie opened this issue Mar 14, 2021 · 5 comments
Open

Multilingual Support #11

HDVinnie opened this issue Mar 14, 2021 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@HDVinnie
Copy link

class UserMadeComment extends Achievement
{
    /*
     * The achievement name
     */
    public $name = trans('achievements.made-first-comment-name');

    /*
     * A small description for the achievement
     */
    public $description = trans('achievements.made-first-comment-description');
}

results in

[2021-03-14 16:26:54] prod.ERROR: Constant expression contains invalid operations {"userId":4,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Constant expression contains invalid operations at /var/www/html/app/Achievements/UserMadeComment.php:23)

because trans won't work on constants

@assada assada added bug Something isn't working enhancement New feature or request labels Mar 30, 2021
@assada assada self-assigned this Mar 30, 2021
@Wulfheart
Copy link

Wulfheart commented Mar 24, 2022

@assada Therefore I propose the usage of methods like getName() and getDescription(). I am going to open a PR for this (hopefully) today.

@assada
Copy link
Owner

assada commented Sep 6, 2022

@Wulfheart It would be great!

@Wulfheart
Copy link

@assada could you please assign me that issue so I don’t lose track?

@assada assada assigned Wulfheart and unassigned assada Sep 14, 2022
@ebihimself
Copy link

ebihimself commented Oct 20, 2022

If there is no active contribution, Can I take care of this issue?
@assada

@Wulfheart
Copy link

Sure. It is quite easy to implement. Haven’t had the time yet. Go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants