Fix translation

This commit is contained in:
dadav
2019-10-05 14:15:36 +02:00
parent e9b9a1edb9
commit 918da69cba
11 changed files with 142 additions and 19 deletions

View File

@ -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"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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)

View File

@ -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