wintercms / wn-builder-plugin

GUI for building plugins in Winter CMS
MIT License
34 stars 12 forks source link

localization of error messages #23

Open WebVPF opened 2 years ago

WebVPF commented 2 years ago

Please also review all of the changed files to ensure that the Lang facade is imported correctly for each one.

@LukeTowers done

bennothommo commented 2 years ago

@WebVPF @LukeTowers this appears to break the unit tests since they are doing string comparisons on some exceptions.

Also, I believe our standard is to not translate system exceptions.

LukeTowers commented 2 years ago

At least some of these are application exceptions though and are triggered by the user entering data which probably should be translated. System exceptions designed to be searched online shouldn't be translated but exceptions that are meant to inform the user how to solve their problem with the message itself can be translated.

WebVPF commented 1 year ago

@LukeTowers I removed the translation of system exceptions.

LukeTowers commented 1 year ago

@bennothommo tests are failing, is that because of the classloader changes?

bennothommo commented 1 year ago

@LukeTowers not quite sure what's happening there - the Backend module classes are using Composer's PSR-4 autloading, so I don't think it would have anything to do with the class loader changes. I also just did a simulation of the same thing the tests do, and the tests ran fine for me.