Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notice depend on WPLANG value #11

Open
iworks opened this issue Dec 4, 2024 · 1 comment
Open

Add notice depend on WPLANG value #11

iworks opened this issue Dec 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@iworks
Copy link
Owner

iworks commented Dec 4, 2024

  1. Add warning notice to admin dashboard when WPLANG is empty.
  2. Add info notice on plugin settings page when WPLANG is not pl_PL or cz_CZ.

Props for @ellmann-creative

@iworks iworks added the enhancement New feature or request label Dec 4, 2024
@iworks iworks self-assigned this Dec 4, 2024
@ellmann-creative
Copy link

I would also like to make two suggestions here:

  1. please make the warning configurable, so that it can be disabled if the user "knows what they're doing" - so that those that don't want "nuisance alerts" can get rid of it without addressing the problem (it would also be good to mention that the warning can be disabled in Settings somewhere in the warning itself - something like "This warning can be disabled in Settings")

  2. (based on my experiences with Polylang's developer) please keep in mind that WP can also be invoked from CLI (either with wp-cli, or through including wp-load.php directly). As such, if you are going to include any warnings there - please do so only if the user actually invokes any output functions that would require WPLANG to be set in order to work correctly. Sometimes you want to load WP to alter settings or make changes to the database, and if you happen to be like me and treat all warnings/notices as errors, such "useless" warnings will actually break execution (as Exceptions) and will need to be handled out.

Thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants