gt-i18n@1.0.0
Major Changes
-
#1816
463a8dbThanks @bgub! - Add a config-awareresolveCanonicalLocalehelper and remove the publicgetGTClasshelper. -
#1820
1f53e42Thanks @bgub! - Clean up thegt-i18npublic API surface by removing dead subpaths, internal exports, and unused types. -
#1439
e12fb17Thanks @ErnestM1234! - Prepare Odysseus major releases for core runtime packages. -
#1439
c1e0a0fThanks @ErnestM1234! - Remove deprecated translation options. Thecontextdictionary option has been removed in favor of$context, and the$_localesinline option has been removed in favor of$locale. -
#1439
8a2f7eeThanks @ErnestM1234! - Simplify translation option types. Replace deprecated inline and dictionary option aliases withGTTranslationOptions, use interpolation variables for dictionaryt()options, and trim higher-level type exports to avoid exposing internal translation option fields.
Minor Changes
- #1439
b3bb391Thanks @ErnestM1234! - Store cookie names in I18nConfig so custom cookie names work before the condition store is initialized.gt-i18n: Removed the unused React locale cookie name from the shared GT config type.@generaltranslation/react-core:ReactI18nConfignow acceptslocaleCookieName,regionCookieName, andenableI18nCookieName, exposes getters that fall back to the default names, and exports the default storage names from thepureentrypoint.gt-next: Imports default cookie names from the React Corepureentrypoint instead of the removed React Core cookie constants subpath.gt-react: The browser condition store now resolves cookie names fromI18nConfiginstead of hardcoding the defaults, so custom cookie names passed toinitializeGT()are honored for both reads and writes.gt-react-native: Native condition storage now resolves its store keys fromI18nConfig, matchinggt-reactbehavior.gt-tanstack-start:parseLocale()reads and writes the locale cookie using the configured cookie name instead of the default.
Patch Changes
-
#1439
8870496Thanks @ErnestM1234! - Use Next.js caching semantics for Cache Components by disabling GT cache expiry and development hot reload runtime translation.Async translation and dictionary lookup boundaries now keep synchronous access to the loaded snapshot, so APIs like
getGTandgetTranslationscan still resolve strings after cache expiry is delegated to Next.js.Global singleton setup now preserves the first initialized instance instead of replacing it on later initialization attempts.
-
#1818
b72c30bThanks @bgub! - Clean up thegeneraltranslationpublic API surface for the next major.Removes the unused
generaltranslation/coresubpath, stale endpoint types, duplicateApiErroraccessors, and dead/internalexports. MovesAPI_VERSIONtogeneraltranslation/internal, exports the derivation helpers from the public root, and pointsgt-i18nat that public entry. -
#1439
72e9e16Thanks @ErnestM1234! - Split the runtime surface of the GT class (locale management, formatting, runtime translation) into a GTRuntime base class exported from the newgeneraltranslation/runtimeentry point. The SDK runtime (gt-i18n's I18nConfig, gt-next middleware) now constructs GTRuntime, so production browser bundles no longer ship the project/file management API client (enqueueFiles, uploads, downloads, etc.). The GT class extends GTRuntime and keeps its full API for the CLI and other tooling. Also import getLocaleProperties from @generaltranslation/format directly in react-core so client bundles don't reach the full core entry. -
#1439
42a440fThanks @ErnestM1234! - Gate duplicate singleton initialization warnings behind_GENERALTRANSLATION_LOG_LEVEL=DEBUG. -
#1439
fd22c68Thanks @ErnestM1234! - Defer the missing-projectId and missing-translation-loader warnings from I18nCache construction to the first translation loader invocation. Clients of server-rendered apps receive translations via updateTranslations() and never invoke the fallback loader, so they no longer log spurious warnings on initialization. Explicitly disabling translation loading with cacheUrl: null no longer logs at all, and explicitly setting cacheUrl to the default GT CDN URL alongside a projectId is now classified as GT remote loading. -
#1811
bea8233Thanks @bgub! - Statically gate dev hot-reload code paths (tracked resolver invalidation, missing-translation queue, T hot-reload fallbacks, getGT dev preload) behindprocess.env.NODE_ENV !== 'production'so bundlers can drop them from production builds. Behavior is unchanged: the existing runtimeisDevHotReloadEnabled()check still applies in development. -
#1439
8870496Thanks @ErnestM1234! - Support dev hot reload lookups for servergetGTstrings.getGTcan now receive compiler-injected message metadata and prefetch missing translations through the runtime cache in development.gt-nextforwards the server request conditions into this path so App Router server strings can participate in hot reload translation updates.Compiler-injected
getGTanduseGTpreload messages now emit the same sugar metadata keys used by runtime lookup options. -
#1439
04b5064Thanks @ErnestM1234! - Restore namespace scoping for getTranslations and server useTranslations. -
#1439
328795bThanks @ErnestM1234! - Store the GT services enabled flag on the i18n config singleton. -
#1439
d48604eThanks @ErnestM1234! - Trigger an odysseus prerelease patch for all publishable packages. -
#1439
3d95277Thanks @ErnestM1234! - Remove unused internal exports and dead utility code. -
#1439
693288dThanks @ErnestM1234! - Remove internal source barrel exports and update imports to reference defining files directly. -
#1439
c5364f9Thanks @ErnestM1234! - Slim the i18n cache event surface by replacing the generic EventEmitter base class with a single cache-miss listener and removing unused cache helper methods. -
#1439
d863bcfThanks @ErnestM1234! - Remove deprecated i18n cache lifecycle hooks and unused cache events.The cache subscription surface now only exposes
translations-cache-miss, which is used for runtime translation updates. Deprecated lifecycle constructor callbacks and unused locale/dictionary cache hit/miss events have been removed. -
#1439
11ecf87Thanks @ErnestM1234! - Remove the unusedcondition-store/localeResolvermodule fromgt-i18n/internal.determineSupportedLocale,resolveSupportedLocale, andcreateLocaleResolverwere thin wrappers overgetI18nConfig().<method>(). They had no consumers — callers (e.g. tanstack-start) use theI18nConfigmethods directly viagetI18nConfig(). Removing the module trims dead indirection from the/internalentry; theLocaleCandidatestype re-export is unaffected (re-exported from its real source). -
#1439
03bae6dThanks @ErnestM1234! - Remove the unusedvalidateLocalesconfig validator fromgt-i18n.validateLocaleswas defined but never called (config validation runsvalidateLoadTranslations,validateTranslationApi, andvalidateDictionary) and had no consumers anywhere. Dead code removed. -
#1439
5d42608Thanks @ErnestM1234! - Remove deprecated methods fromgt-i18n'sI18nCache.Dropped the long-
@deprecatedcache methods that duplicatedI18nConfig/loader APIs:getDefaultLocale,getLocales,getCustomMapping,getGTClass,getTranslationLoader,resolveTranslationSync,getTranslations, andgetTranslationResolver. None were called anywhere (consumers usegetI18nConfig()/lookupTranslation/loadTranslations). Removes the methods, their now-unused imports, and the tests that covered them. -
#1439
9804aa4Thanks @ErnestM1234! - Remove three orphaned, never-imported files:gt-tanstack-start:condition-store/WritableConditionStore.ts(an orphaned local copy; the package uses gt-i18n's writable condition store).gt-react-native:utils/utils.ts(readAuthFromEnv, no consumers).gt-i18n:i18n-cache/translations-manager/utils/types/translations-manager.ts(unreferencedTranslationsManagerConfigtype).
-
#1439
2ca78ecThanks @ErnestM1234! - Read Vite runtime credentials during React initialization while keeping dev API keys out of production bundles. -
#1439
195f009Thanks @ErnestM1234! - fix: make singleton not-initialized errors consistent and descriptive, and stop error paths from masking the original failure when I18nConfig is also uninitialized -
Updated dependencies [
b72c30b,72e9e16,5adeede,d48604e,88f3a2e,e12fb17,5752fe8,97dc7f4,693288d,2e85ebd,d5cf2d3,4986567,795edc8]:- generaltranslation@9.0.0
- @generaltranslation/format@0.1.2
- @generaltranslation/supported-locales@2.1.2