translate-shell
translate-shell copied to clipboard
output not fully showing in termux
when translate a bunch of words it happen
- You need to put quotes around the text to be translated.
- Please post the output of
trans -V
.
``u0_a96@localhost:~$ trans -V Translate Shell 0.9.6.12-release
platform Linux terminal type xterm-256color bi-di emulator [N/A] gawk (GNU Awk) 5.0.1 fribidi (GNU FriBidi) 1.0.7 audio player mpv --no-config terminal pager less web browser xdg-open user locale en_US.UTF-8 (English) home language en source language auto target language en translation engine google proxy [NONE] user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 ip version [DEFAULT] theme default init file [NONE]
Report bugs to: https://github.com/soimort/translate-shell/issues``
Does it happen only for Arabic (right-to-left), or for other languages (left-to-right) on Termux as well?
yeah only with Arabic
Interesting. I guess this has something to do with Termux's RTL language support.
Could you execute the following echo command to see if it shows the full output in termux?
$ echo 'ا الذي يميز الجليد الذي يجعله يطفو؟ صدق أو لا تصدق ، الجليد أقل كثافة بنسبة 9٪ من الماء. نظرًا لأن الماء أثقل ، فإنه يزيح الجليد الخفيف ، مما يتسبب في تطفو الجليد إلى الأعلى.'
yeah
lhost:~$ echo 'ا الذي يميز الجليد الذي يجعله يطفو؟ صدق أو لا تصدق ، الجليد أقل كثافة بنسبة 9٪ من الماء. نظرًا لأن الماء أثقل ، فإنه يزيح الجليد الخفيف ، مما يتسبب في تطفو الجليد إلى الأعلى.'
ا الذي يميز الجليد الذي يجعله يطفو؟ صدق أو لا تصدق ، الجليد أقل كثافة بنسبة 9٪ من الماء. نظرًا لأن الماء أثقل ، فإنه يزيح الجليد الخفيف ، مما يتسبب في تطفو الجليد إلى الأعلى.
u0_a96@localhost:~$
Thank you for reporting this. It seems that the same issue can be observed from a regular Linux terminal, not just termux -- I'll look into it.
fribidi probably?
It is same in gnome terminal. It was working for few words and then suddenly blank.
for engine in google bing yandex apertium aspell spell hunspell; do echo "$engine"; trans -f en -t ja -e $engine -no-init -verbose "just testing"; done google
bing just testing
テストだけ (test dake)
[ English -> 日本語 ]
yandex [ERROR] Oops! Something went wrong and I can't translate it for you :( apertium just testing
[ English -> 日本語 ] aspell just testing spell just testing hunspell [ERROR] Spell checker (hunspell) not found.
trans -V Translate Shell 0.9.6.12
platform Linux terminal type xterm-256color bi-di emulator [N/A] gawk (GNU Awk) 5.1.0 fribidi (GNU FriBidi) 1.0.8 audio player mplayer terminal pager less web browser xdg-open user locale de_DE.UTF-8 (German) home language de source language auto target language de translation engine google proxy [NONE] user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 ip version [DEFAULT] theme default init file [NONE]
Report bugs to: https://github.com/soimort/translate-shell/issues
It is same in gnome terminal. It was working for few words and then suddenly blank.
@pankaj4u4m This issue is particularly about the right-to-left language support of translate-shell. Your problem with Yandex involves another known issue #359, and that your IP is probably banned by Google/Bing's server due to frequent requests.
Same issue here: the output gets truncated when translating to Arabic. If I select a bigger width with the command-line parameter, I can get additional output. But I still get almost half the text that Google Translate produces.
It seems translation is correct if before translating the file I replace all "." in the file with ".\n". It seems it is multi-line paragraphs what is getting truncated.
Update: just using "-no-bidi" fixes all the issues. No need to split paragraphs.
You need bidi to correct the Arabic text in termux without it text will appear like
Apologies, I am testing only the file output, with the -b option.