opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

www/caddy: Added lang() function for all user exposed text for translation #3978

Closed Monviech closed 1 month ago

Monviech commented 1 month ago

Added lang() function for all user exposed text for translation, I hope I was thorough enough with it.

Of course there is still some text that won't be translated, like some error messages that are returned from the backend (for example the Caddyfile validation messages, they're always english.)

fichtner commented 1 month ago

For error messages from caddy we can't do much. That's ok. Controller texts are translated using gettext() wrapper in the same manner if not done already.

I'm merging this. Make sure to double-check the JS as the escaping in there is extra-finicky... Thanks!