-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add a text function for plugins #41081
Conversation
After installing the patch, the following notice messages appear: Notice: Only variables should be passed by reference in C:\xampp\htdocs\bugtesting5\joomla\plugins\content\contact\services\provider.php on line 38 Notice: Only variables should be passed by reference in C:\xampp\htdocs\bugtesting5\joomla\plugins\content\emailcloak\services\provider.php on line 37 And so on. Doesn't seem to be a problem of this patch, but an underlying problem. |
Does the same issue happen also on the 4.4-dev branch. For me it gives the impression that you somehow screwed up Joomla. But the message is definitely not related to the current pr. |
I have also encountered this problem before. [EDIT: PHPStorm reports 'Only variables can be passed by reference'] |
Oops, I tested in Joomla 5. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41081. |
I have tested this item ✅ successfully on c1ec401 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41081. |
1 similar comment
I have tested this item ✅ successfully on c1ec401 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41081. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41081. |
I'm not so happy with this, a plugin is normally not a thing which is used for translation, I also would move the tmpl from the plugin to layouts which is more the character then a "full" template at least in my understanding. |
This here helps to ease the transition. At the end of the day the template files should work the same, regardless if they are used in views, modules, plugins and layouts. So this here is needed to provide a similar context in all of them. There are legit use cases where template files are used in plugins. So this is fine for the current architecture. If one some point we harmonize the whole code base then it will be even easier when all the template files use the same functions. |
polluting the namespace/class for all plugins doesn't make sense anyway, better use a trait and the plugin that really needs this functionality should use it. |
Why is it only this plugin that is updated and not all the others |
Also this doesn't look like a proper "template engine" when you have to write the code your self: and don't have at least a |
Hey does such a render function look like? |
I will do this in 5.0 once it is upmerged, similar to #41079 and #41063.
As I said, this pr is made for the current architecture. If you want to change it go ahead and make a pr. This here is fine for what we have now. Not saying it is the gold solution. |
@brianteeman here we go #41092. |
thanks - I guess I am/was confused why you change one here for 4.4 and all the others for 5.0 |
This reverts commit b9d646c.
Summary of Changes
Similar text function for plugins as we do in #41079.
Testing Instructions
Actual result BEFORE applying this Pull Request
All strings are translated.
Expected result AFTER applying this Pull Request
All strings are translated.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed