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

Wildcard locales as fallback #254

Merged
merged 4 commits into from
Nov 17, 2023
Merged

Wildcard locales as fallback #254

merged 4 commits into from
Nov 17, 2023

Conversation

jumc
Copy link
Collaborator

@jumc jumc commented Nov 16, 2023

What problem is this solving?

Wildcard queries are expensive to process at Masterdata. Since locales are finite and defined at ISO-639-1 and country codes too (for ISO-3166-1) we are able to use locale values statically and change the wildcard query to OR.
We'll keep the wildcard as fallback.

@jumc jumc self-assigned this Nov 16, 2023
@jumc jumc requested review from btalma and polishq November 16, 2023 20:09
Copy link

vtex-io-ci-cd bot commented Nov 16, 2023

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Nov 16, 2023

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Copy link

github-actions bot commented Nov 16, 2023

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 159, PR deletions = 7

Generated by 🚫 dangerJS against 99da173

@@ -413,13 +414,23 @@ public async Task<ReviewsResponseWrapper> GetReviewsByProductId(string productId

AppSettings settings = await GetAppSettings();

if (pastRevNLocale)
if (Locale.localeList.ContainsKey(locale))
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to check for null or empty locale
if (!string.IsNullOrEmpty(locale) && Locale.localeList.ContainsKey(locale))

Copy link
Contributor

@btalma btalma left a comment

Choose a reason for hiding this comment

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

lgtm

@polishq polishq merged commit ddb7195 into master Nov 17, 2023
7 of 9 checks passed
@polishq polishq deleted the wildcard-fallback branch November 17, 2023 14:13
Copy link

vtex-io-ci-cd bot commented Nov 17, 2023

Your PR has been merged! App is being published. 🚀
Version 3.13.3 → 3.14.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

This was referenced Nov 17, 2023
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.

3 participants