|
|
Log in / Subscribe / Register

Mozilla releases a machine-translation plugin

Mozilla releases a machine-translation plugin

Posted Jun 3, 2022 7:31 UTC (Fri) by cdamian (subscriber, #1271)
Parent article: Mozilla releases a machine-translation plugin

I hope this will end up on mobile too.


to post comments

Mozilla releases a machine-translation plugin

Posted Jun 3, 2022 7:41 UTC (Fri) by pabs (subscriber, #43278) [Link] (18 responses)

I hope this will end up in Linux i18n frameworks (gettext), desktops and mail clients too. It would be useful when manual translations aren't available; such as for not fully translated languages, or for when you get legit or spam mails in a language you don't understand.

Mozilla releases a machine-translation plugin

Posted Jun 3, 2022 18:08 UTC (Fri) by alexander.batischev (guest, #122369) [Link] (16 responses)

> It would be useful when manual translations aren't available

It might be useful for long-form texts like manpages, but for short strings like gettext message catalogues it'd be worse than nothing. Even human translators manage to miss some of the context when translating (I did that myself more than once!) Machines stand very little chance there, at least until they can *use* the software to figure out the meaning of messages.

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 2:49 UTC (Sat) by pabs (subscriber, #43278) [Link] (15 responses)

There are a lot of people who speak no English, I'd wager they would prefer machine translation over zero translation and we shouldn't exclude them from using Free Software because we haven't attracted translators for their language.

I know that is what I feel when I visit a country where English isn't common; non-English OCR and TTS plus MT of interfaces and OCR/TTS results to English would be excellent.

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 10:30 UTC (Sat) by Wol (subscriber, #4433) [Link] (11 responses)

> There are a lot of people who speak no English, I'd wager they would prefer machine translation over zero translation and we shouldn't exclude them from using Free Software because we haven't attracted translators for their language.

Time flies like an arrow, fruit flies like a banana.

Without context, that statement is just NOT TRANSLATEABLE. Machine translation is worse than zero translation - it's impossible even to tell the difference between a noun, a verb and an adjective! Quick - is "flies" a noun or verb?

And English is probably one of the worst languages to translate, given its complex conjugation and massive vocabulary. But other languages have got their quirks, too.

If you limit machine translation to areas it works well (mostly technical, I guess), then great, but once you start using it to translate prose, or even worse poetry, it's going to have a very hard time of it.

Cheers,
Wol

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 14:38 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (6 responses)

FWIW, I'd consider handling such ambiguities to be a requirement for translation anyways. Sure, it's not translatable by anything that does "word -> word" translation, but I do think the bar is far higher than that these days.

Of course, you could also be in a strange sci-fi universe where bananas fly and arrows are food for a certain kind of fly (feels kind of Douglas Adams-y to me given the "flooping" of certain mattresses and such). *That* kind of context definitely needs more than just a sentence.

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 15:10 UTC (Sat) by mpr22 (subscriber, #60784) [Link] (5 responses)

The funniest part is that, "time flies like an arrow" makes "fruit flies like a banana" easier to translate, because it primes the mind to think of "fly" as a verb.

Whereas without a wider context, "fruit flies like a banana" is ambiguous.

(Bananas, like pigs, fly just fine if you throw them hard enough.)

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 17:56 UTC (Sat) by hvd (guest, #128680) [Link] (4 responses)

The idea of that sentence is that to parse it correctly, the first "flies" should be parsed as a verb, the second as a noun. It's not meant to be ambiguous, it's meant to be hard to parse. Fruit does not fly as bananas do. That's grammatically correct but makes no sense, fruit does not fly. The verb in the second sentence is "like", as fruit flies are animals that like bananas.

Mozilla releases a machine-translation plugin

Posted Jun 5, 2022 20:58 UTC (Sun) by JoeBuck (guest, #2330) [Link] (3 responses)

Google Translate also has trouble with this sentence:

English to French:

le temps passe comme une flèche, mais les fruits volent comme une banane.

Translating this back to English gives

time flies like an arrow, but fruits fly like a banana.

Mozilla releases a machine-translation plugin

Posted Jun 5, 2022 21:12 UTC (Sun) by Wol (subscriber, #4433) [Link] (2 responses)

Which throws up another quirk of English - many words (fruit included) either have weird plurals or are number-indefinite. A similar example is sheep.

I'm guessing (like with die/dice, thou/you), the singular has simply fallen into disuse, although I have no clue what the singular might have been for fruit/sheep if that guess is correct.

Cheers,
Wol

Mozilla releases a machine-translation plugin

Posted Jun 6, 2022 16:20 UTC (Mon) by rgmoore (✭ supporter ✭, #75) [Link] (1 responses)

I think nouns like fruit and sheep were originally uncountable, like water. That means you'd talk about a quantity of them rather than a number, so there wouldn't really be a singular or plural.

Mozilla releases a machine-translation plugin

Posted Jun 17, 2022 9:59 UTC (Fri) by nix (subscriber, #2304) [Link]

> I think nouns like fruit and sheep were originally uncountable, like water.

Something like that: for sheep at least they were similar in some cases at one time, but that was because of loss of a trailing vowel which *did* indicate a plural, presumably because you could usually figure out the number from contextual clues anyway. The OED says:

> The prehistoric plural *skǣpu normally lost its final vowel in Old English, so that nominative and accusative singular and plural became identical.

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 15:22 UTC (Sat) by rsidd (subscriber, #2582) [Link] (1 responses)

This is because "fruit flies like a banana" is unidiomatic even in English. You would say "fruit flies like bananas" except in this context of tripping someone up.

That said, both the mozilla and the google translators translate "fruit flies like bananas" as "moscerini della frutta come banane". (fruit flies such as bananas). Google translates "gorillas like bananas" correctly though (ai gorilla piacciono le banane). Odd.

My point is, google and, as far as I have seen, the mozilla translator handle individual sentences just fine, so it would be fantastic to use them for i18n where possible. Where there are errors, native readers can figure it out, and not go through life thinking that all kinds of fruit travel through the air in the manner of a banana.

Mozilla releases a machine-translation plugin

Posted Jun 5, 2022 17:01 UTC (Sun) by Wol (subscriber, #4433) [Link]

> This is because "fruit flies like a banana" is unidiomatic even in English. You would say "fruit flies like bananas" except in this context of tripping someone up.

Unidiomatic? In American, maybe. I don't actually use that sort of language much, it feels perfectly normal to me ...

Cheers,
Wol

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 15:25 UTC (Sat) by david.a.wheeler (subscriber, #72896) [Link]

> If you limit machine translation to areas it works well (mostly technical, I guess), then great, but once you start using it to translate prose, or even worse poetry, it's going to have a very hard time of it.

In UI frameworks, the text tends to technical and thus easier to handle. Modern machine language translators are now doing a better job at prose, too. They are obviously not as good as a human, but they are much better than being completely unable to access the information entirely. There's an argument that poetry isn't fully translatable, even by humans fluent in both languages... I don't see why that limitation should mean we can't use the technology in other ways.

I'd rather have half a loaf than starve.

Mozilla releases a machine-translation plugin

Posted Aug 1, 2022 12:30 UTC (Mon) by immibis (subscriber, #105511) [Link]

Reading "clock insects prefer darts, vegetable insects prefer bananas" is still much preferable to "%$^(%&@(#$*@#)$&^$%*&$^#" which the text may as well be if you don't understand the language. You can now skim the text and delve deeper into only the parts that don't make sense, instead of painstakingly looking up every single word in a dictionary.

Mozilla releases a machine-translation plugin

Posted Jun 9, 2022 13:38 UTC (Thu) by tbelaire (subscriber, #141140) [Link] (2 responses)

I was just translating a karaoke program recently, and "queue" being used as a verb (to add to the queue) as well as the noun (title of the page displaying the queue) was impossible to even translate with `gettext`. I ended up having to ask upstream to use "enqueue" for the verb form to get it translated.

I think getting the verb / noun versions wrong (some languages they do *not* overlap) is more confusing than leaving it in English, at least for the target audience I was translating for (my partner's parents know a little english, but prefer Chinese strongly).

Mozilla releases a machine-translation plugin

Posted Jun 9, 2022 16:13 UTC (Thu) by nye (subscriber, #51576) [Link] (1 responses)

Excuse my gettext ignorance, but why can't contexts be used to solve this? I thought the point of them is to allow the same text to be translated in different ways according to the context. Surely gettext can't get this that badly wrong?

This is such a common standard issue in translation that any translation tool that can't handle it is barely even a toy IMO.

Mozilla releases a machine-translation plugin

Posted Jun 9, 2022 17:40 UTC (Thu) by tbelaire (subscriber, #141140) [Link]

Ok, well here it is.

https://github.com/vicwomg/pikaraoke/blob/master/template...

I have it hooked up with pybabel and flask_babel, and jinja2.ext.i18n for inflating the templates. I see the context correctly when editing the translation files, but I don't think the context is used for a lookup? That would be pgettext right?

https://docs.python.org/3/library/gettext.html#gettext.pg...

Oh, I see that the jinja2 extension mentions pgettext

https://jinja.palletsprojects.com/en/3.1.x/extensions/#i1...

But I'm not sure how to wire it up to the {% trans %} blocks, and it was easier to just upstream it. I was doing this as a hobby and I'm not a pro in this area.

Mozilla releases a machine-translation plugin

Posted Jun 4, 2022 18:55 UTC (Sat) by JanC_ (guest, #34940) [Link]

I don’t think it would be very useful to replace gettext translations right now, as (for now) most languages that have machine translations available are generally well-translated already, but it could be useful to assist the existing human translators (especially if it can learn from corrections somehow).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds