kalessil / yii2inspections

MIT License
31 stars 3 forks source link

quickFix for missing translation not shown #34

Closed gb5256 closed 7 months ago

gb5256 commented 5 years ago

HI, your plugin does show corretcly that the translation for "jolly" is missing (see screenshot and notice that it found the translation for "welcome".) screenshot 2019-01-01 at 22 40 27 But it does not show the quickfix for adding the translation to the translation file: screenshot 2019-01-01 at 22 44 13

Any Idea ? I am using the advanced template, and the translation files are inside "frontend". I have also tried the same with moving the translation folder into the root of the app, but no difference.

gb5256

kalessil commented 5 years ago

The plugin searches translations in files matching some naming conventions: https://github.com/kalessil/yii2inspections/blob/master/src/main/com/kalessil/phpStorm/yii2inspections/codeInsight/TranslationKeysIndexer.java#L86

e.g. [any-path-here]/translations/en.php, [any-path-here]/translations/EN.php or [any-path-here]/translations/en-us.php will be recognized as a translation file.

If the convention is already used, then I need some details regarding translation files full path and structure.

gb5256 commented 5 years ago

Hi, thanks for your swift reply. I have now created it as you suggested. And for the case that it might be related to the yii2-advanced folder structure, I have also added it to the root. So I have now two translation folders, just to be sure. see screenshot. Still no quickfix. screenshot 2019-01-01 at 23 10 43

kalessil commented 5 years ago

Looks good, and as I check the source code, seems we didn't implement the QF there. I'll check if we can guess the files for implementing QF (I'll be back from holidays ~7th).

gb5256 commented 5 years ago

ahh. ok. I was thinking that there is an error in my setup. Enjoy your holidays and thanks again for your swift replies.

kalessil commented 5 years ago

Thank you =) I'll reopen the ticket, to evaluate QF feasibility when back.