mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 04:00:31 +00:00
## Summary vue-i18n's n() function does not support passing Intl.NumberFormatOptions directly as the second argument. When widgets without precision defined (e.g., KJNodes' CreateShapeImageOnPath) were rendered, the n() function threw a SyntaxError in parseNumberArgs. Replace n() with native Intl.NumberFormat which properly supports NumberFormatOptions while still using the i18n locale for localization. ## Screenshots (if applicable) before https://github.com/user-attachments/assets/eb48379b-fe45-4f1c-a674-b92130f0fcac after https://github.com/user-attachments/assets/1abcd2da-ad8b-4432-831a-2a7e91f375a5 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Enhanced number input widgets with improved locale-aware number formatting, ensuring proper decimal and group separator display based on user locale settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8600-fix-use-Intl-NumberFormat-instead-of-vue-i18n-n-for-number-formatting-2fd6d73d365081b78509e87d516c6067) by [Unito](https://www.unito.io)