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

Make wordpress locale configurable #56

Merged
merged 3 commits into from
Sep 6, 2021
Merged

Make wordpress locale configurable #56

merged 3 commits into from
Sep 6, 2021

Conversation

rogervanwile
Copy link
Contributor

Description

Currently Wordpress is always installed in the en_US version. With this change it is now possible to determine in which locale Wordpress should be installed. This makes it easy to test non-English plugins.

To use this feature, just add a locale to your cypress.json. If no one provided, en_US is used.

{
    "wp": {
        "locale": "de_DE"
    }
}

Change Log

  • Add locale as new config setting

Types of changes (if applicable):

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist (if applicable):

  • Meets provided linting standards.

@liamdefty liamdefty self-requested a review March 15, 2021 13:45
Copy link
Contributor

@liamdefty liamdefty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, makes sense and will be a very useful addition.

Just one tiny thing, do you think we could update the validation config schema for this:

https://github.com/bigbite/wp-cypress/blob/master/lib/schemas/config-validation.json

I think we only need to validate it is a string?

@liamdefty liamdefty changed the base branch from master to develop March 15, 2021 13:58
@liamdefty liamdefty changed the base branch from develop to master March 15, 2021 13:58
@rogervanwile
Copy link
Contributor Author

@liamdefty Thanks for your input. I added a config validation rule. I don't know this schema, but I hope I have implemented the right way. I also added a regex pattern.

Copy link
Member

@ampersarnie ampersarnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rogervanwile, sorry it's taken so long for us to pick this back up. I've given this a test and found that the validation doesn't work with some locales and given some additional information. As it's taken a while to get to this I completely understand if you're not able to make the change. If not we can pick up where you leave it.

But thank you for this contribution, it's a valuable one.

@ampersarnie ampersarnie changed the base branch from master to 1.0.0 August 7, 2021 17:06
@ampersarnie ampersarnie merged commit 7ba22cc into bigbite:1.0.0 Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants