Skip to content

Conversation

@jerome-rdlv
Copy link

@jerome-rdlv jerome-rdlv commented Jan 13, 2026

This pull request fixes issue #50.

It will apply the following changes :

  • Replace locale detection regex in two places with a dynamic regex based on Polylang locales

Note

Improves locale handling by deriving a regex from configured Polylang locales instead of assuming xx_XX.

  • Add Helpers::locales_regex_fragment() to build an escaped, joined locales regex
  • Update Helpers::already_localized() and Main::get_default_reference() to use the dynamic regex and match only trailing _<locale>
  • Guard with early return when no locales are available
  • Minor docblock formatting adjustments

Written by Cursor Bugbot for commit d56e3da. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant