pyrocms / pyrocms

Pyro is an experienced and powerful Laravel PHP CMS.
https://www.pyrocms.com/
Other
3.18k stars 934 forks source link

[streams-platform] Can't change default validation message in resources publish folder #4325

Closed dangquocmin closed 7 years ago

dangquocmin commented 7 years ago

I had run command php artisan streams:publish After that I had changed some required message but it not woking. So I had changed this in vendor\anomaly\streams-platform\resources\lang\en and it is ok. You can see in bellow photo. I had echo DIR for test. http://sv1.upsieutoc.com/2017/04/20/Clipboardimage2017-04-20100133.png Thanks.

Piterden commented 7 years ago

This command reads settings files from filesystem /core/anomaly/settings-module/src/Setting/Command/ConfigureSystem.php

dangquocmin commented 7 years ago

Can you explain more, I don't know any solutions for fix that.

Piterden commented 7 years ago

https://pyrocms.com/documentation/settings-module/latest

dangquocmin commented 7 years ago

Thank you. But I just want to change message in public folder, not in code or setting or any core files. I mean have some message has changed but some message can't change. Are you see my photo.

Piterden commented 7 years ago

Because you shared another config tree, which loads last, and override all other settings of your system. You need remove it, or remove only values, which you need

dangquocmin commented 7 years ago

Sorry but I don't think so. I'm following this doc https://pyrocms.com/documentation/streams-platform/latest#services/localization So can you see my photo bellow. http://sv1.upsieutoc.com/2017/04/21/Clipboardimage2017-04-21213518.png In validation.php file in my public folder. unique_trash message is working but required message not working. So I think something is wrong.

Piterden commented 7 years ago

I think, there is another place, from where settings have taken and merged with your settings. About that manual, I did like written there one time. That was my first time I use Pyro. Then I never used it again.

dangquocmin commented 7 years ago

I had changed required message in vendor\anomaly\streams-platform\resources\lang.. it worked ... I don't know why ? so I'll try debug again. Thank you !.

Piterden commented 7 years ago

@hoangdv please, don't forget, if you make any changes in vendor\anomaly, these changes would be erased and turned back every your updating of composer. The same situation with core folder.

Piterden commented 7 years ago

Also, if your changes inside vendor/anomaly work well, then you have translation key started with streams::.

RyanThompson commented 7 years ago

This has been resolved: https://github.com/anomalylabs/streams-platform/commit/ecf4dfe0b24fa973858abd3b8de2bbfd59396775

The problem was our loader was not overloading language keys that were NOT namespaced.. Like native laravel keys.

Thanks for your help in pointing this out!