Skip to content

Conversation

@dereuromark
Copy link
Member

@dereuromark dereuromark commented Jun 7, 2025

Possible soution to #1038

I wonder if we could make a helper wrapper for translations, to keep the templates more readable?

@LordSimal
Copy link
Contributor

The base idea is pretty cool, but I don't see any reason why one should use __() inside a plugin (so what we currently have 😁)

I'd rather always default to __d() if -p aka a Plugin file is being generated.

@dereuromark
Copy link
Member Author

That would simplify it a bit I guess :)

$plugin = $this->plugin;
if ($plugin) {
$plugin .= '.';
$pluginPath = $plugin;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the process of simplifying I also found a bug: A dot added to plugin is passed along to the templates.
This is now also fixed as a side effect.

# Conflicts:
#	templates/bake/Template/view.twig
@dereuromark dereuromark requested a review from markstory October 1, 2025 11:55
@markstory markstory merged commit 02a43ee into 3.next Oct 6, 2025
9 checks passed
@markstory markstory deleted the 3.next-plugin-domain branch October 6, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants