馃帀 Tolgee Platform v3 and Tolgee JS v5 released 馃帀 #1501
marketachalupnikova
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We are proud to share that we have released the new versions of Tolgee Platform v3 and Tolgee JS v5. We have added namespaces support to structure your strings into smaller chunks. The base library of our JS integrations is completely redesigned to be more lightweight end extendable by plugins.
馃殌 What's new in the Tolgee Platform v3
The most exciting feature of the new platform release is the namespaces support. Now you can select a namespace while creating a new key, importing data, or exporting data.
Screen.Recording.2022-12-02.at.12.38.23.mov
The breaking changes
While adding the namespaces support, we also removed some deprecated API endpoints. So if you use those in your CI/CD pipelines, please replace those with the
/v2endpoints. We have removed these endpoints:/api/project/**(use/v2/projects/*)/api/address-part/**(use/v2/slug/*)/v2/projects/{projectId}/import/with-streaming-response(use/v2/projects/{projectId}/import)While the
/api/project/{projectId}/export/jsonZipis kept as the only v1 endpoint accessible with an API key.We are removing these parameters of
/v2/projects/exportendpoint:And introducing a new parameter
structureDelimiter, which controls the character causing structuring in the resulting.jsons.Since v3 supports namespaces natively, there is no need to control the depth of the directory structure in the export.
What's new in the Tolgee JS v5
The base package of Tolgee JS
@tolgee/corewas redesigned entirely and refactored to be more customizable, lightweight, and to support the namespaces feature. This new implementation makes it extremely simple to create new plugins or framework integrations. 馃憣@tolgee/webWe've extracted web-related plugins into a separate package, so
@tolgee/coreis as small as possible and ready to run in different environments (other than the web).Unified initialization
In new integrations, Tolgee is always initialized outside the actual integration, and only the Tolgee instance is passed down.
This way, we offer you more flexibility in what you can do with the Tolgee instance and embrace its plugin system.
Unified
tfunction interfaceAll the integrations now use a unified
tfunction interface, which is a bit different but cleaner and more straightforward read more.Usage of Suspense in React integration
React integration now uses Suspense to implement dynamic namespaces addition nicely. The component which would start loading new namespace through
useTranslatewill trigger a suspense exception which you can catch by yourSuspensecomponent. If you don't catch it, it will bubble toTolgeeProvider andfallbackwill be shown.All reactions