wagtail-localize
wagtail-localize copied to clipboard
Docs - how to guides - contributing/developing wagtail-localize
We need developer documentation for contributing to wagtail-localize.
e.g. paths to compile FE assets since installing in editable more (pip install -e .. results in "static/wagtail_localize/js/wagtail-localize.js?v=HASH not found")
@zerolab I'm running into this while trying to install my fork ... what am I missing? I am installing via Poetry instead of PIP by the way. Simply doing poetry add git+https://github.com/Timusan/wagtail-localize.git#fix-for-1.2.1 install fine, but complains about missing the JS library.
Is there an extra step I should do before commiting, or for packaging?
needs:
nvm use
npm install
npm run build
you can see https://github.com/wagtail/wagtail-localize/blob/main/Makefile for more
so it compiles the front-end assets. the translation editing interface is React based (due to historic reasons). We will be looking at moving away from it, so hopefully it will involve less tooling
Thanks for the quick reply!
What I am missing is that I made an exact fork of the current repo on version 1.2.1. So the code, including the Makefile, should be the same. When I install the official package via Poetry everything works perfectly, when installing the fork using Poetry it misses the JS - but the codebase is identical?
The PyPI package includes the compiles JS as one of the steps in the package build process.
It usually does not make sense to keep the compiled assets in the source, so they are not there when you install directly from the repo (well, your fork)