-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Mage_Core_Block_Abstract::__() use singleton for expr var #26
Comments
It is an valuable proposal. However, we have a broader story regarding refactoring of translation mechanism. Thus we won't do anything as proposed, because all this code is going to be deleted in scope of that story. Out plan is to remove module context from translated text, and to use Gettext functionality directly. Thank you for the proposal. |
Closed
magento-team
pushed a commit
that referenced
this issue
Jan 16, 2015
[Folks] Technical debt (MAGETWO-26655)
Closed
Closed
ghost
mentioned this issue
May 26, 2015
4 tasks
4 tasks
5 tasks
5 tasks
5 tasks
ghost
mentioned this issue
Aug 10, 2022
5 tasks
ghost
mentioned this issue
Aug 19, 2022
5 tasks
5 tasks
5 tasks
Closed
5 tasks
This was referenced Feb 17, 2023
5 tasks
Open
5 tasks
5 tasks
5 tasks
5 tasks
5 tasks
5 tasks
5 tasks
5 tasks
5 tasks
Open
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use singleton $expr var, because if we look at the Mage_Core_Model_Tranlate::translate
we will see that expr object is used only once to fetch args for Mage_Core_Model_Tranlate::_getTranslatedString(). You have a lot calls of __() method in templates, models, etc. It can improve perfomance.
And why do you use array_shift/array_unsfhit to get and pass first element of arguments array? Just use array index:
The text was updated successfully, but these errors were encountered: