mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
51 stars 46 forks source link

Invalid lang file name #7

Closed alexandru-elisei closed 8 years ago

alexandru-elisei commented 8 years ago

In classes/local/util/manager.php, line 125: $this->prepare_file_skeleton('lang/en/component.php', 'lang_file', 'lang');

It creates the lang/en/component.php file. The file name should be the component name, like this: $this->prepare_file_skeleton('lang/en/'.$this->recipe['component'].'.php', 'lang_file', 'lang');

I'll send the fix in my next pull request.

mudrd8mz commented 8 years ago

Yes. It was like that initially. I then thought it might be easier to have it hard-coded like this, and change the file name on the fly only before writing the file. But you are right that it will be cleaner to have the file name just correct. Good catch Alex.