diff --git a/docs/config.json b/docs/config.json index 32a27f235e57dda53b64c3bdb0ab79a111438902..118a9f9e571e5e168b1d04aa3e5646968db8eb2b 100644 --- a/docs/config.json +++ b/docs/config.json @@ -16,6 +16,7 @@ } }, "lang": { + "supported": ["de"], "de": { "sitename": "Dokumentation Fachgruppenwebseite", "banner": { @@ -25,5 +26,6 @@ "title": "Dokumentation Fachgruppenwebseite Atom Feed" } } + } } diff --git a/fgs/generator.py b/fgs/generator.py index bab0efc0a7020ec772b57867ee0817201036d5e7..af48481f9c4c24864fe86f958f17e8242a2869c1 100644 --- a/fgs/generator.py +++ b/fgs/generator.py @@ -100,20 +100,25 @@ class Generator: writer.write_file(f.link.path, f.rawcontents, mode="wb") for lang in self.config['lang']['supported']: + # all published pages + print(lang, "-> Generatng all published pages.") for page in self.context['pages'][lang].values(): writer.write_template(page.template, page.link.path, lang, {'page': page}, page.config) # all hidden pages + print(lang, "-> Generatng all hidden pages.") for page in self.context['hidden_pages'][lang].values(): #print(page.slug) writer.write_template(page.template, page.link.path, lang, {'page': page}, page.config) # all tags + print(lang, "-> Generatng all tags.") for tag in self.context['tags'][lang].values(): writer.write_template('tag.html', tag.link.path, lang, {'tag': tag}, tag.config) # homepages for languages + print(lang, "-> Generatng homepage.") self.generate_homepage(writer, lang, lang + "/index.html") # homepage diff --git a/fgs/writer.py b/fgs/writer.py index 659857f99b64434c324594691f780743bca82a11..f08963519b3dcb6e2bac92d23f2f27ef29319235 100644 --- a/fgs/writer.py +++ b/fgs/writer.py @@ -21,6 +21,7 @@ class Writer: print("templates: ", self.env.list_templates()) def write_template(self, template, path, lang, extra_context, localized_config): + #print("write_template:", template, path, lang, extra_context, localized_config) tmpl = self.env.get_template(template) pathsplit = path.split('/') diff --git a/lang.json b/lang.json index 6bd08b2ce427b9fe687d71b6c57af0c509677159..00495ae2972d6bab2667b7d95a97ac8439a5e585 100644 --- a/lang.json +++ b/lang.json @@ -62,5 +62,65 @@ "toc": { "header": "Inhaltsverzeichnis" } + }, + "en": { + "langname": "English", + "sitename": "<Your sitename>", + "title_prefix": "", + "title_suffix": "", + "title_seperator": " | ", + "banner": { + "title": "Homepage <Your sitename>", + "prefix": "", + "suffix": "", + "alt": "" + }, + "date_format": "%d.%m.%Y %H:%M Uhr", + "page": { + "published_prefix": "Created: ", + "published_suffix": " | ", + "modified_prefix": "Last change: ", + "modified_suffix": "", + "authors_prefix": "Authors: ", + "authors_suffix": "", + "languages_prefix": "Languages: ", + "languages_suffix": "", + "category_prefix": "Category: ", + "category_suffix": " | ", + "tags_prefix": "Tags: ", + "tags_suffix": "", + "slug_prefix": "Slug: ", + "slug_suffix": "", + "edit_url_text": "[Edit page]", + "view_url_text": "[Source]", + "history_url_text": "[History]", + "redirect_prefix": "This page links to another page. You will be redirected to ", + "redirect_suffix": " shortly. If the automatic redirection doesn't work, just click the link directly." + }, + "tag": { + "edit_url_text": "[Edit text]", + "view_url_text": "[Source]", + "history_url_text": "[History]" + }, + "atom": { + "title": "<Your sitename> Atom Feed" + }, + "only_pages": { + "title": "Pages" + }, + "no_content": "This page has no content.", + "quotations": { + "double": { + "left": "„", + "right": "“" + }, + "single": { + "left": "‚", + "right": "‘" + } + }, + "toc": { + "header": "Table of contents" + } } }