Add support for 3-2-2 comma rule (Indian number grouping)#3
Draft
Add support for 3-2-2 comma rule (Indian number grouping)#3
Conversation
Co-authored-by: gigincg <13028584+gigincg@users.noreply.github.com>
Co-authored-by: gigincg <13028584+gigincg@users.noreply.github.com>
Member
|
@claude[agent] Are you sure this ability is not available using an ENV |
Author
Yes, this feature is available via the MB_CUSTOM_FORMATTING='{"type/Number":{"number_separators":".,","number_grouping":"indian"}}'This allows instance-wide configuration via ENV without requiring UI access. The setting validates the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
PENDING REVIEW
What does this PR accomplish?
MB_CUSTOM_FORMATTINGHow to test this manually?
Option 1: UI Configuration
Option 2: Environment Variable Configuration
MB_CUSTOM_FORMATTINGenvironment variable:MB_CUSTOM_FORMATTING='{"type/Number":{"number_separators":".,","number_grouping":"indian"}}'Additional notes:
Implementation approach:
Uses native locale support (
en-INfor Indian,enfor Western) rather than custom grouping logic, ensuring standards compliance and maintainability.Changes made:
number_groupingfield toNumberFormattingSettingsen-INlocale whennumber_groupingis "indian"available-number-groupingsset and validationactive-localeto return Indian locale for 3-2-2 groupingEnvironment variable support:
The
number_groupingsetting is stored within the existingcustom-formattingJSON structure, making it automatically configurable via theMB_CUSTOM_FORMATTINGenvironment variable. This allows instance-wide configuration in containerized deployments without requiring UI access.Backward compatibility:
Default behavior unchanged (Western grouping). New
number_groupingfield is optional.Screenshots:
Settings UI showing the new grouping style option would be helpful here
Original prompt