/poeditor2hugo

Simple tool to export your POEditor.com translations to your hugo theme

Primary LanguagePythonMIT LicenseMIT

$ poeditor2hugo

GitHub version License Docker Pulls GitHub stars

This tool is for all creators of multilingual Hugo themes.

With poeditor2hugo you can easily export your POEditor translations to your Hugo theme.

Quickstart with docker

If you have Docker installed, you can simply cd into your theme's directory and run:

docker run --rm -it -v $PWD:/export lednerb/poeditor2hugo

If your current user is not in the docker group, you maybe have to run this command with sudo.

Fixing permissions:

If you are on a Linux system, you might want to change the permissions for the language files. Within your theme directory run the following command to change the permissions:

sudo chown -r $USER:$USER i18n/

Alternatively, do it in one step or create a bash alias:

~/.bashrc

alias poeditor2hugo='sudo docker run --rm -it -v $PWD:/export lednerb/poeditor2hugo && sudo chown -R $USER:$USER i18n'

You can then run:

cd ~/your/hugo/theme
poeditor2hugo

DEMO

DEMO