path: root/NOTES
diff options
authorFlorian Pelz <>2017-12-09 17:46:51 +0100
committerFlorian Pelz <>2017-12-09 17:46:51 +0100
commit5f97bf157eaddcfe722c97dcab349b7dcfbbcd9d (patch)
treed624f9597e5d127b67333725c36cad2653be7a91 /NOTES
parent6a6a82ddca3527610f561a601a3c02ec9f9f0c86 (diff)
Use Gettext PO files for translations with libgettextpo.
I want to avoid repeated setlocale calls and thus am not using the gettext function directly. See the code comments for details.
Diffstat (limited to 'NOTES')
1 files changed, 26 insertions, 0 deletions
diff --git a/NOTES b/NOTES
new file mode 100644
index 0000000..bcb77c7
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,26 @@
+This is the code for my personal website built with Haunt. Since I
+want translations to work with po files but without repeatedly calling
+setlocale, I’m using the ffi-helper in nyacc
+<> to call libgettextpo to parse
+the po files.
+gettext-po.scm was created with the ffi-helper.
+To create a pot file, call:
+xgettext -f po/POTFILES -o po/pelzfloriande-website.pot --from-code=UTF-8 --copyright-holder="" --package-name="pelzfloriande-website" --msgid-bugs-address="" --keyword=_
+To create a po file from a pot file, do the usual:
+cd po
+msginit -l de --no-translator
+To build the site, assuming nyacc’s source is in
+GUILE_LOAD_PATH=$HOME/keep/projects/pelzfloriande-website:$HOME/build/nyacc/src/nyacc/examples:$GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH=$GUILE_LOAD_COMPILED_PATH:$HOME/.cache/guile/ccache/2.2-LE-8-3.A/home/florian/keep/projects/pelzfloriande-website haunt build
+Use this to run guile with strace for debugging. It’s probably easiest
+to do this from Emacs; I’m currently using M-x shell in Emacs.
+GUILE_LOAD_PATH=$HOME/keep/projects/pelzfloriande-website:$HOME/build/nyacc/src/nyacc/examples:$GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH=$GUILE_LOAD_COMPILED_PATH:$HOME/.cache/guile/ccache/2.2-LE-8-3.A/home/florian/keep/projects/pelzfloriande-website strace -o out guile