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 --- app.js | 22 +++++++++++----------- composer.js | 8 ++++---- index.html | 2 +- lib/misc.js | 10 +++++----- render.js | 30 +++++++++++++++--------------- views.js | 36 ++++++++++++++++++------------------ 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/app.js b/app.js index ed118c8..5523e7c 100644 --- a/app.js +++ b/app.js @@ -13,11 +13,11 @@ function route (keys) { if (!name) { var identify = h('div', {id: 'identify', classList: 'message'}) scroller.appendChild(identify) - identify.appendChild(h('span', {innerHTML: marked("Hey [" + keys.publicKey.substring(0, 10) + "...](/#"+ keys.publicKey +")! Welcome to Bogbook. If you have any questions be sure to reach out to [@ev](/#@Q++V5BbvWIg8B+TqtC9ZKFhetruuw+nOgxEqfjlOZI0=).")})) + identify.appendChild(h('span', {innerHTML: marked("Saluton [" + keys.publicKey.substring(0, 10) + "...](/#"+ keys.publicKey +")! Bonvenon al Interskri.be. Se vi havas ajnan demandon, sentu vin libera demandi ĉe [@LaPingvino](/#@gl6HzjWL8SndhDGpN1mtLkf6OXdBQi67vaAyCoCnsCU=).")})) - identify.appendChild(h('span', {innerHTML: marked("Your current public key doesn't have a name yet. Either import your existing id on the [key](/#key) page, or identify yourself using the box below. Identifying is optional, but you'll see this welcome message as long as you don't give yourself a name.")})) + identify.appendChild(h('span', {innerHTML: marked("Via nuna publika ŝlosilo ankoraŭ ne havas nomon. Vi povas ĉu importi vian ekzistantant identecon en la [ŝlosilo](/#key)-paĝo, aŭ identigi vin per la suba kesto. Ne estas ajna devigo identigi vin, sed vi vidos ĉi tiun bonvenigon dum vi ne donis nomon al vi.")})) - var input = h('input', {placeholder: 'Give yourself a name'}) + var input = h('input', {placeholder: 'Donu nomon por vi'}) identify.appendChild(h('div', [ input, @@ -38,12 +38,12 @@ function route (keys) { }, 1000) } } - }, ['Identify']) + }, ['Identigi']) ])) - identify.appendChild(h('span', {innerHTML: marked("Next, make sure to save your public/private keypair on the [key](/#key) page, so that you can continue to use the same identity. No one but you can access your private key, so only you can restore your ability to publish to this identity. If you lose your key, you lose your ability to publish to this identity forever.")})) + identify.appendChild(h('span', {innerHTML: marked("Sekve, certigu ke via paro de publika kaj privata ŝlosilo de la [ŝlosilo](/#key)-paĝo estu konservita en sekura loko por ke vi povu uzadi la saman identecon. Nur vi povas aliri vian privatan ŝlosilon, do nur vi povas restarigi la eblon afiŝi al ĉi tiu identeco. Se vi perdas vian ŝlosilon, vi perdas vian kapablon afiŝi al ĉi tiu identeco por ĉiam.")})) - identify.appendChild(h('span', {innerHTML: marked("Finally, be sure to check out the code on [SourceHut](http://git.sr.ht/~ev/bogbook)")})) + identify.appendChild(h('span', {innerHTML: marked("Fine, la (anglalingva versio de la) kodo de ĉi tiu paĝo troveblas en [SourceHut](http://git.sr.ht/~ev/bogbook)")})) } }) @@ -67,15 +67,15 @@ function route (keys) { } keys().then(key => { - var search = h('input', {placeholder: 'Search', classList: 'search'}) + var search = h('input', {placeholder: 'Serĉilo', classList: 'search'}) var navbar = h('div', {classList: 'navbar'}, [ h('div', {classList: 'internal'}, [ - h('li', [h('a', {href: '#'}, ['Home'])]), + h('li', [h('a', {href: '#'}, ['Hejmo'])]), h('li', [h('a', {href: '#' + key.publicKey}, [getName(key.publicKey, keys)])]), - h('li', [h('a', {href: '#key'}, ['Key'])]), - h('li', [h('a', {href: '#pubs'}, ['Pubs'])]), - h('li', {classList: 'right'}, [h('a', {href: 'http://git.sr.ht/~ev/bogbook'}, ['Git'])]), + h('li', [h('a', {href: '#key'}, ['Ŝlosilo'])]), + h('li', [h('a', {href: '#pubs'}, ['Konigejoj'])]), + h('li', {classList: 'right'}, [h('a', {href: 'http://git.sr.ht/~ev/bogbook'}, ['Fontkodo'])]), h('form', { classList: 'search', onsubmit: function (e) { window.location.hash = '?' + search.value diff --git a/composer.js b/composer.js index c7773d4..71960e4 100644 --- a/composer.js +++ b/composer.js @@ -8,7 +8,7 @@ function composer (keys, reply, gotName, edit) { } else if (gotName) { var textarea = h('textarea', ['[' + gotName.textContent + '](' + reply.author + ')']) } else { - var textarea = h('textarea', {placeholder: 'Write a new bog post...'}) + var textarea = h('textarea', {placeholder: 'Verki novan afiŝon...'}) } var publisher = h('div', [ @@ -45,7 +45,7 @@ function composer (keys, reply, gotName, edit) { messageDiv.removeChild(messageDiv.firstChild) messageDiv.appendChild(cache) } - }, ['Cancel'])) + }, ['Nuligi'])) preview.firstChild.appendChild(h('button', { onclick: function () { publish(content, keys).then(post => { @@ -74,12 +74,12 @@ function composer (keys, reply, gotName, edit) { }) }) } - }, ['Publish'])) + }, ['Publikigi'])) }) }) } } - }, ['Preview']) + }, ['Antaŭvidi']) ]) message.appendChild(publisher) diff --git a/index.html b/index.html index a6f0fd9..a470fc1 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ - Bogbook + Interskri.be 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 diff --git a/render.js b/render.js index 95fa749..cbbbcea 100644 --- a/render.js +++ b/render.js @@ -45,7 +45,7 @@ function addButton (post, message, keys) { h('img', {id: 'img'}) ]) - var locInput = h('input', {placeholder: 'New location'}) + var locInput = h('input', {placeholder: 'Nova loko'}) var locDiv = h('div', [ locInput, h('button', { @@ -66,7 +66,7 @@ function addButton (post, message, keys) { ]) var valueInput = h('input', {placeholder: '0.00'}) - var currencyInput = h('input', {placeholder: 'Currency'}) + var currencyInput = h('input', {placeholder: 'Monunuo'}) var valueDiv = h('div', [ valueInput, currencyInput, @@ -85,7 +85,7 @@ function addButton (post, message, keys) { }) }) } - }, ['Publish']) + }, ['Publikigi']) ]) var button = h('button', {/*classList: 'right',*/ @@ -94,23 +94,23 @@ function addButton (post, message, keys) { onclick: function () { message.appendChild(locDiv) } - }, ['Location'])) + }, ['Loko'])) message.appendChild(h('button', {classList: 'right', onclick: function () { message.appendChild(imageInput) document.getElementById("inp").addEventListener("change", readFile); } - }, ['Image'])) + }, ['Bildo'])) message.appendChild(h('button', {classList: 'right', onclick: function () { message.appendChild(valueDiv) } - }, ['Value'])) + }, ['Valoro'])) } - }, ['Add']) + }, ['Aldoni']) @@ -127,11 +127,11 @@ function getHeader (post, keys, mini) { raw.parentNode.removeChild(raw) removeRaw.parentNode.replaceChild(getRaw, removeRaw) } - }, ['hide']) + }, ['kaŝi']) getRaw.parentNode.replaceChild(removeRaw, getRaw) head.appendChild(raw) } - }, ['raw']) + }, ['kruda']) var head = h('span', [ h('p', {classList: 'right'}, [ @@ -160,7 +160,7 @@ function render (msg, keys, preview) { log.reverse().forEach(function (nextPost) { if (nextPost.located == msg.key) { var locatedExists = document.getElementById('located:' + msg.key) - var located = h('div', {id: 'located:' + msg.key}, [h('strong', ['Location: ']), nextPost.loc]) + var located = h('div', {id: 'located:' + msg.key}, [h('strong', ['Loko: ']), nextPost.loc]) if (locatedExists) { locatedExists.parentNode.removeChild(locatedExists) } @@ -183,7 +183,7 @@ function render (msg, keys, preview) { if (nextPost.valuated == msg.key) { var valuatedExists = document.getElementById('valuated:' + msg.key) - var valuated = h('div', {id: 'valuated:' + msg.key}, [h('strong', ['Price: ' ]), nextPost.value + ' ' + nextPost.currency]) + var valuated = h('div', {id: 'valuated:' + msg.key}, [h('strong', ['Prezo: ' ]), nextPost.value + ' ' + nextPost.currency]) if (valuatedExists) { valuatedExists.parentNode.removeChild(valuatedExists) } @@ -201,7 +201,7 @@ function render (msg, keys, preview) { msgcontents.parentNode.replaceChild(editedcontents, msgcontents) message.appendChild(h('div', [ - 'edited in:', + 'redaktita en:', h('a', {href: '#' + nextPost.key}, [nextPost.key.substring(0, 10) + '...']) ])) if (!messageExists) { @@ -236,7 +236,7 @@ function render (msg, keys, preview) { message.appendChild(getHeader(msg, keys)) message.appendChild(h('span', [ - 'edited: ', + 'redaktita: ', h('a', {href: '#' + msg.edited}, [msg.edited.substring(0, 10) + '...']) ])) @@ -285,14 +285,14 @@ function render (msg, keys, preview) { messageDiv.appendChild(h('div', {classList: 'submessage'}, [composer(keys, msg, gotName)])) } } - }, ['Reply'])) + }, ['Respondi'])) if (msg.author === keys.publicKey) { message.appendChild(h('button', { onclick: function () { var editor = h('div', [composer(keys, msg, {gotName: false}, {edit: true})]) message.appendChild(editor) } - }, ['Edit'])) + }, ['Redakti'])) } message.appendChild(addButton(msg, message, keys)) } diff --git a/views.js b/views.js index 87a4c10..72ecd4c 100644 --- a/views.js +++ b/views.js @@ -22,7 +22,7 @@ function profilePage (src, keys) { sync(subs, keys) - var input = h('input', {placeholder: 'New name'}) + var input = h('input', {placeholder: 'Nova nomo'}) profile.appendChild(h('a', {href: '#' + src}, [getName(src, keys)])) @@ -47,7 +47,7 @@ function profilePage (src, keys) { }) } } - }, ['Identify']) + }, ['Identigi']) ]) var identifyButton = h('button', { @@ -55,13 +55,13 @@ function profilePage (src, keys) { profile.appendChild(identify) identifyButton.parentNode.removeChild(identifyButton) } - }, ['Identify ' + src.substring(0, 10) + '...']) + }, ['Identigi ' + src.substring(0, 10) + '...']) var mentionsButton = h('button', { onclick: function () { location.href = '#?' + src } - }, ['Mentions']) + }, ['Mencioj']) profile.appendChild(identifyButton) @@ -74,14 +74,14 @@ function profilePage (src, keys) { subs = subs.filter(a => a !== src) localforage.setItem('subscriptions', subs).then(function () { location.reload() }) } - }, ['Unsubscribe'])) + }, ['Ne plu sekvi'])) } else { profile.appendChild(h('button', { onclick: function () { subs.push(src) localforage.setItem('subscriptions', subs).then(function () { location.reload() }) } - }, ['Subscribe'])) + }, ['Sekvi'])) } }) @@ -92,7 +92,7 @@ function profilePage (src, keys) { regenerate(home) }) } - }, ['Delete feed'])) + }, ['Forigi fluon'])) bog().then(log => { if (log) { @@ -150,13 +150,13 @@ function publicPage (keys) { onclick: function () { localforage.clear().then(function () {location.reload()}) } - }, ['Delete Everything'])) + }, ['Forviŝi ĉion'])) div.appendChild(h('button', { onclick: function () { regenerate() } - }, ['Regenerate'])) + }, ['Regeneri'])) scroller.appendChild(div) @@ -173,7 +173,7 @@ function publicPage (keys) { function keyPage (keys) { var message = h('div', {classList: 'message'}) - message.appendChild(h('p', {innerHTML: marked('This is your ed25519 public/private keypair. It was generated using [TweetNaCl.js](https://tweetnacl.js.org/#/). Your public key is your identity when using [Bogbook](http://bogbook.com/), save your key in a safe place so that you can continue to use the same identity.')})) + message.appendChild(h('p', {innerHTML: marked('Jen via ŝlosilparo de ed25519-norma publika kaj privata ŝlosilo. Ĝi estas kreita per [TweetNaCl.js](https://tweetnacl.js.org/#/). Via publika ŝlosilo estas via identeco dum vi uzas [Interskri.be](https://interskri.be) (aŭ [Bogbook](http://bogbook.com/), la ĉefa projekto, se vi elektas tion), konservu vian ŝlosilon en sekura loko por ke vi povu uzadi la saman identecon.')})) message.appendChild(h('pre', {style: 'width: 80%'}, [h('code', [JSON.stringify(keys)])])) @@ -184,9 +184,9 @@ function keyPage (keys) { location.reload() }) } - }, ['Delete Key'])) + }, ['Forigi ŝlosilon'])) - var textarea = h('textarea', {placeholder: 'Import your existing ed25519 keypair'}) + var textarea = h('textarea', {placeholder: 'Ĉi tie vi povas importi vian ekzistantan ed25519-ŝlosilparon'}) message.appendChild(textarea) message.appendChild(h('button', { onclick: function () { @@ -194,7 +194,7 @@ function keyPage (keys) { localforage.setItem('id', JSON.parse(textarea.value)).then(function () { location.reload() }) } } - }, ['Import Key'])) + }, ['Importi ŝlosilon'])) scroller.appendChild(message) } @@ -202,9 +202,9 @@ function keyPage (keys) { function pubs () { var message = h('div', {classList: 'message'}) - message.appendChild(h('p', {innerHTML: marked('These are the Bogbook pubs that your browser will connect to as it looks for new messages from your subscriptions, when you post new bog posts, and when you click on feeds.\n\nAdd or remove these pubs to control where your Bogbook gossips. Localhost is a default, but will only work if you install Bogbook on your local computer by [cloning down the repo](https://git.sr.ht/~ev/bogbook).')})) + message.appendChild(h('p', {innerHTML: marked('Jen la Bogbook-konigejoj al kiuj via foliumilo konektiĝas por kontroli pri novaj mesaĝoj de viaj sekvataj personoj, kiam vi afiŝas novajn aferojn kaj kiam vi surklakas fluojn.\n\nAldonu aŭ forigu ĉi tie konigejojn por decidi kien afiŝas la retejo. Se vi loke instalis kaj ruligas Bogbook, ĝi ankaŭ uzas tion kiel publikigo-celo. Atentu ke la kreinto de Bogbook ne ŝatas https, do ĉi tie malkiel en (Bogbook)[http://bogbook.com] nur funkcias wss-konigejoj krom se via retumilo permesas konektiĝi de https al nesekuraj ws-konektoj. Vi povas loke instali kaj ruligi Bogbook [klonante la deponejon](https://git.sr.ht/~ev/bogbook).')})) - var add = h('input', {placeholder: 'Add a pub'}) + var add = h('input', {placeholder: 'Aldoni konigejon'}) localforage.getItem('securepubs').then(function (servers) { @@ -217,7 +217,7 @@ function pubs () { localforage.setItem('securepubs', servers).then(function () { location.reload() }) } } - }, ['Add a pub']) + }, ['Aldoni konigejon']) ])) servers.forEach(function (pub) { @@ -228,7 +228,7 @@ function pubs () { var newServers = servers.filter(item => item !== pub) localforage.setItem('securepubs', newServers).then(function () { location.reload() }) } - }, ['Remove']) + }, ['Forigi']) ])) }) }) @@ -240,7 +240,7 @@ function pubs () { location.reload() }) } - }, ['Reset pubs'])) + }, ['Restarigi konigejojn'])) scroller.appendChild(message) } -- cgit v1.2.3-70-g09d2