Open kolkinn opened 1 year ago
In v23 of i18next, they added the ability to infer interpolation values in TypeScript. This feature requires the object that is exported in a *.ts file to have as const appended to the declaration, like in the example below: https://github.com/i18next/i18next/blob/master/examples/typescript/i18n/en/ns1.ts
*.ts
as const
In my current project we have been using *.ts files for our translations, which has worked well with i18n Ally. These look like this:
export default { color: { green: "Green", red: "Red", }, close: "Close", submit: "Submit", };
As soon as I added as const at the end, i18n Ally complained.
export default { color: { green: "Green", red: "Red", }, close: "Close", submit: "Submit", - }; + } as const;
Would it be possible for i18n Ally to support this format by ignoring the as const part?
In v23 of i18next, they added the ability to infer interpolation values in TypeScript. This feature requires the object that is exported in a
*.ts
file to haveas const
appended to the declaration, like in the example below: https://github.com/i18next/i18next/blob/master/examples/typescript/i18n/en/ns1.tsIn my current project we have been using
*.ts
files for our translations, which has worked well with i18n Ally. These look like this:As soon as I added
as const
at the end, i18n Ally complained.Would it be possible for i18n Ally to support this format by ignoring the
as const
part?