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

Fix example controller name to be more coherent and usage of translator #424

Merged
merged 3 commits into from Dec 30, 2019

Conversation

@matks
Copy link
Contributor

matks commented Dec 13, 2019

Fixed example controller name to fit with naming convention (see https://devdocs.prestashop.com/1.7/modules/concepts/controllers/front-controllers/)

Thanks to @BlackKerio for the hint

@matks matks changed the title Fix example controller name to be more coherent Fix example controller name to be more coherent and usage of translator Dec 20, 2019
{
public function initContent()
{
$this->title = $this->module->trans('My module title', [], 'Modules.Mymodule.Something);
$this->title = $this->trans('My module title', [], 'Modules.Mymodule.Something);

This comment has been minimized.

Copy link
@matks

matks Dec 20, 2019

Author Contributor

According to my test, this is the right call. Can someone confirm, maybe @Quetzacoalt91 ?

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Dec 21, 2019

Contributor

I confirm you this is the right call (according to my test too 😅 )

This comment has been minimized.

Copy link
@Quetzacoalt91

Quetzacoalt91 Dec 23, 2019

Member

When using trans() with a domain, both are valid. :)

This comment has been minimized.

Copy link
@matks

matks Dec 30, 2019

Author Contributor

@Quetzacoalt91 If I try to use $this->module->trans() in a module front controller with PS 1.7.7, I get the following error:
Capture d’écran 2019-12-30 à 12 06 12

Fix typo
Co-Authored-By: Pablo Borowicz <pablo.borowicz@prestashop.com>
@matks

This comment has been minimized.

Copy link
Contributor Author

matks commented Dec 30, 2019

Thank you for review

@matks matks dismissed eternoendless’s stale review Dec 30, 2019

Requested change has been applied

@matks matks merged commit e857ca8 into PrestaShop:master Dec 30, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@matks matks deleted the matks:fix-ctrler-name branch Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.