Closed bfontaine closed 9 months ago
Hello, I use the latest version (2.4.2) and with TypeScript I get the above error when I use placeholders with t.get:
t.get
t.get("common.percentage", { percentage: 42 }) t.get('product.min_max_days', { min: value1, max: value2 })
I don’t have the issue with $t, but the above code is in a .ts file so per the docs I must use t.get.
$t
.ts
https://github.com/sveltekit-i18n/lib/issues/69 looks similar, but it was fixed.
I don’t know TypeScript enough to figure out how to fix this.
Any idea?
Updating the config by putting the placeholder names in the triangle brackets like here did the trick for me
https://github.com/sveltekit-i18n/lib/blob/c2d6f5395682e08533e5903f25289b3e9b179325/examples/parser-default/src/lib/translations/index.ts#L10-L15
Hello, I use the latest version (2.4.2) and with TypeScript I get the above error when I use placeholders with
t.get
:I don’t have the issue with
$t
, but the above code is in a.ts
file so per the docs I must uset.get
.https://github.com/sveltekit-i18n/lib/issues/69 looks similar, but it was fixed.
I don’t know TypeScript enough to figure out how to fix this.
Any idea?