Skip to content

Replace is_unknown with is_und #6519

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Replace is_unknown with is_und #6519

wants to merge 1 commit into from

Conversation

sffc
Copy link
Member

@sffc sffc commented May 2, 2025

Maybe fixes #6505

@gemini-code-assist There is some disagreement about whether this function should be called "is_unknown" or "is_und". Would you like to weigh in?

@sffc sffc requested review from echeran and Copilot and removed request for dminor, zbraniecki, Manishearth, nciric and robertbastian May 2, 2025 22:38
Copy link

@Copilot 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 renames the function and its references from is_unknown to is_und throughout the codebase to address naming consistency and resolve #6505.

  • Renames method names and related calls in multiple modules such as provider/core, provider/blob, and components/locale.
  • Updates inline documentation and test assertions accordingly.

Reviewed Changes

Copilot reviewed 446 out of 451 changed files in this pull request and generated no comments.

Show a summary per file
File Description
provider/core/src/request.rs Updated function name and corresponding call.
provider/blob/src/blob_schema.rs Replaced is_unknown with is_und in condition checks.
provider/baked/src/export.rs Changed all locale.is_unknown() calls accordingly.
provider/adapters/src/fallback/mod.rs Updated function call in fallback loop.
ffi/capi/src/locale_core.rs Updated documentation link to use is_und.
ffi/capi/src/fallbacker.rs Renamed check in next() method for locale.
components/locale_core/tests/langid.rs Updated test assertion to check is_und.
components/locale_core/src/subtags/language.rs Renamed method from is_unknown to is_und.
components/locale_core/src/preferences/locale.rs Updated conditional check for language preference.
components/locale_core/src/langid.rs Replaced is_unknown with is_und in identifier check.
components/locale_core/src/data.rs Updated API to use is_und in method and test examples.
components/locale/src/fallback/mod.rs Updated doc comments for fallback loop reference.
components/locale/src/fallback/algorithms.rs Replaced is_unknown with is_und in debug_assert calls.
components/locale/src/expander.rs Updated all checks and conditions to use is_und.
components/locale/src/canonicalizer.rs Replaced is_unknown checks in canonicalization functions.
Files not reviewed (5)
  • provider/data/calendar/data/calendar_chinese_v1.rs.data: Language not supported
  • provider/data/calendar/data/calendar_dangi_v1.rs.data: Language not supported
  • provider/data/calendar/data/calendar_hijri_simulated_mecca_v1.rs.data: Language not supported
  • provider/data/calendar/data/calendar_japanese_extended_v1.rs.data: Language not supported
  • provider/data/calendar/data/calendar_japanese_modern_v1.rs.data: Language not supported

Copy link

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

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.

Change Locale is_default functions to is_unknown
2 participants