generator outputs weird comments in i18n-types.ts RootTranslation · Issue #755 · codingcommons/typesafe-i18n · GitHub
Skip to content

generator outputs weird comments in i18n-types.ts RootTranslation #755

Open

Description

@dilame

Version

5.26.2

Describe the bug

I'm sorry for the screenshot, but i can't just copy the value – bug disappears.

Screenshot 2023-12-19 at 03 57 44

Here we can see that comment for TranslationFunctions is good. Comment in root translation contains the same text, but with each character separated by ZWSP (seems to stand for Zero-Width Space)

Reproduction

I don't do anything special – just npx typesafe-i18n --no-watch

Logs

No response

Config

{
  "baseLocale": "en-EN",
  "esmImports": true,
  "outputPath": "./src",
  "$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json"
}

Additional information

No response

Activity

  1. StagnantIce commented on Jun 20, 2024

    @StagnantIce

    Its not a bug, you can fix it by found this row:

    const addNonBreakingSpaceBetweenCharacters = (value: string) => value.split('').join('​')

  2. Alevale commented on Jul 18, 2025

    @Alevale

    I also thought this was a bug, but it's actually a feature, since it's meant to link to the right place when looking for a translation key, instead of having this also come up as an extra place.

    A better explanation can be provided by #585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions