easy-i18n icon indicating copy to clipboard operation
easy-i18n copied to clipboard

JSON String to Number

Open zrbaihld opened this issue 2 years ago • 9 comments

image when add a new translate。the json file String will be change to number,then show error

zrbaihld avatar Dec 05 '22 08:12 zrbaihld

@marhali help

zrbaihld avatar Dec 05 '22 08:12 zrbaihld

Works as designed. If the value can be parsed as a number, the number representation will be used. I could add a configuration option to always save values as strings. But I see a few edge cases here:

  • Numbers (float, int, double)
  • Booleans

marhali avatar Dec 07 '22 17:12 marhali

thinks 。parsed as a number in vue-i118n has problem

zrbaihld avatar Dec 08 '22 01:12 zrbaihld

In ARB file using numbers gives error.

ebsangam avatar Jan 23 '23 06:01 ebsangam

A configuration option for always using numbers would be great, as vue-i18n can't read numbers from my translation files :/

AndreasHerss avatar Apr 14 '23 11:04 AndreasHerss

A configuration option for always using numbers would be great, as vue-i18n can't read numbers from my translation files :/

Did you get around this issue or have you had to remove the plugin?

GlenLamb avatar Nov 21 '23 11:11 GlenLamb

A configuration option for always using numbers would be great, as vue-i18n can't read numbers from my translation files :/

Did you get around this issue or have you had to remove the plugin?

I didn't get around it, but for my usecase i could prepend a descriptive string to fix it 😅

AndreasHerss avatar Nov 21 '23 11:11 AndreasHerss

A configuration option for always using numbers would be great, as vue-i18n can't read numbers from my translation files :/

Did you get around this issue or have you had to remove the plugin?

I didn't get around it, but for my usecase i could prepend a descriptive string to fix it 😅

That's so upsetting, we were just getting excited about this tool and then realized it just stops our entire application from even starting.

GlenLamb avatar Nov 21 '23 11:11 GlenLamb

The worst problem for me is a phone number prefix. Example, if i try to use: "phone.placeholder": "+420" after updating anything else, it is rewritten to "phone.placeholder": 420 and the "+" is deleted. if i try to escape it, and write "\+420" after first update it is rewritten to "+420" after any additional update it is rewritten to number

Priebojp avatar Jun 06 '24 12:06 Priebojp