Skip to content

chore(deps): update i18next-cli to v1.93.1 - #3721

Merged
setchy merged 1 commit into
mainfrom
renovate/i18next-cli-1.x
Nov 25, 2026
Merged

setchy merged 1 commit into
mainfrom
renovate/i18next-cli-1.x

Conversation

@renovate

@renovate renovate Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
i18next-cli (source) 1.87.0 → 1.93.1 age confidence

Release Notes

i18next/i18next-cli (i18next-cli)

v1.93.1

Compare Source

  • fix(extract): keys named like Object.prototype members (constructor, toString, valueOf,
    page.constructor.title) are written like any other key instead of being dropped, written flat or reported as a
    nesting conflict, and a __proto__ key no longer writes to Object.prototype
    (#​334, thanks @​zzoraemon043).

v1.93.0

Compare Source

  • feat(extract): the setup plugin hook receives the plugin context (config, logger), as lintSetup and
    instrumentSetup do, so a plugin can read the i18next-cli config (locales, extract options) instead of taking
    the same options again. Plugins whose setup takes no argument keep working. Fixes
    #​333.

v1.92.0

Compare Source

  • fix(lint): a non-JS/TS file (.astro, .vue, .svelte, …) is linted the way extract reads it. What a plugin's
    lintOnLoad returns for it is parsed as TSX, so a plugin can hand the linter TypeScript and JSX; before, it was parsed
    as plain JavaScript. A file no plugin returns code for is skipped, with the same warning extract gives when its
    extension is in extract.input, instead of failing with a syntax error. With
    i18next-cli-plugin-astro, lint now checks .astro files.
  • feat: Linter is exported from the package root, as the README's Advanced Usage section shows. It is an
    EventEmitter, so the example now listens with linter.on('progress', …).
  • feat(instrument): the i18n init file it creates for a browser app picks the browser's language: lng from
    navigator.language, matched against supportedLngs (the config's locales), so de-DE shows German. Before, lng
    was a comment and the app showed fallbackLng only.
  • fix(instrument): a generated key no longer starts with a number (© 2026 Ledgerly. All rights reserved. becomes
    ledgerlyAllRightsReserved) and says a word once when a placeholder is named like the word next to it (You have {unpaid} unpaid invoices. becomes youHaveUnpaidInvoices).

v1.91.3

Compare Source

  • fix(lint): the interpolation parameter check reads a key's translation from the file of its namespace, so a missing
    or unused parameter is now reported outside the default namespace too: useTranslation('home'),
    t('home:greeting'), t('greeting', { ns: 'home' }) and selector calls, with a keyPrefix, in a merged
    single-file output and with defaultNS: false. Before, only the default namespace's file was read, so these calls
    went unchecked. The default namespace is extract.defaultNS (translation when unset) like in extract; lint no
    longer falls back to a common.json or default.json. The variables of every plural form of a key count.

v1.91.2

Compare Source

  • feat(extract): the warning for an .astro file in extract.input that no plugin handles names the fix: the new
    official i18next-cli-plugin-astro, which lets extract and
    status find the keys in .astro files.

v1.91.1

Compare Source

  • fix(extract): a nested $t() option whose name only contains count or context ({"discount": 5},
    {"subcontext": "vip"}) is no longer read as a plural or context reference, so extract keeps price instead of
    writing empty price_one / price_other, and removeUnusedKeys no longer drops the existing translation
    (#​332, thanks @​zzoraemon043).
  • fix(extract): the options of a t() call in a comment are read by their whole name too: // t('price', { discount: 5 })
    no longer extracts price_one / price_other, { subcontext: 'vip' } no context key and { dns: 'other' } no
    other namespace. A quoted name ({ "count": 2 }) now counts like an unquoted one.
  • chore(deps): i18next 27.2.2, react-i18next 18.0.3, nano-spawn 3 and other dependency updates.

v1.91.0

Compare Source

  • feat(lint): <Trans> tags of a translation that miss the component's children are reported, with file, line
    and ns:key. <Trans> numbers its children, text included, so the {' '} a formatter inserts at a line break
    shifts every later index: in Each reminder needs{' '}<Bold>a contact</Bold>, <Bold> is <2>, and a
    translation with <1>a contact</1> renders Each reminder needs without an error anywhere. The tags of the
    primary language (context and plural forms included) are resolved like react-i18next does at runtime, and a tag
    on a text child, past the last child, empty on an element with text, or with content on a <br/> is reported.
    A <Trans> with components is skipped. Configure with lint.checkTransIndices ('warn' by default).
    Fixes #​331.
  • fix(extract): an &nbsp; at the end of a line inside <Trans> is a child of its own, as Babel and SWC compile
    it, and takes an index in the default value. It was dropped like formatting whitespace, so every later index
    was one too low: Price&nbsp;⏎<b>x</b>&nbsp;⏎<em>y</em> extracted <2>y</2>, which renders the space instead
    of y.

v1.90.0

Compare Source

Found by running init, instrument, extract, lint and status on the next-i18next examples, on copies of
them with their texts hardcoded again (to compare the rewrite with the hand-written original) and on hardcoded
Next.js apps, and reading every rewrite.

next-i18next:

  • feat(instrument): a Next.js app with next-i18next (a dependency, or imported), or with no i18next at all, gets
    next-i18next's calls by where each file renders, from the import graph ('use client', app/, pages/,
    imports relative, through the tsconfig or jsconfig paths and from the project root): const { t } = await getT() in Server Components, which become async (a return type becomes Promise<…>), useT() from
    next-i18next/client in Client Components, useTranslation from next-i18next/pages in the Pages Router.
    Server Components got useTranslation() before, a client hook that fails there. A Next.js app with i18next or
    react-i18next and no next-i18next keeps react-i18next.
  • feat(instrument): a <Trans> in a Server Component gets t={t} i18n={i18n} and comes from
    react-i18next/TransWithoutContext; getT comes from the module the app imports it from (its own
    createServerI18next file) when that is not next-i18next/server.
  • feat(instrument): generateMetadata() and other async functions of a Server Component file get getT(), and
    export const metadata = { title: '…' } becomes export async function generateMetadata () returning it.
    They got i18next.t() before, which next-i18next does not initialize.
  • feat(instrument): left as they are, each named in a warning: components that Server and Client Components both
    render (no t works in both) unless they get t (and i18n for a <Trans>) as props, files no route
    imports, texts outside components, API routes, Server Actions and cached functions ('use server',
    'use cache'), Server Components wrapped in memo()/forwardRef(), and language switches, which
    next-i18next makes through the route or useChangeLanguage() (a call of that switch got
    i18n.changeLanguage() added before).
  • fix(instrument): no i18n.ts init file and no import of it in _app or the root layout for next-i18next, which
    sets i18next up itself; the setup steps are printed when it is not set up yet, and the pages that load no
    translations (no serverSideTranslations() in them or in a helper they import) are named.
  • feat(init): the defaults the app's setup decides: the source glob covers the directories that exist
    ({app,components}/**/* rather than src/**/*, where a Next.js app without src/ has no file),
    next-i18next's defaultNS (common unless its config says otherwise, so extract writes the keys of useT()
    to the namespace next-i18next loads), messageFormat for i18next-icu or i18next-mf2, and keySeparator: false
    for flat keys with dots, which extract nested before. lint and status without a config detect the same.

Any React app:

  • fix(instrument): an import went before a 'use client' directive in a file without imports, which ends the
    directive.
  • fix(instrument): a component that calls a translation hook without taking t (const { i18n } = useT('ns'))
    got a second hook call; t now comes from that call and its namespace (const { t, i18n } = useT('ns')),
    unless a text comes before the call.
  • fix(instrument): a function that is no component but binds t from a translation hook (a custom hook,
    generateMetadata with getT()) got i18next.t(); a t from getFixedT() counted as a t of another kind.
  • fix(instrument): the texts and values of IcuTrans, IcuTransWithoutContext and TransWithoutContext were
    translated (values={{ name: t('ada', 'Ada') }}).
  • fix(instrument): an empty element at the edge of a sentence (<hr />, <br />) went into its <Trans>.
  • fix(instrument): next-i18next v{pkg.version} was split into a t() of its first part: a word with digits
    in a later part (i18next) now counts as a word beside a placeholder.
  • fix(instrument): a key of a text with accents dropped those letters (Français gave franais).
  • fix(extract): no line per JavaScript file with JSX, nor per TypeScript .ts file with it ("Parsed … using JSX
    fallback"), which is common enough to need no note.
  • fix(extract): --watch on a glob that starts with a brace group ({app,components}/**) watched the whole
    project, .next and .git included.

v1.89.0

Compare Source

Found by running instrument, extract, lint and status on a React monorepo whose texts are hardcoded (four
packages, about 900 files) and reading every rewrite.

Code it broke:

  • fix(instrument): useTranslation imported or const { t } declared twice: a component with a t of its own
    (a prop, or a hook from a module that re-exports it) gets no second one, and no name the file imports already
    is imported again. "Has useTranslation" was a text search of the component body.
  • fix(instrument): object keys and computed keys were rewritten ('a b': 1 became t(…): 1, a syntax error).
  • fix(instrument): imports were placed by text, so a string showing code with import … from lines got them.
  • fix(instrument): the language-change injection broke code. It went before any call with a language, lang,
    locale or lng property (return fetchDownloads({ lng }) became return i18next.changeLanguage(…); fetchDownloads(…), a const or an if body lost its call) and repeated computed expressions. It now goes
    only before a call that is a statement of its own in a block or an arrow body, with a plain variable or
    property as the language, for a setter or a settings, profile or user call; --dry-run lists the sites.
  • fix(instrument): a template literal inside another one's ${} failed the whole file.
  • fix(instrument): a count === 1 ? … : … ternary over CSS values or class names became a plural t().
  • fix(instrument): JSX text kept its line breaks and &apos;-style entities in the default value, and a space
    at the edge of a sentence (provider:{' '}<strong>) was dropped.
  • fix(instrument): strings the code compares or matches were translated: includes()/indexOf() arguments,
    === operands, case values, and a string the file uses as data elsewhere (order: ['2FA', 'no 2FA']).
  • fix(instrument): React declared only in peerDependencies or in the workspace root was not found, so every
    text got i18next.t(). localize and init read the same declared packages.
  • fix(instrument): an i18n init file is generated unless the code imports i18next or react-i18next already.
    Any .init( in the sources (Sentry.init()) prevented it before.
  • fix(instrument): a plural helper import left unused goes, except in a declaration with a default import.
  • fix(instrument): a component whose t is something else (const [t, setT] = useState(0)) keeps its texts,
    reported in a warning; one with a t prop that needs i18n for a language switch gets its own hook.

Texts it found wrongly or missed:

  • feat(instrument): technical strings are left alone: ids, paths, keys, language codes and class names built in
    template literals, technical property values (Authorization, id, type, code, …), camelCase
    identifiers, validation rules, strings without letters, code snippets, CSS values, console.* calls and
    variables only logged, logger and error-report calls, new Error() and RegExp arguments, format patterns
    (.format('DD MMM YYYY')), event names (emit, on), selectors, analytics event names, icon ligatures,
    prompts for a language model
    (getSystemPrompt, aiAssistantPrompt), the content of <code>, <script>, <style>, and stories, mocks
    and fixtures by default.
  • feat(instrument): more texts are found: a single word in JSX text, in a translatable attribute (now also
    data-tip and data-tooltip-content) and in what an element renders from an expression; both branches of a
    text ternary; strings passed last to a call (toast('Saved.')), taken as instrumented before; text in JSX and
    handlers passed to attributes that are not text (action={<Button>…</Button>}, onClick). The project's own
    extract.functions and transComponents count as instrumented.
  • feat(instrument): plurals from plural helpers: plural(n, '# file', '# files') and pluralize/pluralise
    calls, also inside template literals and JSX sentences, become one t() with count.
  • feat(instrument): sentences stay whole: around a link or text component (<Trans>), {' '}, a value
    formatted by a string method or a formatter, a choice between values; a button stays out.
  • feat(instrument): keys and placeholders read better: keys keep the first words (40 characters) and have no
    _, <Trans> keys come from the words, placeholders are named after what they show
    (format.date(user.lastLogin) → {{lastLogin}}), the same expression twice is one placeholder, and keys the
    code uses already are not reused for another text nor made the parent of nested ones.
  • feat(instrument): an expression-bodied arrow component (() => <p>…</p>) gets the hook instead of
    i18next.t(); t joins the dependencies of a useMemo/useCallback whose callback calls it; <Trans>
    takes the quotes of the file's JSX attributes.
  • feat(instrument): --dry-run lists each text with its key and each language-change site; a warning for many
    files is printed once with the files below it; a candidate that cannot be rewritten is reported.
  • feat(lint): data-tip, data-tooltip and data-tooltip-content (tooltip libraries) are in the recommended
    translatable attributes, so lint reports a hardcoded tooltip too.
  • fix(extract): a nesting conflict is reported once instead of once per language, and a key that is also the
    parent of nested keys is named as such.

v1.88.1

Compare Source

  • fix(extract): object types built with Omit, Pick, Partial, Required, Readonly or NonNullable
    resolve their members. t(`barStatus.${bar.status}`) with type Bar = Omit<Foo, 'type'> extracted
    nothing before unless the value was retyped as Foo['status']. Omit and Pick drop or keep the named
    members. Fixes #​330.

v1.88.0

Compare Source

  • feat(lint, instrument): acceptedAttributes also takes an object that sets the translatable attributes
    per JSX element, e.g. { '*': ['!label'], Button: ['label'], 'Select.Option': ['hint'] }: a name adds
    an attribute to the recommended list, !name removes it, '*' applies first. The same prop name can
    mean different things on different components (label is a button's text but a chart axis's data
    key). Set in extract, the rules apply to lint and now also to instrument; the array form is
    unchanged. See "Translatable attributes per element" in the README.
  • fix(extract): when a t() or <Trans> key appears more than once, a default given in source
    (t('key', 'Text'), defaults="...") now wins over <Trans> children, and both win over a fallback
    built from the key, whatever the order of files and calls; an empty default ('') beats only the
    key fallback, never text. An empty <Trans i18nKey="ns:key" /> no longer blocks the text of a later
    <Trans>. A default equal to the key now counts as a source default: t('key', 'key') keeps its
    value next to t('key', 'Text') (the first one wins), and warnOnConflicts flags the pair.
    warnOnConflicts no longer flags a plural key without a default. Plugins get where a default came
    from in the new optional ExtractedKey.defaultValueSource.
    (#​329, thanks @​skoeva).
  • fix(extract): the primary language gets what i18next 27 and react-i18next 18 render for an empty
    default. t('key', '') and t('key', { defaultValue: '' }) write "" instead of the key, since
    i18next 27 returns '' for them (plural forms included). <Trans defaults=""> still writes its
    children or the key, which is what react-i18next falls back to.
  • docs: the Quick Start has a copyable one-prompt setup for coding agents
    (npx i18next-cli localize --print-agent-prompt).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependency Dependency updates label Nov 24, 2026
@renovate
renovate Bot force-pushed the renovate/i18next-cli-1.x branch from 74a32be to e9fa325 Compare November 24, 2026 23:14
@renovate
renovate Bot force-pushed the renovate/i18next-cli-1.x branch from e9fa325 to 83078c2 Compare November 25, 2026 01:17
@renovate
renovate Bot force-pushed the renovate/i18next-cli-1.x branch from 83078c2 to 0b9f0c3 Compare November 25, 2026 01:23
@sonarqubecloud

Copy link
Copy Markdown

@setchy
setchy merged commit 371e8ff into main Nov 25, 2026
21 checks passed
@setchy
setchy deleted the renovate/i18next-cli-1.x branch November 25, 2026 01:26
@github-actions github-actions Bot added this to the Release 8.3.0 milestone Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Dependency updates

Development

Successfully merging this pull request may close these issues.

1 participant