Learn how to use Cozy, host your own server and develop applications.
This documentation is built with MkDocs.
To hack the documentation, just edit the files inside src
.
If you want to see your updates, install mkdocs and the i18n extension of markdown:
Warning: while mkdocs supports Python 2 and 3, the current version of markdown-i18n only support Python 2
pip install --user mkdocs markdown-i18n
Run MkDocs:
mkdocs serve
And point your favorite browser to http://127.0.0.1:8000/
To add a new language, copy mkdocs.yml
to mkdocs_lang.yml
, translate the pages title and update site_dir
and markdown_extensions.markdown_i18n.i18n_lang
.
You’ll require some Gettext utilities. On Debian GNU/Linux, install the gettext
package.
Every time you run a build, MkDocs will update the i18n/messages.pot
file.
When adding a new language, you first need to initialize the .po
file. For example, for french translation:
msginit --input=./i18n/messages.pot --output=./i18n/fr_FR/LC_MESSAGES/messages.po
To build the French version of the website:
mkdocs build -f mkdocs_fr.yml --clean
To test the whole site:
rm -rf docs/*
cp index.html docs/
mkdocs build -f mkdocs.yml
mkdocs build -f mkdocs_fr.yml
cd site/
python -m SimpleHTTPServer
To update the translation file, use msgmerge
:
msgmerge --update i18n/fr_FR/LC_MESSAGES/messages.po i18n/messages.pot