Changelog for 7/7/25
Breaking changes in GT libraries as of July 7th, 2025
API support for the previous major versions of these libraries will be removed on September 30, 2025.
ICU message format support
Affected libraries:
- gt-next v6.0.1
- gt-react v10.0.1
- core v7.0.1
- cli v2.0.1
gt-next and gt-react
-
tfunctions created byuseGTnow accept ICU-compatible message strings as their first parameter -
Dictionaries now accept ICU-compatible message strings
gt-next
-
tfunctions created bygetGTnow accept ICU-compatible message strings as their first parameter -
txfunctions imported fromgt-next/servernow accept ICU-compatible message strings as their first parameter
core
- Removed the
splitStringToContentandrenderContentfunctions (adding theformatMessagefunction instead)
New string variable pattern
Affected libraries:
- gt-next v6.0.1
- gt-react v10.0.1
gt-next and gt-react
tfunctions created byuseGTnow accept variables directly as attributes of their second (optional) parameter
For example:
const t = useGT()
t("Hello {name}", { name: "John" })gt-next
-
tfunctions created bygetGTnow accept variables directly as attributes of their second (optional) parameter -
txfunctions imported fromgt-next/servernow accept variables directly as attributes of their second (optional) parameter
For example:
import { tx } from "gt-next/server"
await tx("Hello {name}", { name: "John" })Removing the deprecated useDict and getDict functions
Affected libraries:
- gt-next v6.0.1
- gt-react v10.0.1
gt-next and gt-react
- Removed the
useDictfunction, deprecated in favor ofuseTranslations
gt-next
- Removed the
getDictfunction, deprecated in favor ofgetTranslations
Minified JSX strings
Affected libraries:
- gt-next v6.0.1
- gt-react v10.0.1
- cli v2.0.1
gt-next and gt-react
-
Internal rendering functions now expect the custom GT JSX format rather than a valid JSX trees
-
Hashes are rendered as 16 character strings rather than 64 character strinvs
cli
CLI tool now minifies JSX trees and sends to the api2 endpoint by default
src in gt.config.json becoming glob pattern
Affected libraries:
- cli v2.0.1
cli
srcingt.config.jsonis now read as a glob pattern rather than a specified directory
Removed unused translate functions from core
Affected libraries:
- core v7.0.1
core
- Removed unused
translate,translateJsx,translateIcuandtranslateBatchfunctions from theGTclass
Come valuti questa guida?