You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support locale-aware numeric input without silently truncating decimal commas #17
UI display formatting follows strings.locale, but numeric input parsing does not. This is a follow-up to #6 and is separate from the translation and optional-language bundling work.
Current behavior:
src/core/xlsx/editor.ts (parseInput) recognizes decimal dots only. With German UI/formatting (strings.locale = 'de-DE'), entering 1,5 in a spreadsheet cell stores text rather than the numeric value 1.5.
src/react/edit/Toolbar.tsx (SizeBox) uses parseFloat. An input such as 12,5 can silently become 12 instead of 12.5.
Translated labels and localized number display therefore do not imply localized input support.
Reproduce:
Import the German table from @p10node/office-engine/locales/de and pass it as strings to an editable viewer.
Enter 1,5 in a spreadsheet cell and inspect its saved type/value: it is text.
Enter 12,5 in a font-size field and commit: the parser can truncate at the comma.
Expected behavior / acceptance criteria:
Parse numeric user input according to the active strings.locale (for example, 1,5 in de-DE and 1.5 in en-US both produce the numeric value 1.5).
Apply the same parsing rules consistently to spreadsheet numeric/percentage input and editable numeric controls such as font size.
Validate the entire input; reject invalid or ambiguous separators rather than silently accepting a prefix.
Define and document grouping-separator behavior, including locale-specific spaces, and distinguish grouping from decimal separators.
Preserve canonical OOXML numeric storage and formula syntax; changing the UI language must not reinterpret existing workbook values or rewrite stored formulas.
Cover decimal-dot/comma locales, percentages, grouping/ambiguity, invalid input, and saved-value round trips with focused tests.
Formula-entry localization (localized function names or argument separators) can be scoped separately; it should not be conflated with UI number parsing.
Activity
fix(toolbar): a decimal comma in the font size is a decimal point