Changelog for 7/7/25
Breaking changes in GT libraries as of July 7th, 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
-
t()
functions created byuseGT()
now accept ICU-compatible message strings as their first parameter -
Dictionaries now accept ICU-compatible message strings
gt-next
-
t()
functions created bygetGT()
now accept ICU-compatible message strings as their first parameter -
tx()
functions imported fromgt-next/server
now accept ICU-compatible message strings as their first parameter
core
- Removed the
splitStringToContent
andrenderContent
functions (adding theformatMessage
function instead)
New string variable pattern
Affected libraries:
- gt-next v6.0.1
- gt-react v10.0.1
gt-next and gt-react
t()
functions created byuseGT()
now accept variables directly as attributes of their second (optional) parameter
For example:
const t = useGT()
t("Hello {name}", { name: "John" })
gt-next
-
t()
functions created bygetGT()
now accept variables directly as attributes of their second (optional) parameter -
tx()
functions imported fromgt-next/server
now 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
useDict()
function, deprecated in favor ofuseTranslations()
gt-next
- Removed the
getDict()
function, 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
src
ingt.config.json
is 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
,translateIcu
andtranslateBatch
functions from theGT
class
How is this guide?