fix: percents incorrectly formatted for locale ru #2939
Merged
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.
Closes #2938
Stand
Note
Adjusts
formatPercent
to round as a number and pass numeric value toconfiguredNumeral
, fixing locale issues (e.g., ru) and handling very small numbers.src/utils/dataFormatters/dataFormatters.ts
:formatPercent
to round usingNumber(value.toFixed(precision))
and pass a numeric value toconfiguredNumeral
.0.[00]%
format while improving handling of very small numbers and locale-specific decimal separators.Written by Cursor Bugbot for commit 38c83be. This will update automatically on new commits. Configure here.
Greptile Overview
Updated On: 2025-09-29 22:02:10 UTC
Summary
This PR fixes a locale-specific formatting issue in the
formatPercent
function where percentages were incorrectly formatted for the Russian locale. The root cause was passing string values toconfiguredNumeral
which caused issues with decimal separator parsing in non-English locales.Key Changes:
formatPercent
to pass numeric values instead of strings toconfiguredNumeral
0.[00]%
format while ensuring proper locale handlingTechnical Impact:
The fix ensures that percentage values display correctly across all supported locales, particularly Russian, where decimal separators differ from English conventions. This change affects any UI component that displays percentage values in the YDB Embedded UI.
Confidence Score: 5/5
Important Files Changed
File Analysis
Sequence Diagram
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 85.61 MB | Main: 85.61 MB
Diff: +0.00 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information