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

Support retention of locale on links #27128

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

christianwach
Copy link
Member

Overview

Solves this issue on Lab.

Before

  1. The method to generate URLs for WordPress could not accommodate plugins that alter the structure of the URL to encode locale information on the front-end.
  2. Locale support on the front-end was implemented directly in the getUFLocale() method.

After

  1. A filter enables the url() method to generate front-end URLs that contain locale information as defined by 3rd party plugins.
  2. A filter enables the getUFLocale() method to support front-end locales as defined by 3rd party plugins.

Technical Details

Requires this PR on CiviCRM-WordPress.

@civibot
Copy link

civibot bot commented Aug 23, 2023

Thank you for contributing to CiviCRM! ❤️ We will need to test and review the PR. 👷

Introduction for new contributors
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers

@christianwach
Copy link
Member Author

Anyone able to explain the test failure? I can't figure out what's failed.

@colemanw
Copy link
Member

Yea those messages are pretty unhelpful. Let's try again: retest this please

@kcristiano
Copy link
Member

retest this please

Test failure looks "wrong"

@eileenmcnaughton
Copy link
Contributor

@kcristiano the test problem is resolved - this appears to be a purely Wordpress PR so I'll wait on your merge-request

@mlutfy
Copy link
Member

mlutfy commented Sep 7, 2023

We've been running this in prod for a while now (2-4 weeks?) and works well.

We also have other sites running WPML, with Shane's patch (based on PR 289 in the WP repo, adapted to the new structure), and both play well together.

@mlutfy mlutfy added the merge ready PR will be merged after a few days if there are no objections label Sep 7, 2023
@mlutfy mlutfy added needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state and removed merge ready PR will be merged after a few days if there are no objections labels Sep 7, 2023
@eileenmcnaughton
Copy link
Contributor

@colemanw if this is otherwise good we could probably change branch & merge to the rc since it probably will still switch base cleanly

@colemanw colemanw changed the base branch from master to 5.66 September 7, 2023 20:05
@civibot civibot bot added 5.66 and removed master labels Sep 7, 2023
@colemanw colemanw added merge ready PR will be merged after a few days if there are no objections merge on pass and removed needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state merge ready PR will be merged after a few days if there are no objections labels Sep 7, 2023
@colemanw
Copy link
Member

colemanw commented Sep 7, 2023

Merging per review/testing by @mlutfy

@colemanw colemanw merged commit a9fd7ac into civicrm:5.66 Sep 7, 2023
@christianwach christianwach deleted the lang branch September 8, 2023 11:25
@christianwach
Copy link
Member Author

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants