Skip to content

Commit

Permalink
make site localizable using po4a
Browse files Browse the repository at this point in the history
  • Loading branch information
eighthave committed Aug 19, 2020
1 parent 7acbead commit c21db71
Show file tree
Hide file tree
Showing 6 changed files with 4,251 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ The website "chrome" strings are localized using the standard,
built-in [Hugo i18n](https://gohugo.io/content-management/multilingual/)
support. Those files are in _data/_.

Translation happens by conversion Markdown into _gettext_ using
[po4a](https://po4a.org). To generate the _.md_ files from the
_gettext .po_ files, run: `po4a po/po4a.conf`. This also regenerates
the _.pot_ file, which is the _gettext_ translation template, and
syncs changes to the _.po_ files.

## License

The theme used for this website is based on [github-project-landing-page](https://github.com/nsomar/github-project-landing-page) which is licensed under the
Expand Down
2 changes: 1 addition & 1 deletion reuse-docs
11 changes: 11 additions & 0 deletions site/po/po4a.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[po4a_langs] es
[po4a_paths] po/reuse-website.pot $lang:po/reuse-website.$lang.po

[options] opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--master-language=en_US" opt:"--msgmerge-opt='--no-wrap'" opt:"--porefs=file" opt:"--wrap-po=newlines"

[po4a_alias:markdown] text opt:"--option markdown" opt:"--option yfm_keys=title" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--keep=100"


[type: markdown] content/comparison.md $lang:$lang/content/comparison.md
[type: markdown] content/dev.md $lang:$lang/content/dev.md
[type: markdown] content/materials.md $lang:$lang/content/materials.md

0 comments on commit c21db71

Please sign in to comment.