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
Appears type error when I use the json file as a resource ,but translations to a object using as const, it'll work.
Last working version
Worked up to version: 23.11.3
Stopped working in version: 23.11.3
To Reproduce
Steps to reproduce the behavior: HTTP.json
{
"403": "403 Forbidden \n You don鈥檛 have permission to access this page.",
"500": "Looks like the server is taking too long to respond, this can be caused by either poor connectivity or an error with our servers. Please try again in a while.",
"503": "Service temporarily unavailable.",
"501": ["a", "b", "c", "d", "e"]
}
importHTTPfrom'./HTTP.json';constdefaultNS='general';consthttpCode={'403': '403 Forbidden \n You don鈥檛 have permission to access this page.','500':
'Looks like the server is taking too long to respond, this can be caused by either poor connectivity or an error with our servers. Please try again in a while.','503': 'Service temporarily unavailable.','501': ['a','b','c','d','e'],}asconst;exportconstresources={en: {general: {http: HTTP,},},}asconst;i18next.init({lng: 'en',debug: true,
defaultNS,
resources,});
And also type issue that if i use snake_case in json the generate new field as snakease
{
"403": "403 Forbidden \n You don鈥檛 have permission to access this page.",
"500": "Looks like the server is taking too long to respond, this can be caused by either poor connectivity or an error with our servers. Please try again in a while.",
"503": "Service temporarily unavailable.",
"error_code": "error"
}
馃挜 Regression Report
Appears type error when I use the json file as a resource ,but translations to a object using as const, it'll work.
Last working version
Worked up to version: 23.11.3
Stopped working in version: 23.11.3
To Reproduce
Steps to reproduce the behavior:
HTTP.json
https://stackblitz.com/edit/solidjs-templates-zghu8f?file=src%2Fi18n.ts,src%2FApp.tsx,src%2Fi18n.d.ts,src%2FHTTP.json,tsconfig.json
Your Environment
The text was updated successfully, but these errors were encountered: