v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8105

E8105 error

Invalid locale file name or unknown locale code

area
stdlib (x8xxx)
fails the build
yes

A file in the locales folder (locales/ by default, build.locales-dir names another) is not named by a locale code. Only *.json files are read, and each one must be called after the client locale it translates: enUS, enGB, deDE, esES, esMX, frFR, itIT, koKR, ptBR, ruRU, zhCN or zhTW, plus .json. Rename the file.

Example

× failslocales/enUS.jsonjson
{ "TITLE": "Kill Tracker" }
locales/german.jsonjson
{ "TITLE": "Kill-Tracker" }
src/main.wowluawowlua
import L from "wowlua:locale"print(L.TITLE)
✓ compileslocales/enUS.jsonjson
{ "TITLE": "Kill Tracker" }
locales/deDE.jsonjson
{ "TITLE": "Kill-Tracker" }
src/main.wowluawowlua
import L from "wowlua:locale"print(L.TITLE)

The compiler reports it like this:

error[E8105]: `german.json`: `german` is no locale code
 = in locales/german.json
 = help: locale files are named by locale: enUS, enGB, deDE, esES, esMX, frFR, itIT, koKR, ptBR, ruRU, zhCN, zhTW
codemessage
E8106Base locale file missing

Offline

terminal
$ wowlua explain E8105
E8105 (error): Invalid locale file name or unknown locale code

source on GitHub ↗