is this a mistranslation?

Post Reply
User avatar
BarryK
Posts: 2698
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 739 times

is this a mistranslation?

Post by BarryK »

Hi guys,
I have been experimenting with 'translate-shell'
What do you think about these two translations:

Code: Select all

# trans -b -s en -t fr -j life\'s but a walking shadow, a poor player
la vie n'est qu'une ombre qui marche, un mauvais joueur
# 
# trans -b -s en -t fr -j life\'s but a walking \"shadow\", a poor player
la vie n'est qu'une "ombre" ambulante, un mauvais joueur

"ambulante" in English means "itinerant", not what is intended!

Note, translate-shell is available here:
https://github.com/soimort/translate-shell

User avatar
BarryK
Posts: 2698
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 739 times

Re: is this a mistranslation?

Post by BarryK »

Here is another question.
I figured out a way to force 'trans' to ignore certain text, by using 'base64' to change the string to something untranslatable. Example:

Code: Select all

# echo 'Puppy Linux' | base64 -w 0
UHVwcHkgTGludXgK# 
# trans -b -s en -t fr -j The UHVwcHkgTGludXgK operating system is great
Le système d'exploitation UHVwcHkgTGludXgK est génial

Afterward, the base64 string can be converted back:

Code: Select all

# echo 'UHVwcHkgTGludXgK' | base64 -d -w 0
Puppy Linux

Then inserted:

Code: Select all

Le système d'exploitation Puppy Linux est génial

...however, does that still read correctly in French?
or, if not quite correct, is it passable?

Last edited by BarryK on Fri Jan 06, 2023 1:48 am, edited 1 time in total.
User avatar
BologneChe
Posts: 510
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 318 times
Been thanked: 140 times

Re: is this a mistranslation?

Post by BologneChe »

BarryK wrote: Thu Jan 05, 2023 1:25 am

Here is another question.
I figured out a way to force 'trans' to ignore certain text, by using 'base64' to change the string to something untranslatable. Example:

Code: Select all

# echo 'Puppy Linux' | base64 -w 0
UHVwcHkgTGludXgK# 
# trans -b -s en -t fr -j The UHVwcHkgTGludXgK# operating system is great
Le système d'exploitation UHVwcHkgTGludXgK# est génial

Afterward, the base64 string can be converted back:

Code: Select all

# echo 'UHVwcHkgTGludXgK#' | base64 -d -w 0
Puppy Linux

Then inserted:

Code: Select all

Le système d'exploitation Puppy Linux est génial

...however, does that still read correctly in French?
or, if not quite correct, is it passable?

Le système d'exploitation Puppy Linux est génial

The translation is good and consistent in this example!

Born to lose; live to win

User avatar
MochiMoppel
Posts: 1239
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 440 times

Re: is this a mistranslation?

Post by MochiMoppel »

BarryK wrote: Thu Jan 05, 2023 1:25 am

I figured out a way to force 'trans' to ignore certain text, by using 'base64' to change the string to something untranslatable

Hmmm...I figured that enclosing words with capital letters helps in most cases:

Code: Select all

 # txt='The quick brown fox jumps over the lazy dog
> The ZZquickZZ ZZbrownZZ ZZfoxZZ jumps over the lazy dog
> The quick brown ZZfoxZZ jumps over the ZZlazyZZ ZZdogZZ'
# trans   -b -s en -t fr -j -- "$txt" | sed -r 's/ZZ//g'
Le renard brun rapide saute par-dessus le chien paresseux
Le quick brown fox saute par-dessus le chien paresseux
Le fox brun rapide saute par-dessus le lazy dog

I first tried enclosing with XX but this can lead to embarrising translations :oops:

User avatar
BarryK
Posts: 2698
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 739 times

Re: is this a mistranslation?

Post by BarryK »

I discovered that 'base32' is better than 'base64', as the former encodes entirely in capital letters:

Code: Select all

# echo 'Puppy Linux' | busybox base32
KB2XA4DZEBGGS3TVPAFA====# 
# echo 'Puppy Linux' | busybox base64
UHVwcHkgTGludXgK#

Capital letters will ensure that the string is treated as untranslatable.

User avatar
BologneChe
Posts: 510
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 318 times
Been thanked: 140 times

Re: is this a mistranslation?

Post by BologneChe »

BarryK wrote: Thu Jan 05, 2023 12:45 am

Hi guys,
I have been experimenting with 'translate-shell'
What do you think about these two translations:

Code: Select all

# trans -b -s en -t fr -j life\'s but a walking shadow, a poor player
la vie n'est qu'une ombre qui marche, un mauvais joueur
# 
# trans -b -s en -t fr -j life\'s but a walking \"shadow\", a poor player
la vie n'est qu'une "ombre" ambulante, un mauvais joueur

"ambulante" in English means "itinerant", not what is intended!

Note, translate-shell is available here:
https://github.com/soimort/translate-shell

The first translation is correct but the second is not. Not consistent.

Born to lose; live to win

Post Reply

Return to “Pour les francophones”