From 0c2def5d7d22fc8fa69f262c8bdaadf8a03840c0 Mon Sep 17 00:00:00 2001 From: Joop Kiefte Date: Fri, 11 Oct 2019 23:31:45 +0200 Subject: Translate to Esperanto --- lib/misc.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/misc.js b/lib/misc.js index afc3a33..5aba54f 100644 --- a/lib/misc.js +++ b/lib/misc.js @@ -3,7 +3,7 @@ function human(seconds) { if (seconds instanceof Date) seconds = Math.round((Date.now() - seconds) / 1000); - var suffix = seconds < 0 ? 'from now' : 'ago'; + var prefix = seconds < 0 ? 'post' : 'antaĆ­'; seconds = Math.abs(seconds); var times = [ @@ -15,18 +15,18 @@ function human(seconds) { seconds / 60, // minutes seconds // seconds ]; - var names = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second']; + var names = ['jaro', 'monato', 'semajno', 'tago', 'horo', 'minuto', 'sekundo']; for (var i = 0; i < names.length; i++) { var time = Math.floor(times[i]); var name = names[i]; if (time > 1) - name += 's'; + name += 'j'; if (time >= 1) - return time + ' ' + name + ' ' + suffix; + return prefix + ' ' + time + ' ' + name; } - return '0 seconds ' + suffix; + return '0 sekundoj ' + suffix; } // hscrpt by Dominic Tarr https://github.com/dominictarr/hscrpt/blob/master/LICENSE -- cgit v1.2.3-70-g09d2