Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

use po4a to make all docs translatable on Weblate and others #61

Merged
merged 1 commit into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# no need to translate the source language, but po4a gens this file
po/reuse-docs.en.po

# po4a auto-generated markdown files from translations
[a-z][a-z]/*.md
[a-z][a-z][a-z]/*.md
[a-z][a-z][a-z]_[A-Z]*/*.md
[a-z][a-z]_[A-Z]*/*.md
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ We also accept and appreciate feedback by creating issues in the
project or by sending an e-mail to the [public REUSE mailing
list](https://lists.fsfe.org/mailman/listinfo/reuse).

### Translation

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`.

## License

The relevant documents in this repository are licensed under [Creative Commons Attribution-ShareAlike 4.0](https://creativecommons.org/licenses/by-sa/4.0).
10 changes: 10 additions & 0 deletions po/po4a.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[po4a_langs] es
eighthave marked this conversation as resolved.
Show resolved Hide resolved
[po4a_paths] po/reuse-docs.pot $lang:po/reuse-docs.$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] faq.md $lang:$lang/faq.md
[type: markdown] spec.md $lang:$lang/spec.md
[type: markdown] tutorial.md $lang:$lang/tutorial.md