Skip to content

fix(adventure): compare translation locales by value - #809

Merged
Strokkur424 merged 1 commit into
PaperMC:mainfrom
spa77k:fix/locale-value-comparison
Oct 16, 2026
Merged

Strokkur424 merged 1 commit into
PaperMC:mainfrom
spa77k:fix/locale-value-comparison

Conversation

@spa77k

@spa77k spa77k commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Compare locales by value in both custom Translator examples. Reference equality can reject an equivalent Locale instance and make the example return null instead of a translation.

For example, (Locale) Locale.US.clone() is equal to Locale.US, but is not the same object.

Verification

  • Ran a standalone Java regression check: the original conditions reject the equal-but-distinct locale; the corrected conditions accept it and Locale.US, while rejecting Locale.UK and Locale.JAPAN.
  • git diff --check passed. Only the two locale comparisons changed.
  • Local dependency installation exited with code 137, including a reduced-concurrency retry. Local formatting and site build checks could not run; this draft leaves those checks to the existing CI workflows.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
papermc-docs ✅ Ready (View Log) Visit Preview 5ba9035

@Strokkur424
Strokkur424 merged commit eb798eb into PaperMC:main Oct 16, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 5ba9035b Deployed Oct 16, 2026 by github-actions[bot]
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.

2 participants