errors and warnings / stdlib / E8063
E8063 error
Locale string uses different placeholders than the base locale
- area
- stdlib (x8xxx)
- fails the build
- yes
A translation uses other placeholders than the base locale's string for the
same key. A key with placeholders ({name}) becomes a function whose
parameters are the base locale's placeholder names, so a translation must use
exactly the same names. It may put them in any order and repeat them. {{ and
}} are literal braces, not placeholders.
Example
{ "WELCOME": "Welcome back, {name}!" }{ "WELCOME": "Willkommen zurück, {spieler}!" }import L from "wowlua:locale"print(L.WELCOME({ name = "Thrall" })){ "WELCOME": "Welcome back, {name}!" }{ "WELCOME": "Willkommen zurück, {name}!" }import L from "wowlua:locale"print(L.WELCOME({ name = "Thrall" }))The compiler reports it like this:
error[E8063]: `WELCOME` in `locales/deDE.json` uses the placeholders [{spieler}], the base locale [{name}] = in locales/deDE.json
Related codes
| code | message |
|---|---|
| E8061 | Locale file defines a key unknown to the base locale |
Offline
$ wowlua explain E8063 E8063 (error): Locale string uses different placeholders than the base locale