-
Notifications
You must be signed in to change notification settings - Fork 220
End-to-End Categorized Units Formatter with sliced data (Core / Extended / Outlier) #6868
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
Conversation
- Introduced `preferences` module in `cldr_serde/units` for handling unit preferences. - Added `unitPreferenceData.json` file to the test data, containing structured unit preference information. - Updated relevant modules to include the new `preferences` module and its functionality. - Enhanced `SourceDataProvider` to include unit preference data in the test setup.
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
- Introduced various new JSON files for unit lengths (e.g., centimeter, foot, mile) across multiple languages. - Added new modules for categorized display names and updated existing modules to include these new data structures. - Enhanced the `SourceDataProvider` to support the new unit length data and ensure proper integration with existing functionality.
- Introduced new JSON files for various units of length and mass (e.g., long-meter, short-kilogram) across multiple languages. - Removed outdated JSON files for certain units (e.g., long-foot, narrow-pound) to streamline the dataset. - Updated related modules to ensure compatibility with the new data structures and maintain functionality.
- Introduced new JSON files for volume units (e.g., core, extended, outlier) across multiple languages. - Updated the `categorized_display_name` module to include new volume unit display names. - Enhanced the `SourceDataProvider` to support the new volume unit data and ensure proper integration with existing functionality.
…unit markers - Updated the `CategorizedFormatter` to utilize separate data markers for core, extended, and outlier units. - Introduced new methods for creating formatters with extended and outlier data. - Enhanced the `MeasureUnitCategory` trait to define additional data markers for each unit category. - Updated tests to validate the new formatter functionality across different locales and unit types.
Summary
This PR implements an end-to-end “categorized units” formatter that slices units data into Core, Extended, and Outlier tiers, and wires that slicing through data loading, markers, and formatter construction. It also introduces unit preferences plumbing.
FOLLOW-UP ISSUE #6900
What’s included
cldr_serde/units
to handle unit preference data.unitPreferenceData.json
added to exercise preference-aware paths.CategorizedFormatter
now supports separate data markers for Core, Extended, and Outlier; added constructors to opt into Extended and Outlier.MeasureUnitCategory
extended to define additional data markers per category.