From 05b25f74305114a3a3a7c029b4321f7912257e99 Mon Sep 17 00:00:00 2001 From: Bruno Bord Date: Sat, 17 Sep 2016 00:00:43 +0200 Subject: [PATCH 1/2] unrelated, ignoring 'toolbox' directory --- toolbox/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbox/__init__.py b/toolbox/__init__.py index f20dc78..8ccfde8 100644 --- a/toolbox/__init__.py +++ b/toolbox/__init__.py @@ -23,7 +23,7 @@ class Builder(object): exceptions = ( - 'build', 'static', 'templates', 'tests', + 'build', 'static', 'templates', 'tests', 'toolbox', # Warning: ignoring it to add it on the top position in the list 'english', ) From 979a9732ab7b21f97aa43ab3bb3c5d4c344b3834 Mon Sep 17 00:00:00 2001 From: Bruno Bord Date: Sat, 17 Sep 2016 00:01:04 +0200 Subject: [PATCH 2/2] refs #43 -- adding a "language_count" on the homepage --- CHANGELOG.md | 4 ++++ index.md | 3 +++ toolbox/__init__.py | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e308c6..ee6d224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## master (unreleased) + +* Added a "language count" on the homepage (#43) + ## 2.3.0 (2016-09-16) * Fix the Italian "Cockatrice" translation (#40). diff --git a/index.md b/index.md index 73e38a0..b5e5888 100644 --- a/index.md +++ b/index.md @@ -12,8 +12,11 @@ See the [License page](license.html) for more details. ## List of available texts +"The Black Hack" core rules are currently available in $language_count languages (and soon, yours?): + $text_list + ## Contributing If you have any remark, noticed any typo, or want to add a translation in your language, please proceed to the [Github project](https://github.com/brunobord/the-black-hack#contribute) and follow the instructions. Although it's easier if you're a Github user, you can contribute without it, via email or other communication channels. diff --git a/toolbox/__init__.py b/toolbox/__init__.py index 8ccfde8..296fef3 100644 --- a/toolbox/__init__.py +++ b/toolbox/__init__.py @@ -216,7 +216,10 @@ def build_homepage(self): homepage_md = self.get_template('index.md') text_list = self.build_homepage_text_list() # Build generated body using text_list - body_md = homepage_md.substitute(text_list='\n'.join(text_list)) + body_md = homepage_md.substitute( + text_list='\n'.join(text_list), + language_count=len(self.languages), + ) body_html = self.convert_md_source(body_md) # Build html page content self.write_html(