💾 Archived View for gemi.dev › gemini-mailing-list › 000498.gmi captured on 2024-05-26 at 16:03:59. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

-=-=-=-=-=-=-

Translation service

1. Nick Thomas (gemini (a) ur.gs)

Hola mis amigos!

I didn't find a capsule offering translation services in Geminispace,
so I've put one together. It's linked from gemini://ur.gs, or you can
construct a translation request URL manually, like so:

gemini://ur.gs/cgi-bin/translate/en/es?Hello%20world

Only en->es and es->en are supported right now; he estado aprendiendo
espa?ol casi dos a?os ahora.

You can visit gemini://ur.gs/cgi-bin/translate to get a 10 prompt for
translation.

It's using apertium, running on the same machine as the gemini server. 
If people like the service, I'll set up a babel.ur.gs or so somewhere,
with more language pairs.

Improvements... well, visiting /translate could prompt for the source
language, and /translate/en could prompt for the destination language.
It could also, conceivably, take a URL to perform translation for.

Let me know what you think. I'm especially interested in translation
quality and responsiveness - I only learned about apertium todaym and
I've managed to get some pretty bad translations out of it so far :D.
If you have suggestions for alternatives, I'm all ears, although
apertium was pleasingly simple to set up. I might never visit deepl
again!

Source code for the cgi-bin script is here: 
https://code.ur.gs/lupine/capsule/src/branch/main/src/cgi-bin/translate
- it relies on the apertium and aperium-en-es packages being installed
on the same machine, and on everything being UTF-8 throughout.

/Nick

Link to individual message.

2. Krispin Schulz (krispin (a) posteo.de)

Hi Nick,

great work with the translation service!

I added it to https://github.com/kr1sp1n/awesome-gemini#services 
<https://github.com/kr1sp1n/awesome-gemini#services> and hope that much more services
will pop up in the foreseeable future.


@all: 	Does anyone know how to make links from gemini URLs in Markdown 
files so it will render in the browser?
	Is that even possible as long as the browser does not recognize the gemini schema?


Cheers,

Krispin

> On 27. Nov 2020, at 01:56, Nick Thomas <gemini at ur.gs> wrote:
> 
> Hola mis amigos!
> 
> I didn't find a capsule offering translation services in Geminispace,
> so I've put one together. It's linked from gemini://ur.gs, or you can
> construct a translation request URL manually, like so:
> 
> gemini://ur.gs/cgi-bin/translate/en/es?Hello%20world
> 
> Only en->es and es->en are supported right now; he estado aprendiendo
> espa?ol casi dos a?os ahora.
> 
> You can visit gemini://ur.gs/cgi-bin/translate to get a 10 prompt for
> translation.
> 
> It's using apertium, running on the same machine as the gemini server.
> If people like the service, I'll set up a babel.ur.gs or so somewhere,
> with more language pairs.
> 
> Improvements... well, visiting /translate could prompt for the source
> language, and /translate/en could prompt for the destination language.
> It could also, conceivably, take a URL to perform translation for.
> 
> Let me know what you think. I'm especially interested in translation
> quality and responsiveness - I only learned about apertium todaym and
> I've managed to get some pretty bad translations out of it so far :D.
> If you have suggestions for alternatives, I'm all ears, although
> apertium was pleasingly simple to set up. I might never visit deepl
> again!
> 
> Source code for the cgi-bin script is here:
> https://code.ur.gs/lupine/capsule/src/branch/main/src/cgi-bin/translate
> - it relies on the apertium and aperium-en-es packages being installed
> on the same machine, and on everything being UTF-8 throughout.
> 
> /Nick
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201127/f0c6
e3cf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201127/f0c6
e3cf/attachment.sig>

Link to individual message.

3. Luke Emmet (luke (a) marmaladefoo.com)


On 27-Nov-2020 09:00, Krispin Schulz wrote:
 >
 >
 > @all:  Does anyone know how to make links from gemini URLs in 
Markdown files so it will render in the browser?
 > Is that even possible as long as the browser does not recognize the 
gemini schema?
 >

For markdown or html files to work correctly, they would have to be 
rendered by the client. The default trick that most clients have to deal 
with unknown mime format is to open them in an external application. But 
that won't work properly - any relative path links won't work correctly.

There is a fair amount of html being served in gemini and the occasional 
bit of markdown too. GUS has some content type statistics here:

   gemini://gus.guru/statistics

There are a couple of clients that directly support these formats, but 
much less so compared to text/gemini which is supported by all. The ones 
I know of (there may well be others) are:

render text/html: Kristall, GemiNaut, Diohsc (via converter)
render text/markdown: Kristall

Client authors could plug in an converter into their pipeline if they 
wish, as a way to display such content in a client that only supports 
gemtext. There are converters you can use, such as md2gemini and 
html2gmi for that.

But I think for now, most clients will simply render text/html and 
text/markdown as plain text (not interpreted).

  - Luke

Link to individual message.

4. John Cowan (cowan (a) ccil.org)

On Fri, Nov 27, 2020 at 4:23 AM Luke Emmet <luke at marmaladefoo.com> wrote:


> For markdown or html files to work correctly, they would have to be
> rendered by the client.


Another approach is for clients to allow a Gemini-Gemini proxy, and then
write one that does whatever translations you want.  Since many clients
support proxies for HTML on HTTP, it shouldn't be that hard to add this
support, or to modify an HTTP proxy to speak Gemini instead.  I would
expect that these would normally be private proxies, as they need to share
the current cert with the client to avoid what looks like a MITM attack.

The default trick that most clients have to deal
> with unknown mime format is to open them in an external application. But
> that won't work properly - any relative path links won't work correctly.
>

Well, most formats other than HTML and Markdown don't have hyperlinks,
though I admit they are the most pressing cases.



John Cowan          http://vrici.lojban.org/~cowan        cowan at ccil.org
And now here I was, in a country where a right to say how the country should
be governed was restricted to six persons in each thousand of its
population.
For the nine hundred and ninety-four to express dissatisfaction with the
regnant system and propose to change it, would have made the whole six
shudder as one man, it would have been so disloyal, so dishonorable, such
putrid black treason.  --Mark Twain's Connecticut Yankee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201127/8ca6
6847/attachment.htm>

Link to individual message.

---

Previous Thread: Please stop top posting

Next Thread: [ANN] Stream of Consciousness - a fancy twtxt frontend in Gemini