Skip to content

plugin-i18next: T, FT, resolveKey and resolveUserKey are not exported, contrary to the migration guide #114

Closed

Description

@RedStar071

Description

The migration guide from @wolfstar/http-framework-i18n (https://stars-components.js.org/documentation/guide/migration#i18next, section "Module Specifier Renamed") states that T, FT, resolveKey and resolveUserKey "keep the same names and signatures", so a migration would be a find-and-replace of the module specifier.

@wolfstar/[email protected] and 2.0.4 export none of them. The ESM index only exports InternationalizationHandler, apply*LocalizedBuilder, createLocalizedChoice, createSelectMenuChoiceName, fetchKey, fetchLanguage, fetchT, getLocalizedData, getSupported*, i18next, isSupportedDiscordLocale and supportedLanguages. A migrated project fails at load time:

SyntaxError: The requested module '@wolfstar/plugin-i18next' does not provide an export named 'T'

When Sapphire's loader hits this inside a command piece, the command is dropped and the endpoint answers 501 Unknown command name.

Reproduction

import { T } from '@wolfstar/plugin-i18next'; // SyntaxError
import { resolveUserKey } from '@wolfstar/plugin-i18next'; // SyntaxError

Expected behaviour

Either:

  • ship T/FT (typed key helpers) and resolveKey/resolveUserKey as the guide promises, or
  • confirm they are intentionally gone, so the guide can document the replacements: plain key strings typed through CustomTypeOptions, and getSupportedUserLanguageT(interaction, key, options) / getSupportedLanguageT(...).

A matching documentation issue is open in wolfstar-project/website.

Activity

  1. pullfrog commented on Sep 26, 2026

    @pullfrog
    Contributor

    Thanks for the detailed repro. I dug into packages/plugin-i18next and I don't think there's a code bug here — this looks like a stale-documentation issue on a different repo.

    What's happening

    T, FT, resolveKey and resolveUserKey were intentionally removed from @wolfstar/plugin-i18next in v2.0.0 (PR #57), porting the same breaking change made upstream in @wolfstar/http-framework-i18n (stars-components #30). This package's own README documents it accurately:

    • The "Migrating from @wolfstar/http-framework-i18n" section explicitly lists which exports "keep the same names and signatures" (getSupportedLanguageName, getSupportedUserLanguageT, supportedLanguages, etc.) — T/FT/resolveKey/resolveUserKey are not in that list.
    • A dedicated "Migrating off T / FT / resolve*" section right after it spells out the replacements:
      • T(key) / FT<Args>(key) → the plain key string, typed via the CustomTypeOptions augmentation from @wolfstar/i18next-type-generator
      • resolveKey(target, key, options) → getSupportedLanguageT(target, key, options)
      • resolveUserKey(target, key, options) → getSupportedUserLanguageT(target, key, options)

    So packages:plugin-i18next in this repo is behaving as designed — the four helpers are gone by design, not by omission, and the package's own docs already describe the migration.

    Where the actual gap is

    The migration guide you linked (stars-components.js.org, "Module Specifier Renamed") appears to be out of date: it claims T/FT/resolveKey/resolveUserKey "keep the same names and signatures," which contradicts the breaking change both packages shipped. Since you've already opened the matching doc issue in wolfstar-project/website, that's the right place to land the fix — updating that guide to match this package's README (either point readers at getSupportedLanguageT/getSupportedUserLanguageT and typed plain keys, or explicitly call out the four helpers as removed).

    I don't see anything to change in wolfstar-project/plugins for this — happy to revisit if I'm missing something, but I'd suggest closing this one in favor of the website issue once that's confirmed.

    Pullfrog  | Implement a fix ➔ | View workflow run | via Pullfrog | Using Claude Sonnet | 𝕏

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

    bug:confirmedpackages:plugin-i18next

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions