Azuriom / Plugin-Support

A support plugin that allows users to create a ticket when they need help.
https://market.azuriom.com/resources/3
MIT License
2 stars 9 forks source link

Translation Elements Not Working #12

Closed thefourcraft closed 2 years ago

thefourcraft commented 2 years ago

in the messges.php

<div class="card">
        <div class="card-body">
            <table class="table">
                <thead class="table-dark">
                <tr>
                    <th scope="col">{{ trans('support::messages.fields.subject') }}</th>
                    <th scope="col">{{ trans('support::messages.fields.category') }}</th>
                    <th scope="col">{{ trans('messages.fields.status') }}</th> #not working
                    <th scope="col">{{ trans('messages.fields.date') }}</th> #not working
                </tr>
                </thead>
                </body>

when trying to translate them they are not working because the messges.php file files do not exist

Solution

adding them into the PHP file :)

return [
    'title' => 'Support',

    'fields' => [
        'subject' => 'Subject',
        'category' => 'Category',
        'ticket' => 'Ticket',
        'comment' => 'Comment',
        'status' => 'Status',
        'Date' => 'Date',
    ],

Problem fixed

Oxim0v commented 2 years ago

If translation don't start with support:: it's that the translation already exists in the CMS so it's not useful to add it twice So this issue and the pull request are useless

https://github.com/Azuriom/Azuriom/blob/master/resources/lang/en/messages.php#L56 https://github.com/Azuriom/Azuriom/blob/master/resources/lang/en/messages.php#L75

thefourcraft commented 2 years ago

I thought it was an issue with the plugin :)

thefourcraft commented 2 years ago

https://github.com/AzuriomCommunity/Plugin-SkinAPI/issues/7 Does this also apply? or I think because he didn't do _ https://github.com/Azuriom/Azuriom/blob/master/resources/lang/en/messages.php#L24