Skip to content

KeyPrefix not working with new selector api #2340

@reckter

Description

@reckter

🐛 Bug Report

keyPrefix not working with the new selector api

To Reproduce

It seems that keyPrefix is not working with the new selector api.
Insetad of a translation I just get "the ket itself" (see picture)

Image

(removed all of the fluff around the issue)

export function TodoWidget() {
	const { t } = useTranslation("common", { keyPrefix: "TodoWidget" })

	return ({t($ => $.headings.title)}
}

This works:

export function TodoWidget() {
	const { t } = useTranslation("common")

	return ({t($ => $.TodoWidget.headings.title)}
}
  • i18next version: 24.5.0
  • seletor api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions