Skip to content

DEV: Use localizable concerns across post, topic, categories #34137

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

Merged
merged 2 commits into from
Aug 7, 2025
Merged

Conversation

nattsw
Copy link
Contributor

@nattsw nattsw commented Aug 7, 2025

This is the first in the series and helps prepare us for crawler_view. Existing tests should cover the use of these concerns.

/t/160415

This helps prepare us for crawler_view.

/t/160415
scope :matching_locale,
->(locale) do
regionless_locale = locale.to_s.split("_").first
where("locale LIKE ?", "#{regionless_locale}%")
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, what does regionless mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like, en is the locale in en_GB we could define GB as a region (/country)

@nattsw nattsw merged commit f4e0842 into main Aug 7, 2025
15 checks passed
@nattsw nattsw deleted the loc-con branch August 7, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants