diff options
author | ng0 <ng0@n0.is> | 2019-11-04 21:55:28 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-04 21:55:28 +0000 |
commit | b19673a947c94eb4febc929182c3a565bd3b5852 (patch) | |
tree | 4629b97e7f2986ba256385621fdfa9be202dfbce | |
parent | 63b8716708348fca92a6bcfc84e21f3054753f09 (diff) | |
download | www-b19673a947c94eb4febc929182c3a565bd3b5852.tar.gz www-b19673a947c94eb4febc929182c3a565bd3b5852.zip |
ev: generate list of protocols.
-rw-r--r-- | locale/de/LC_MESSAGES/messages.po | 13 | ||||
-rw-r--r-- | locale/en/LC_MESSAGES/messages.po | 8 | ||||
-rw-r--r-- | locale/es/LC_MESSAGES/messages.po | 10 | ||||
-rw-r--r-- | locale/fr/LC_MESSAGES/messages.po | 10 | ||||
-rw-r--r-- | locale/it/LC_MESSAGES/messages.po | 10 | ||||
-rwxr-xr-x | template.py | 59 | ||||
-rw-r--r-- | template/ev.html.j2 | 27 |
7 files changed, 35 insertions, 102 deletions
diff --git a/locale/de/LC_MESSAGES/messages.po b/locale/de/LC_MESSAGES/messages.po index 7e910520..38c3fce9 100644 --- a/locale/de/LC_MESSAGES/messages.po +++ b/locale/de/LC_MESSAGES/messages.po | |||
@@ -7,7 +7,7 @@ msgid "" | |||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: PROJECT VERSION\n" | 8 | "Project-Id-Version: PROJECT VERSION\n" |
9 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | 9 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" |
10 | "POT-Creation-Date: 2019-11-04 21:36+0000\n" | 10 | "POT-Creation-Date: 2019-11-04 21:53+0000\n" |
11 | "PO-Revision-Date: 2018-02-24 17:42\n" | 11 | "PO-Revision-Date: 2018-02-24 17:42\n" |
12 | "Last-Translator: Torsten Grothoff <torsten@grothoff.org>\n" | 12 | "Last-Translator: Torsten Grothoff <torsten@grothoff.org>\n" |
13 | "Language-Team: German <LL@li.org>\n" | 13 | "Language-Team: German <LL@li.org>\n" |
@@ -627,15 +627,11 @@ msgstr "" | |||
627 | msgid "Official Meeting Notes" | 627 | msgid "Official Meeting Notes" |
628 | msgstr "Offizielle Protokolle" | 628 | msgstr "Offizielle Protokolle" |
629 | 629 | ||
630 | #: template/ev.html.j2:74 | 630 | #: template/ev.html.j2:84 |
631 | msgid "2013-12 (constitutional meeting)" | ||
632 | msgstr "2013-12 (Gründungstreffen)" | ||
633 | |||
634 | #: template/ev.html.j2:99 | ||
635 | msgid "Support Us!" | 631 | msgid "Support Us!" |
636 | msgstr "Unterstützung anbieten!" | 632 | msgstr "Unterstützung anbieten!" |
637 | 633 | ||
638 | #: template/ev.html.j2:101 | 634 | #: template/ev.html.j2:86 |
639 | msgid "" | 635 | msgid "" |
640 | "Everybody is welcome to support us via donations. For financial " | 636 | "Everybody is welcome to support us via donations. For financial " |
641 | "contributions, Europeans are able to donate via SEPA. We hope to setup " | 637 | "contributions, Europeans are able to donate via SEPA. We hope to setup " |
@@ -1985,6 +1981,9 @@ msgstr "" | |||
1985 | msgid "Videos related to GNUnet" | 1981 | msgid "Videos related to GNUnet" |
1986 | msgstr "" | 1982 | msgstr "" |
1987 | 1983 | ||
1984 | #~ msgid "2013-12 (constitutional meeting)" | ||
1985 | #~ msgstr "2013-12 (Gründungstreffen)" | ||
1986 | |||
1988 | #, fuzzy | 1987 | #, fuzzy |
1989 | #~| msgid "IRC Archive" | 1988 | #~| msgid "IRC Archive" |
1990 | #~ msgid "IRC archive" | 1989 | #~ msgid "IRC archive" |
diff --git a/locale/en/LC_MESSAGES/messages.po b/locale/en/LC_MESSAGES/messages.po index 09659044..c10ac148 100644 --- a/locale/en/LC_MESSAGES/messages.po +++ b/locale/en/LC_MESSAGES/messages.po | |||
@@ -584,15 +584,11 @@ msgstr "" | |||
584 | msgid "Official Meeting Notes" | 584 | msgid "Official Meeting Notes" |
585 | msgstr "" | 585 | msgstr "" |
586 | 586 | ||
587 | #: template/ev.html.j2:74 | 587 | #: template/ev.html.j2:84 |
588 | msgid "2013-12 (constitutional meeting)" | ||
589 | msgstr "" | ||
590 | |||
591 | #: template/ev.html.j2:99 | ||
592 | msgid "Support Us!" | 588 | msgid "Support Us!" |
593 | msgstr "" | 589 | msgstr "" |
594 | 590 | ||
595 | #: template/ev.html.j2:101 | 591 | #: template/ev.html.j2:86 |
596 | msgid "" | 592 | msgid "" |
597 | "Everybody is welcome to support us via donations. For financial " | 593 | "Everybody is welcome to support us via donations. For financial " |
598 | "contributions, Europeans are able to donate via SEPA. We hope to setup " | 594 | "contributions, Europeans are able to donate via SEPA. We hope to setup " |
diff --git a/locale/es/LC_MESSAGES/messages.po b/locale/es/LC_MESSAGES/messages.po index dd8bd2cf..10c7a34f 100644 --- a/locale/es/LC_MESSAGES/messages.po +++ b/locale/es/LC_MESSAGES/messages.po | |||
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PROJECT VERSION\n" | 9 | "Project-Id-Version: PROJECT VERSION\n" |
10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | 10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" |
11 | "POT-Creation-Date: 2019-11-04 21:36+0000\n" | 11 | "POT-Creation-Date: 2019-11-04 21:53+0000\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -610,15 +610,11 @@ msgstr "" | |||
610 | msgid "Official Meeting Notes" | 610 | msgid "Official Meeting Notes" |
611 | msgstr "" | 611 | msgstr "" |
612 | 612 | ||
613 | #: template/ev.html.j2:74 | 613 | #: template/ev.html.j2:84 |
614 | msgid "2013-12 (constitutional meeting)" | ||
615 | msgstr "" | ||
616 | |||
617 | #: template/ev.html.j2:99 | ||
618 | msgid "Support Us!" | 614 | msgid "Support Us!" |
619 | msgstr "" | 615 | msgstr "" |
620 | 616 | ||
621 | #: template/ev.html.j2:101 | 617 | #: template/ev.html.j2:86 |
622 | msgid "" | 618 | msgid "" |
623 | "Everybody is welcome to support us via donations. For financial " | 619 | "Everybody is welcome to support us via donations. For financial " |
624 | "contributions, Europeans are able to donate via SEPA. We hope to setup " | 620 | "contributions, Europeans are able to donate via SEPA. We hope to setup " |
diff --git a/locale/fr/LC_MESSAGES/messages.po b/locale/fr/LC_MESSAGES/messages.po index caeafa93..287614d0 100644 --- a/locale/fr/LC_MESSAGES/messages.po +++ b/locale/fr/LC_MESSAGES/messages.po | |||
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PROJECT VERSION\n" | 9 | "Project-Id-Version: PROJECT VERSION\n" |
10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | 10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" |
11 | "POT-Creation-Date: 2019-11-04 21:36+0000\n" | 11 | "POT-Creation-Date: 2019-11-04 21:53+0000\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -604,15 +604,11 @@ msgstr "" | |||
604 | msgid "Official Meeting Notes" | 604 | msgid "Official Meeting Notes" |
605 | msgstr "" | 605 | msgstr "" |
606 | 606 | ||
607 | #: template/ev.html.j2:74 | 607 | #: template/ev.html.j2:84 |
608 | msgid "2013-12 (constitutional meeting)" | ||
609 | msgstr "" | ||
610 | |||
611 | #: template/ev.html.j2:99 | ||
612 | msgid "Support Us!" | 608 | msgid "Support Us!" |
613 | msgstr "" | 609 | msgstr "" |
614 | 610 | ||
615 | #: template/ev.html.j2:101 | 611 | #: template/ev.html.j2:86 |
616 | msgid "" | 612 | msgid "" |
617 | "Everybody is welcome to support us via donations. For financial " | 613 | "Everybody is welcome to support us via donations. For financial " |
618 | "contributions, Europeans are able to donate via SEPA. We hope to setup " | 614 | "contributions, Europeans are able to donate via SEPA. We hope to setup " |
diff --git a/locale/it/LC_MESSAGES/messages.po b/locale/it/LC_MESSAGES/messages.po index 7392708a..5e8c71d1 100644 --- a/locale/it/LC_MESSAGES/messages.po +++ b/locale/it/LC_MESSAGES/messages.po | |||
@@ -8,7 +8,7 @@ msgid "" | |||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: PROJECT VERSION\n" | 9 | "Project-Id-Version: PROJECT VERSION\n" |
10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | 10 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" |
11 | "POT-Creation-Date: 2019-11-04 21:36+0000\n" | 11 | "POT-Creation-Date: 2019-11-04 21:53+0000\n" |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -604,15 +604,11 @@ msgstr "" | |||
604 | msgid "Official Meeting Notes" | 604 | msgid "Official Meeting Notes" |
605 | msgstr "" | 605 | msgstr "" |
606 | 606 | ||
607 | #: template/ev.html.j2:74 | 607 | #: template/ev.html.j2:84 |
608 | msgid "2013-12 (constitutional meeting)" | ||
609 | msgstr "" | ||
610 | |||
611 | #: template/ev.html.j2:99 | ||
612 | msgid "Support Us!" | 608 | msgid "Support Us!" |
613 | msgstr "" | 609 | msgstr "" |
614 | 610 | ||
615 | #: template/ev.html.j2:101 | 611 | #: template/ev.html.j2:86 |
616 | msgid "" | 612 | msgid "" |
617 | "Everybody is welcome to support us via donations. For financial " | 613 | "Everybody is welcome to support us via donations. For financial " |
618 | "contributions, Europeans are able to donate via SEPA. We hope to setup " | 614 | "contributions, Europeans are able to donate via SEPA. We hope to setup " |
diff --git a/template.py b/template.py index 87dbcb3c..5cae5bdc 100755 --- a/template.py +++ b/template.py | |||
@@ -191,12 +191,19 @@ def copy_static(locale, indict): | |||
191 | print(locale + "/" + key + " ...to... " + locale + "/" + value) | 191 | print(locale + "/" + key + " ...to... " + locale + "/" + value) |
192 | 192 | ||
193 | 193 | ||
194 | # fileop(in, out, "copy") | 194 | # TODO: Move the lists elsewhere? |
195 | |||
196 | meetingnotes = [ | ||
197 | { "year": "2013", "date": "2013-12-27" }, | ||
198 | { "year": "2014", "date": "2014-12-28" }, | ||
199 | { "year": "2015", "date": "2015-12-29" }, | ||
200 | { "year": "2016", "date": "2016-12-28" }, | ||
201 | { "year": "2017", "date": "2017-12-27" }, | ||
202 | { "year": "2018", "date": "2018-12-27" }, | ||
203 | ] | ||
195 | 204 | ||
196 | # At this moment in time, constructing this list dynamically would be | 205 | # At this moment in time, constructing this list dynamically would be |
197 | # too much pointless code. In fact all of what we use in jinja is | 206 | # too much pointless code. |
198 | # no real use of jinja yet and furthermore we would be better off | ||
199 | # just using static html + css + some awk and other base tools. | ||
200 | newsposts = [ | 207 | newsposts = [ |
201 | { | 208 | { |
202 | "page": "2019-0.11.8.html", | 209 | "page": "2019-0.11.8.html", |
@@ -718,6 +725,7 @@ def generate_site(root): | |||
718 | content = tmpl.render(lang=locale, | 725 | content = tmpl.render(lang=locale, |
719 | lang_full=langs_full[locale], | 726 | lang_full=langs_full[locale], |
720 | url=url, | 727 | url=url, |
728 | meetingnotesdata=meetingnotes, | ||
721 | newsdata=newsposts, | 729 | newsdata=newsposts, |
722 | videosdata=videoslist, | 730 | videosdata=videoslist, |
723 | self_localized=self_localized, | 731 | self_localized=self_localized, |
@@ -764,46 +772,3 @@ def main(): | |||
764 | 772 | ||
765 | if __name__ == "__main__": | 773 | if __name__ == "__main__": |
766 | main() | 774 | main() |
767 | |||
768 | # for in_file in glob.glob("news/*.j2"): | ||
769 | # name, ext = re.match(r"(.*)\.([^.]+)$", in_file.rstrip(".j2")).groups() | ||
770 | # tmpl = env.get_template(in_file) | ||
771 | |||
772 | # def self_localized(other_locale): | ||
773 | # """ | ||
774 | # Return URL for the current page in another locale. | ||
775 | # """ | ||
776 | # return "../" + other_locale + "/" + in_file.replace('news/', | ||
777 | # '').rstrip(".j2") | ||
778 | |||
779 | # def url_localized(filename): | ||
780 | # return "../" + locale + "/" + filename | ||
781 | |||
782 | # def svg_localized(filename): | ||
783 | # lf = filename + "." + locale + ".svg" | ||
784 | # if locale == "en" or not os.path.isfile(lf): | ||
785 | # return "../" + filename + ".svg" | ||
786 | # else: | ||
787 | # return "../" + lf | ||
788 | |||
789 | # def url(x): | ||
790 | # # TODO: look at the app root environment variable | ||
791 | # # TODO: check if file exists | ||
792 | # return "../" + x | ||
793 | |||
794 | # for f in glob.glob("locale/*/"): | ||
795 | # locale = os.path.basename(f[:-1]) | ||
796 | # content = tmpl.render(lang=locale, | ||
797 | # lang_full=langs_full[locale], | ||
798 | # url=url, | ||
799 | # self_localized=self_localized, | ||
800 | # url_localized=url_localized, | ||
801 | # svg_localized=svg_localized, | ||
802 | # filename=name + "." + ext) | ||
803 | # out_name = "./rendered/" + locale + "/news/" + in_file.replace('news/', '').rstrip(".j2") | ||
804 | # outdir = Path("rendered") | ||
805 | # langdir = outdir / locale / "news" | ||
806 | # langdir.mkdir(parents=True, exist_ok=True) | ||
807 | # # os.makedirs("./rendered/" + locale + "/news/", exist_ok=True) | ||
808 | # with codecs.open(out_name, "w", encoding='utf-8') as f: | ||
809 | # f.write(content) | ||
diff --git a/template/ev.html.j2 b/template/ev.html.j2 index 70c2ad81..ba138df9 100644 --- a/template/ev.html.j2 +++ b/template/ev.html.j2 | |||
@@ -69,28 +69,13 @@ | |||
69 | </div> | 69 | </div> |
70 | <div class="col-md"> | 70 | <div class="col-md"> |
71 | <h3>{{ _("Official Meeting Notes") }}</h3> | 71 | <h3>{{ _("Official Meeting Notes") }}</h3> |
72 | <p> | 72 | <ul> |
73 | <ul> | 73 | {% for item in meetingnotesdata %} |
74 | <li>{{ _("2013-12 (constitutional meeting)") }} | 74 | <li> |
75 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2013-12-27.txt">txt</a>) | 75 | {{ item['year'] }}: (Protocol: <a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/{{ item['date'] }}.txt">txt</a>) |
76 | </li> | ||
77 | <li>2014-12 | ||
78 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2014-12-28.txt">txt</a>) | ||
79 | </li> | ||
80 | <li>2015-12 | ||
81 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2015-12-29.txt">txt</a>) | ||
82 | </li> | ||
83 | <li>2016-12 | ||
84 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2016-12-28.txt">txt</a>) | ||
85 | </li> | 76 | </li> |
86 | <li>2017-12 | 77 | {% endfor %} |
87 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2017-12-27.txt">txt</a>) | 78 | </ul> |
88 | </li> | ||
89 | <li>2018-12 | ||
90 | (<a href="https://git.gnunet.org/gnunet-ev.git/tree/minutes/2018-12-27.txt">txt</a>) | ||
91 | </li> | ||
92 | </ul> | ||
93 | </p> | ||
94 | </div> | 79 | </div> |
95 | </div><!-- END:row --> | 80 | </div><!-- END:row --> |
96 | 81 | ||