Skip to content

Conversation

@elylucasctfl
Copy link
Contributor

No description provided.

@elylucasctfl elylucasctfl requested a review from a team as a code owner November 7, 2025 20:14
@elylucasctfl elylucasctfl requested a review from Copilot November 7, 2025 20:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes locale handling to strip Unicode extension tags (e.g., "-u-fw-sun-mu-celsius") that Android 14+ includes in locale strings. Contentful's API doesn't support these extensions, so they need to be removed while preserving the base locale code (language, script, and region).

  • Added stripExtensionsFromLocale() method to normalize locale strings by removing Unicode extensions
  • Updated withLocale() to normalize locales before storing them
  • Added comprehensive test coverage for various locale formats including edge cases

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/com/contentful/java/cda/AbsQuery.java Implements locale normalization by stripping Unicode extensions using -u- as the separator
src/test/java/com/contentful/java/cda/AbsQueryTest.java Adds 11 test cases covering standard locales, Unicode extensions, edge cases, and locale format variations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

@rafalniski rafalniski left a comment

Choose a reason for hiding this comment

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

Good work!

@rafalniski rafalniski self-requested a review November 11, 2025 09:41
@rafalniski rafalniski merged commit 9e52649 into master Nov 11, 2025
5 checks passed
@rafalniski rafalniski deleted the andr-14-strip-extensions-from-locale branch November 11, 2025 17:06
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.

5 participants