v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8115

E8115 error

Locale file is not a JSON object of strings

area
stdlib (x8xxx)
fails the build
yes

A locale file is not a JSON object whose values are all strings. The file may not be valid JSON, its top level may not be an object, or a value may be a number, a table or null. Every translation is a string, so write numbers in quotes, and fix the JSON syntax if the file doesn't parse.

Example

× failslocales/enUS.jsonjson
{ "TITLE": "Kill Tracker", "MAX_KILLS": 100 }
src/main.wowluawowlua
import L from "wowlua:locale"print(L.TITLE)
✓ compileslocales/enUS.jsonjson
{ "TITLE": "Kill Tracker", "MAX_KILLS": "100" }
src/main.wowluawowlua
import L from "wowlua:locale"print(L.TITLE, L.MAX_KILLS)

The compiler reports it like this:

error[E8115]: `MAX_KILLS` in `locales/enUS.json` must be a string
 = in locales/enUS.json
codemessage
E8060Invalid locale key

Offline

terminal
$ wowlua explain E8115
E8115 (error): Locale file is not a JSON object of strings

source on GitHub ↗