@wuchale/astro
Patch Changes
Section titled “Patch Changes”- c46696a: Fix new mixed visitor visiting ignored elements when nested #408
- Updated dependencies [c46696a, 40b5c42]:
- wuchale@0.25.6
Patch Changes
Section titled “Patch Changes”- d4ef202: Fix inconsistent handling of nested messages with non-nestable block types #402
- Updated dependencies [d4ef202]:
- wuchale@0.25.4
Patch Changes
Section titled “Patch Changes”- fa12c12: Limit nesting to only element-like nodes to fix unexpected errors (e.g. around
{#if}) - Updated dependencies [fa12c12]:
- wuchale@0.25.3
Patch Changes
Section titled “Patch Changes”-
Redo nested message visit algorithm (#393)
This release is all about the core of wuchale, i.e. the nested message visitor. It has now been vastly improved with a more solid approach.
-
Updated dependencies [
3c88ee9]:- wuchale@0.25.0
Minor Changes
Section titled “Minor Changes”-
⚠️ BREAKING: reorganize loading config, use glob patterns and number load IDs (#355)
granularLoadis nowloading.granularbundleLoadis nowloading.directgenerateLoadIDis replaced by a glob config atloading.group
Therefore if you use any of these, update your config like this:
import { defineConfig, defaultGenerateLoadID, pofile } from "wuchale"import { defineConfig, pofile } from "wuchale"import { adapter as svelte } from '@wuchale/svelte'export default defineConfig({// ...adapters: {main: svelte({// ...bundleLoad: true,granularLoad: true,generateLoadID: filename => {if (filename.includes('grouped')) {return 'grouped'}return defaultGenerateLoadID(filename)},loading: {granular: true,direct: true,group: ['**/*grouped*',]}}),}})
Patch Changes
Section titled “Patch Changes”-
⚠️ BREAKING: proxies now export
loadCountinstead ofloadIDsafter #355 (f903655)The default loaders have been updated to match but if you use
loadLocalesin SvelteKit hooks or Astro middlewares, you should update them like:await loadLocales(main.key, main.loadIDs, main.loadCatalog, locales)await loadLocales(main.key, main.loadCount, main.loadCatalog, locales) -
⚠️ BREAKING: Rename config
hmrtodevwith the following options to control behavior during dev: (#377)false: Same behavior as the previoushmr: false'read': Only uses existing translations and doesn’t add newly detected messages during dev'add': Adds newly detected messages and updates their refs as they get referenced, but doesn’t touch existing messages'refs': Same behavior as the previoushmr: true, adds new messages, updates refs and marks obsoletes'clean': Full behavior same asnpx wuchale --clean, deletes unused messages
-
Updated dependencies [
2005ea1,89b650b,94ce7fc,4899ae6,f903655,4bbbbae,589fbca,4922b03,3567c7f,2521033,5063533,6d5e244]:- wuchale@0.24.0
Patch Changes
Section titled “Patch Changes”-
Extract strings in
export constin Astro frontmatter only if they are inside functions and init runtime inside to prevent errors #372 (500616b) -
Updated dependencies [
500616b]:- wuchale@0.23.4
Patch Changes
Section titled “Patch Changes”- Fix error on
export const ...statements in frontmatter #372 (93bef85)
Patch Changes
Section titled “Patch Changes”Patch Changes
Section titled “Patch Changes”- Updated dependencies [
89fec64,d53178a,2f195f3,346f49f,654b5e9,85c7473,eb49dc8,3371f37,8c9d854,b7f362c,8771568]:- wuchale@0.22.0
Minor Changes
Section titled “Minor Changes”-
Add support for importing a URL localize function from any module at runtime (
347ca5e)This adds support for cases where complete flexibility is needed for URLs, for example when the site targets different domain names for different locales, and when one locale can be used in different domains. Now a custom localize function that does the localization can be implemented, and wuchale only handles the translation. This can be used by providing the module path:
export default {// ...adapters: {svelte({url: {localize: 'src/lib/url-util.js',patterns: [// ...]}})}}The module has to export a
localizefunction that is of type:type URLLocalizer = (url: string, locale: string) => string;To just use the default of prefixing the locale to the path, set
localize: true.
Patch Changes
Section titled “Patch Changes”Patch Changes
Section titled “Patch Changes”Patch Changes
Section titled “Patch Changes”Patch Changes
Section titled “Patch Changes”- Fix error when parsing self closing tags in expressions due to astro’s limitation (
1d5ec83)
Patch Changes
Section titled “Patch Changes”- Fix various parsing errors caused by differences in offset units (bytes in go, indices in js) when files contain unicode characters (
67c4e82)
Patch Changes
Section titled “Patch Changes”-
Allow return outside function for astro frontmatter (
823f78e) -
Updated dependencies [
823f78e]:- wuchale@0.19.2
Patch Changes
Section titled “Patch Changes”- Fix parsing errors on object attributes, visit spread attributes (
8fda2a4)
Patch Changes
Section titled “Patch Changes”- Fix error on empty file (
3334c2a)
Patch Changes
Section titled “Patch Changes”-
Fix possible infinite retries on ai translate error/mistake (
2b9a61a) -
Updated dependencies [
2b9a61a]:- wuchale@0.19.1
Minor Changes
Section titled “Minor Changes”- 5f1499b: Add the Astro adapter! Thank you @tarekwiz for starting it!
Patch Changes
Section titled “Patch Changes”- Updated dependencies [3ca7aac]
- Updated dependencies [9de6b79]
- Updated dependencies [fad845d]
- Updated dependencies [197bb11]
- Updated dependencies [64f7485]
- Updated dependencies [63fb176]
- Updated dependencies [f92c641]
- wuchale@0.19.0