idea-php-symfony2-plugin icon indicating copy to clipboard operation
idea-php-symfony2-plugin copied to clipboard

[Translation] Is there a way to specify specific domain in method references

Open SVillette opened this issue 2 years ago • 1 comments

Description

A great feature of the plugin is to add method references for custom classes in any project. It works very well and thank you for that.

However, I have an issue to set up completion for translation using a specific domain. I searched in docs or existing issues (#155, #1351, #1742) but unfortunately didn't find much exlanations about how to set it up or why is it not possible.

Is there something new about it ? Is it a planned feature ? That would be a great addition to the plugin.

Thanks.

What I tried so far

I tried to add completion for this class which will translate in the domain flashes


interface FlashHelperInterface
{
    public const SUCCESS = 'success';

    public function sendMessage(string $type, string $key, array $parameters = []): void;
}

I only managed to make it work if I define a parameter for the domain (as indicated in the docs) but that's not exactly what I want.

/**
 * @param string $key #TranslationKey
 * @param string $domain #TranslationDomain
 */
public function sendTestMessage(string $key, string $domain): void;

SVillette avatar Aug 05 '22 15:08 SVillette

no still not, "they" dont know each other. will be implemented

Haehnchen avatar Oct 21 '22 16:10 Haehnchen