potsky / laravel-localization-helpers

🎌 Artisan commands to generate and update lang files automatically
GNU General Public License v3.0
187 stars 39 forks source link

Update language files but keep the original formatting #42

Open imbrish opened 8 years ago

imbrish commented 8 years ago

So the point is, if dedicated setting is on, the script would scan the file, look for things like new line before array opening, keys notation, tabulation, etc. Then it would add missing lemmas in proper places, mark them with "TODO:" label, mark obsolete translations with "OBSOLETE:" label etc. That would keep original style of the file, all the comments etc, yet make maintenance of translations a breeze.

I am aware that this sounds like a big change, with difficult implementation. Anyway I though I may share this idea, as others may like it and fint it useful.

Decent solution shouldn't actually take that much time and may be good enough for many people. Some time ago I've written similar command for syncing translations between languages, you may check it out here. Feel free to integrate it in the package if you consider it useful or modify it however you like!

I hope we may see this feature implemented one day. I'm eager to help with the development if you think this is a good idea. I might even try to code it all by myself, however before I'd like to hear some feedback.