diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.mo b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.mo index 9a26d44..fd5058b 100644 Binary files a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.mo and b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.mo differ diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.po index 8cf48b4..fa9afdf 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/de/LC_MESSAGES/voice.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:42+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-09-29 14:00+0200\n" "Last-Translator: dadav <33197631+dadav@users.noreply.github.com>\n" "Language-Team: DE <33197631+dadav@users.noreply.github.com>\n" @@ -188,3 +188,21 @@ msgstr "" "Ich war {duration} am Pwnen und habe {deauthed} Clients gekickt! Außerdem " "habe ich {associated} neue Freunde getroffen und {handshakes} Handshakes " "gefressen! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "Stunden" + +msgid "minutes" +msgstr "Minuten" + +msgid "seconds" +msgstr "Sekunden" + +msgid "hour" +msgstr "Stunde" + +msgid "minute" +msgstr "Minute" + +msgid "second" +msgstr "Sekunde" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/el/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/el/LC_MESSAGES/voice.po index fe6d817..f113ce1 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/el/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/el/LC_MESSAGES/voice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:44+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-10-03 08:00+0000\n" "Last-Translator: Periklis Fregkos <fregkos@gmail.com>\n" "Language-Team: pwnagotchi <33197631+dadav@users.noreply.github.com>\n" @@ -189,3 +189,21 @@ msgstr "" "Pwnαρα για {duration} και έριξα {deauthed} πελάτες! Επίσης γνώρισα " "{associated} νέους φίλους και καταβρόχθισα {handshakes} χειραψίες! " "#pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "" + +msgid "minutes" +msgstr "" + +msgid "seconds" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "second" +msgstr "" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/fr/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/fr/LC_MESSAGES/voice.po index 7110512..1172f7f 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/fr/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/fr/LC_MESSAGES/voice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:47+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-10-03 10:34+0200\n" "Last-Translator: quantumsheep <7271496+quantumsheep@users.noreply.github." "com>\n" @@ -190,3 +190,21 @@ msgstr "" "J'ai pwn durant {duration} et kick {deauthed} clients! J'ai aussi rencontré " "{associated} nouveaux amis and mangé {handshakes} handshakes! #pwnagotchi " "#pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "" + +msgid "minutes" +msgstr "" + +msgid "seconds" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "second" +msgstr "" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.mo b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.mo index bcc0f8f..53dfa24 100644 Binary files a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.mo and b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.mo differ diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.po index d738a47..60cec0b 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/it/LC_MESSAGES/voice.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:43+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-10-02 17:20+0000\n" "Language-Team: pwnagotchi <33197631+dadav@users.noreply.github.com>\n" "Language: italian\n" @@ -187,3 +187,21 @@ msgstr "" "Ho lavorato per {duration} e preso a calci {deauthed} clients! Ho anche " "incontrato {associate} nuovi amici e ho mangiato {handshakes} handshakes! " "#pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "ore" + +msgid "minutes" +msgstr "minuti" + +msgid "seconds" +msgstr "secondi" + +msgid "hour" +msgstr "ora" + +msgid "minute" +msgstr "minuto" + +msgid "second" +msgstr "secondo" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/mk/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/mk/LC_MESSAGES/voice.po index 61d6a3f..9dff7da 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/mk/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/mk/LC_MESSAGES/voice.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:35+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-09-30 23:53+0200\n" "Last-Translator: kovach <2214005+kovachwt@users.noreply.github.com>\n" "Language-Team: \n" @@ -189,3 +189,21 @@ msgstr "" "Си газам веќе {duration} и избацив {deauthed} клиенти! Запознав {associated} " "нови другарчиња и лапнав {handshakes} ракувања! #pwnagotchi #pwnlog #pwnlife " "#hacktheplanet #skynet" + +msgid "hours" +msgstr "" + +msgid "minutes" +msgstr "" + +msgid "seconds" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "second" +msgstr "" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/nl/LC_MESSAGES/voice.po b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/nl/LC_MESSAGES/voice.po index 72484e2..6f6f3e3 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/nl/LC_MESSAGES/voice.po +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/nl/LC_MESSAGES/voice.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:43+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: 2019-09-29 14:00+0200\n" "Last-Translator: Justin-P <justin-p@users.noreply.github.com>\n" "Language-Team: pwnagotchi <33197631+dadav@users.noreply.github.com>\n" @@ -188,3 +188,21 @@ msgstr "" "Ik heb gepwned voor {duration} and heb {deauthed} clients gekicked! Ik heb " "ook {associated} nieuwe vrienden gevonden en heb {handshakes} handshakes " "gegeten! #pwnagotchi #pwnlog #pwnlife #hacktheplanet #skynet" + +msgid "hours" +msgstr "" + +msgid "minutes" +msgstr "" + +msgid "seconds" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "second" +msgstr "" diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/voice.pot b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/voice.pot index c11874e..b6489ba 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/voice.pot +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/locale/voice.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-10-03 16:47+0200\n" +"POT-Creation-Date: 2019-10-05 14:10+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -190,18 +190,17 @@ msgstr "" msgid "hours" msgstr "" -msgid "hour" +msgid "minutes" msgstr "" -msgid "minutes" +msgid "seconds" +msgstr "" + +msgid "hour" msgstr "" msgid "minute" msgstr "" -msgid "hours" +msgid "second" msgstr "" - -msgid "hour" -msgstr "" - diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/log.py b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/log.py index c6a108f..416ae4f 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/log.py +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/log.py @@ -125,11 +125,11 @@ class SessionParser(object): self.duration = '%02d:%02d:%02d' % (hours, mins, secs) self.duration_human = [] if hours > 0: - self.duration_human.append('%d %s' % (hours, self.voice.custom('hours' if hours > 1 else 'hour'))) + self.duration_human.append('%d %s' % (hours, self.voice.hhmmss(hours, 'h'))) if mins > 0: - self.duration_human.append('%d %s' % (mins, self.voice.custom('minutes' if mins > 1 else 'minute'))) + self.duration_human.append('%d %s' % (mins, self.voice.hhmmss(mins, 'm'))) if secs > 0: - self.duration_human.append('%d %s' % (secs, self.voice.custom('seconds' if secs > 1 else 'second'))) + self.duration_human.append('%d %s' % (secs, self.voice.hhmmss(secs, 's'))) self.duration_human = ', '.join(self.duration_human) self.avg_reward /= (self.epochs if self.epochs else 1) diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/voice.py b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/voice.py index 536bc17..9268b11 100644 --- a/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/voice.py +++ b/sdcard/rootfs/root/pwnagotchi/scripts/pwnagotchi/voice.py @@ -138,5 +138,21 @@ class Voice: associated=log.associated, handshakes=log.handshakes) - def custom(self, text): - return self._(text) + def hhmmss(self, count, fmt): + if count > 1: + # plural + if fmt == "h": + return self._("hours") + if fmt == "m": + return self._("minutes") + if fmt == "s": + return self._("seconds") + else: + # sing + if fmt == "h": + return self._("hour") + if fmt == "m": + return self._("minute") + if fmt == "s": + return self._("second") + return fmt