diff options
author | Joop Kiefte <ikojba@gmail.com> | 2019-10-11 23:31:45 +0200 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2019-10-11 23:31:45 +0200 |
commit | 0c2def5d7d22fc8fa69f262c8bdaadf8a03840c0 (patch) | |
tree | f20dcce6e8c06cfcaa69ff6810ee1a01bd34376f /lib | |
parent | 6c7fff9b8fafb5fc866c07feebed1a0663311d78 (diff) |
Translate to Esperanto
Diffstat (limited to 'lib')
-rw-r--r-- | lib/misc.js | 10 |
1 files changed, 5 insertions, 5 deletions
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 |