File Structure
wuchale writes files in the following way:
- vite.config.js
Directorysrc
Directorylocales
- en.po Source catalog (commit)
- es.po Translation catalog (commit)
- data.js Data file to import e.g. locales from (see below)
- main.loader.server.svelte.js Loader file for client side (see below)
- main.loader.svelte.js Loader file for client side (see below)
- main.url.js URL related functions if configured (see below)
Directory.wuchale (ignore)
- main.main.en.compiled.js Compiled source catalog
- main.main.es.compiled.js Compiled translated catalog
- main.proxy.js Proxy for async catalog loading
- main.proxy.sync.js Proxy for sync catalog loading
- main.urls.js URL manifest file
- App.svelte Your components
The files under .wuchale are generated/overwritten as needed and should be .gitignored.
The files directly in locales
- Obviously you need to commit the
.pofiles, those are sources of truth for all translations. - If you want to control the loader logic and have set
customas the loader in the adapter config, you have to commit the loader files. Otherwise, you can ignore them, they are (re)written at startup. - The other files files are (re)written at startup and can be ignored.
If you configure it to write the transformed code as well, it will write it to
src/locales/.output/ or the outDir you configure.