Support number skeleton
See original GitHub issueI’m currently migrating one of my projects from svelte-i18n
to svelte-intl-precompile
and got the following error.
foo/locales/de-DE.json: Property value expected type of string but got object
TypeError: foo/locales/de-DE.json: Property value expected type of string but got object
at Object.validate (foo/node_modules/@babel/types/lib/definitions/utils.js:159:13)
at validateField (foo/node_modules/@babel/types/lib/validators/validate.js:24:9)
at validate (foo/node_modules/@babel/types/lib/validators/validate.js:17:3)
at String.builder (foo/node_modules/@babel/types/lib/builders/builder.js:39:27)
at Object.stringLiteral (foo/node_modules/@babel/types/lib/builders/generated/index.js:357:27)
at buildCallExpression (foo/node_modules/babel-plugin-precompile-intl/src/index.js:52:42)
at buildTemplateLiteral (foo/node_modules/babel-plugin-precompile-intl/src/index.js:110:30)
at buildFunction (foo/node_modules/babel-plugin-precompile-intl/src/index.js:160:67)
at PluginPass.ObjectProperty (foo/node_modules/babel-plugin-precompile-intl/src/index.js:202:26)
at newFn (foo/node_modules/@babel/traverse/lib/visitors.js:177:21)
After some digging I found out that the use of number skeletons (e.g Account balance {balance, number, ::currency/EUR}
) is causing this error.
IMO the number skeletons are a very important part of the ICU Message Format and it would be nice if they where supported by svelte-intl-precompile
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Contact Us - SkeletonHD
Do you have a question? A suggestion? Feel free to contact us and we will be happy to help you! Get coupons and...
Read more >ICU - Number format skeleton support
ICU number formatters support different styles, like percent, currency, scientific or decimal. Those produce locale appropriate results, ...
Read more >Support - Skeleton Key
Get Started With A Free Consultation Today! · First Name* · Last Name* · Company* · Phone Number* · Email* · Tell Us...
Read more >5124738_HAL-22452_12 Foot Skeleton_IS_HD_BILT_OL
Please follow the step by step guide and enjoy your 12 Foot Skeleton! ... If the item still does not work, call 1-877-527-0313...
Read more >[3.18]Summon Skeleton Mages Necromancer build - Odealo
Absolution - A Spell that creates Minions on Kill and refreshes their duration if you've reached the maximum number of them. Onslaught Support...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agreed. I must have missed that one as it’s one I haven’t used myself. I’m going to check https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html and see if I can get an initial implementation by the end of the week. When I do I’ll ping you so you can test if works as you expect
Closing since this has been released in 0.10