From 342cdec074e1dfb25d7fe784da149b6fc3eb86d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?HUC=20St=C3=A9phane?= Date: Sat, 31 Jul 2021 21:54:53 +0200 Subject: [PATCH] Start Builder Project and Translation --- TODO | 10 +++ i18n.sh | 45 ++++++++++++++ pfstat-builder.sh | 35 +++++++++++ .../locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.mo | Bin 0 -> 503 bytes .../locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.po | 27 ++++++++ share/locale/pfstats.pot | 26 ++++++++ tmpl/pfstats.tmpl.html | 58 ++++++++++++++++++ 7 files changed, 201 insertions(+) create mode 100644 TODO create mode 100644 i18n.sh create mode 100755 pfstat-builder.sh create mode 100644 share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.mo create mode 100644 share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.po create mode 100644 share/locale/pfstats.pot create mode 100644 tmpl/pfstats.tmpl.html diff --git a/TODO b/TODO new file mode 100644 index 0000000..7102444 --- /dev/null +++ b/TODO @@ -0,0 +1,10 @@ +- build template html + +- made a generator, ask : + - iface + - ipv(4|6) + - language + - make needed directories + - fill files config and html + +- i18n: EN, FR, ? diff --git a/i18n.sh b/i18n.sh new file mode 100644 index 0000000..aa919bf --- /dev/null +++ b/i18n.sh @@ -0,0 +1,45 @@ +title="$(gettext "PFstats")" +subtitle="$(gettext "Dataviz Project to view the monitoring by pfstat")" + +text_ipv4="$(gettext "IPv4")" +text_ipv6="$(gettext "IPv6")" + +daily_traffic="$(gettext "Daily Traffic")" +hourly_traffic="$(gettext "Hourly Traffic")" +weekly_traffic="$(gettext "Weekly Traffic")" +monthly_traffic="$(gettext "Monthly Traffic")" +yearly_traffic="$(gettext "Yearly Traffic")" + +daily_packets="$(gettext "Daily Packets")" +hourly_packets="$(gettext "Hourly Packets")" +weekly_packets="$(gettext "Weekly Packets")" +monthly_packets="$(gettext "Monthly Packets")" +yearly_packets="$(gettext "Yearly Packets")" + +daily_states="$(gettext "Daily States")" +hourly_states="$(gettext "Hourly States")" +weekly_states="$(gettext "Weekly States")" +monthly_states="$(gettext "Monthly States")" +yearly_states="$(gettext "Yearly States")" + +daily_errors="$(gettext "Daily Errors")" +hourly_errors="$(gettext "Hourly Errors")" +weekly_errors="$(gettext "Weekly Errors")" +monthly_errors="$(gettext "Monthly Errors")" +yearly_errors="$(gettext "Yearly Errors")" + +title_errors="$(gettext "Errors")" +title_packets="$(gettext "Packets")" +title_states="$(gettext "States")" +title_traffic="$(gettext "Traffic")" + +title_daily="$(gettext "Daily")" +title_hourly="$(gettext "Hourly")" +title_weekly="$(gettext "Weekly")" +title_monthly="$(gettext "Monthly")" +title_yearly="$(gettext "Yearly")" + +text_by_me="$(gettext "Made with One Brain, Two Hands and LOL, by Stéphane HUC :: IT Log.")" +text_by_purecss="$(gettext "This site is built using PureCSS")" +text_by_pfstat="$(gettext "pfstat is a project of Daniel Hartmeir.")" +text_license="$(gettext "Licensed by BSD License")" diff --git a/pfstat-builder.sh b/pfstat-builder.sh new file mode 100755 index 0000000..e4faa55 --- /dev/null +++ b/pfstat-builder.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e +#set -u +#set -x +[ -n "$TERM" ] && clear +######################################################################## +### +## +# +# Author: Stéphane HUC +# mail: devs@stephane-huc.net +# gpg:fingerprint: CE2C CF7C AB68 0329 0D20 5F49 6135 D440 4D44 BD58 +# +# License: BSD License 2-Clause +# +# Git: +# +# Date: 2021/07/31 +# +## +### +######################################################################## + +ROOT="$(dirname "$(readlink -f -- "$0")")" + +TEXTDOMAIN="pfstats" +TEXTDOMAINDIR="${ROOT}/share/locale/" +export TEXTDOMAIN TEXTDOMAINDIR + +. gettext.sh +. "${ROOT}/i18n.sh" + +echo "${title}" +echo "${subtitle}" diff --git a/share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.mo b/share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.mo new file mode 100644 index 0000000000000000000000000000000000000000..c6a8fb5a18f4b25da23f4d91daf18b6d8b01a96c GIT binary patch literal 503 zcmZ9I%}N6?5XaXqggtr|oTDPq-L25Fr5@B)3N0?BibvD#bQ{?wOEO!nk0E&RQG6I* z!B=qBszrzVm`O78PiEeCHeWop4Q7`)VYZkaQ`sF8Fp}A3o|(Nh&wFKG<-T!Toqw?B z<*hT7)~{Vil5_P0i8c2)CLjZIg%3begqhKbj8!^=(E^HzBS~J;shsn^3q&^+H)x$Q zItG7$g|Q_1E>o#ED>EmChL4jgF~GU1k_119F+@QWil8oPAw*#u)(?Xy2>hPZSt&CV zLzFYF>v#L@m3nv-_~%9wY7)am!77B0bX??8=_ZV)(mJHp^{^uvt2`^Uo1hhKJvJ$K z5<_F8$iEersL@JpFNVZmst9VV-;<8TtD<~)=O=k-WiC3#&Rh(-_}aQw)P!Z&+ShOj j;X(8F_c2VYznl-j&wLA0T98`i3x^i+Kf_J&|8PG6Ya@=I literal 0 HcmV?d00001 diff --git a/share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.po b/share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.po new file mode 100644 index 0000000..dccbbc4 --- /dev/null +++ b/share/locale/fr_FR.UTF-8/LC_MESSAGES/pfstats.po @@ -0,0 +1,27 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-07-31 21:16+0200\n" +"PO-Revision-Date: 2021-07-31 21:17+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: fr\n" + +#: pfstat-builder.sh:35 +msgid "PFstats" +msgstr "PFstats" + +#: pfstat-builder.sh:36 +msgid "Dataviz Project to view the monitoring by pfstat" +msgstr "Projet Dataviz pour analyser le monitoring de pfstat" diff --git a/share/locale/pfstats.pot b/share/locale/pfstats.pot new file mode 100644 index 0000000..f9c65d7 --- /dev/null +++ b/share/locale/pfstats.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-07-31 21:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pfstat-builder.sh:35 +msgid "PFstats" +msgstr "" + +#: pfstat-builder.sh:36 +msgid "Dataviz Project to view the monitoring by pfstat" +msgstr "" diff --git a/tmpl/pfstats.tmpl.html b/tmpl/pfstats.tmpl.html new file mode 100644 index 0000000..9272155 --- /dev/null +++ b/tmpl/pfstats.tmpl.html @@ -0,0 +1,58 @@ + + + + + + + + +{{title}} + + + +
+ +
+

{{title}}

+

{{subtitle}}

+
+ + + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ {{footer}} +
+ + + +
+ + +