v3.1.0
What's Changed
- feat: cli for tiny by @urbankrepel-povio in #87
- refactor: translation handling, logs when generating by @izakgl in #88
- feat: pr checks by @izakgl in #89
Migrate translations setup
setTranslateFunction was removed. Use configureTranslations instead.
1. Add configureTranslations in config/i18n.ts
At the end of the file, after i18n.init().
import { configureTranslations } from "@povio/openapi-codegen-cli";
// ...existing i18n setup...
configureTranslations(() => i18n.t.bind(i18n));2. Remove old wiring from pages/__root.tsx
By default, projects wire translations in pages/__root.tsx via a useEffect that calls setTranslateFunction. Remove it:
useEffect(() => {
if (typeof t === "function") {
AppErrorHandler.setTranslateFunction(t);
}
}, [t]);configureTranslations is global and applies to all error handlers, including SharedErrorHandler.
Full Changelog: v3.0.1...v3.1.0