Skip to content

Incorrect .te() result #2281

@ValievE

Description

@ValievE

Reporting a bug?

The error occurs when checking for translation using the te function. When checking a string without dots - the result is correct. But if the string contains a dot - the function for some reason shows that such translation doesn't exist.

Expected behavior

expected true, got false

Reproduction

translations.json

{
  "aaa": "translation without dot",
  "aaa.": "translation with dot."
}

function

      console.log("without dot", i18().i18n.global.te("aaa"));
      console.log("translation", i18().i18n.global.t("aaa"));
      console.log("with dot", i18().i18n.global.te("aaa."));
      console.log("translation", i18().i18n.global.t("aaa."));

result:
Image

System Info

macos, vue3.5

Screenshot

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions