i18n icon indicating copy to clipboard operation
i18n copied to clipboard

Missing type definitions for original i18next properties

Open scrlkx opened this issue 5 months ago • 4 comments

Hey!

Please, take a look into the config bellow.

import i18n from "@astrolicious/i18n";

i18n({
  ns: [
    "common",
    "home",
    "hero",
    "how-we-work",
    "our-clients",
    "services",
    "cases",
    "who-we-are",
    "careers",
    "blog",
    "contact",
    "footer",
    "404",
    "500",
  ],
  defaultNamespace: "common",
  locales: ["en", "es"],
  defaultLocale: "en",
  strategy: "prefix",
  rootRedirect: {
    status: 301,
    destination: "en",
  },
})

If you try to use it on astro.config.mjs you should have no problem, but if you try it to move it into a TypeScript file it will complain that the ns property doesn't exist.

Maybe we should inherit the original properties from i18next? Is there any workaround I can use to trick it to have all the original properties?

scrlkx avatar Sep 24 '24 11:09 scrlkx