Releases: robisim74/qwik-speak
Releases · robisim74/qwik-speak
v0.12.0
BREAKING CHANGES
$translate
function (and other functions) no longer accepts the Speak context as an argument: outside thecomponent$
the new function$inlineTranslate
must be used
FEATURES
- Added
useTranslate$
which returns the translate function as QRL
More info here.
v0.11.2
v0.11.1
- Update Qwik to v.0.102.0 fba5f86
- Docs: add Translation functions & cleanup dbb94d2
- Refactor: make assets optional 325eeda
Recommendations:
- Define the type for
translationData:
const translationData = import.meta.glob<Translation>('/i18n/**/*.json');
- Turn off
qwik/use-method-usage
linter rule until this issue is resolved: QwikDev/qwik#3787
v0.11.0
v0.10.1
v0.10.0
- Update Qwik to v.0.100.0 09b820a
- Merge pull request #36 from ahnpnl/patch-1 6b00eeb
- App: bundle translation files & Cloudflare pages 738cd30
Thanks to: @ahnpnl
BREAKING CHANGES
- Default
assetsPath
option inInline
plugin &Extract
command now is'i18n'
and not'public/i18n'
- Due to changes in Qwik v0.100, it is recommended to move the implementation of
loadTranslation$
into a separate file (likespeak-functions.ts
) to allow the Qwik compiler to respect the initialization order of the functions
v0.9.1
v0.9.0
BREAKING CHANGES
To improve performance, the changeLocale
function has been removed and it is no longer possible to change locale at runtime without navigating/reloading the page.
To be compliant with i18n Qwik documentation, Qwik Speak Inline plugin generates chunks for each language, and the loading of translation files takes place only in dev mode or on server (except for the new runtimeAssets
).
So you must:
- Remove
changeLocale
function and navigate/reload the page to change locale - Move your runtime assets into the new option
runtimeAssets
- Remove
isDev
and other checks fromloadTranslation$
- Provide the base URL for the chunks in
entry.ssr.tsx
:
export function extractBase({ serverData }: RenderOptions): string {
if (!isDev && serverData?.locale) {
return '/build/' + serverData.locale;
} else {
return '/build';
}
}
export default function (opts: RenderToStreamOptions) {
return renderToStream(<Root />, {
manifest,
...opts,
// Determine the base URL for the client code
base: extractBase,
});
}
Ses Qwik Speak Inline Vite plugin and tutorial for more details.