Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Oct 2019, 09:29
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Development of 'trans_tray' (translation program)
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 7 [104 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7
Author Message
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Fri 13 Sep 2019, 07:54    Post subject:  

Hi Fred

Great job with the layouts and preferences!

When simple keyboard layout selector is open, it is good that another cannot be opened, but when variant layouts opens, you CAN open more (proliferates).

Where is strans?? I thought you would use it in place of main trans window!

Also selecting target language, gui could it be also select to change/stay open?

It's a very comprehensive and well implemented application now.

stemsee
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 4125
Location: holland

PostPosted: Fri 13 Sep 2019, 08:19    Post subject:  

Here's another variant of v5
Only difference is that the keyboard layout list from 'Set keyboard layout' is one large list (variants included) and that every last layout used will be added as the first next time opening the layout GUI, so all recently used will appear on top then.

Fred
trans_tray5b.gz
Description  fake .gz
gz

 Download 
Filename  trans_tray5b.gz 
Filesize  77.47 KB 
Downloaded  37 Time(s) 

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4125
Location: holland

PostPosted: Fri 13 Sep 2019, 08:23    Post subject:  

stemsee wrote:
Where is strans?? I thought you would use it in place of main trans window!


It's when opening "Type or paste text to be translated"

EDIT:
Quote:
When simple keyboard layout selector is open, it is good that another cannot be opened, but when variant layouts opens, you CAN open more (proliferates).

yes, that's a mistake, can be easily fixed, will do later

Will reply more later , have to run now.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Fri 13 Sep 2019, 09:15    Post subject:  

Hi Fred

Also: 'currently $KBLAYOUT' should appear in menu as with select language. or use country flags as the menu icon for keyboard selection option!!!
Code:

clear_all (){
bash -c clearA
bash -c ClearB
}
is sufficient.... Laughing
stemsee

edit: it would be nice if the tooltip showed two more lines; one for translate to language/s and one for keyboard layout.

EDIT2: the variant of version 5 requires that after selecting a language the gui must be closed then that layout appears at the top of the list. Doing this multiple times arranges the layouts in your list.

EDIT3: essential preference to add is font selection. because i have superimposed characters with pt layout.
2019-09-14-124530_1280x800_scrot.png
 Description   
 Filesize   44.02 KB
 Viewed   338 Time(s)

2019-09-14-124530_1280x800_scrot.png

2019-09-14-124247_802x634_scrot.png
Description  accumulative translations, individual clearing
png

 Download 
Filename  2019-09-14-124247_802x634_scrot.png 
Filesize  66.71 KB 
Downloaded  44 Time(s) 
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 4125
Location: holland

PostPosted: Sat 14 Sep 2019, 14:22    Post subject:  

Hi All, new trans_tray v6, changes:
- Fixed bug that the keyboard layout GUI proliferated (only single instance now)
- Double click an item will restart the keyboard layout GUI with selected on top and added reset button (to get back to original list without recently used on top)
- Added font selection for text-info dialogs to Preferences
- Added option "Run at Start up" to menu (start trans_tray at X start)
- Icon tooltip also shows Target languages and Keyboard layout selection now
- Added some more info to the Help

Probably this will be the last version from me (unless there are bugs to be fixed), main reason is that IMO the program is very nice and comprehensive now, and the script is already very big and complicated, so don't want to over-complicate it even more.

@stemsee, many thanks again for your suggestions ! (but we can't go on meeting like this ! Laughing )

EDIT: Bug: once started from /root/Startup symlink after restarting X or reboot, toggle "Run at Start up" didn't work well.
Fixed, re-attached trans_tray6

Fred
trans_tray6.gz
Description  See EDIT above, fixed trans_tray6, fake .gz
gz

 Download 
Filename  trans_tray6.gz 
Filesize  85.74 KB 
Downloaded  51 Time(s) 
2019-09-14-201553_937x462_scrot_787x388.jpg
 Description   
 Filesize   68.19 KB
 Viewed   328 Time(s)

2019-09-14-201553_937x462_scrot_787x388.jpg


_________________
Dog Linux website
Tinylinux blog by wiak

Last edited by fredx181 on Sat 14 Sep 2019, 17:37; edited 1 time in total
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Sat 14 Sep 2019, 15:25    Post subject:  

fredx181 wrote:

Probably this will be the last version from me (unless there are bugs to be fixed), main reason is that IMO the program is very nice and comprehensive now, and the script is already very big and complicated, so don't want to over-complicate it even more.
It's already surpassed expectations.
Quote:

@stemsee, many thanks again for your suggestions ! (but we can't go on meeting like this ! Laughing )

Fred
Agreed! The trans affair is over Laughing
Back to top
View user's profile Send private message MSN Messenger 
fredx181


Joined: 11 Dec 2013
Posts: 4125
Location: holland

PostPosted: Sat 14 Sep 2019, 17:41    Post subject:  

Found a small bug Confused , fixed, see EDIT and new attachment here:
http://murga-linux.com/puppy/viewtopic.php?p=1037014#1037014

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Sat 14 Sep 2019, 17:51    Post subject:  

Hi all

I have customised my version a little.

The dialogue mode has a button to activate a virtual keyboard....xvkbd (touchscreen use).

I have the print option working on the floating menu.

I am exploring yad options --enable-spell and --spell-lang for text fields.
2019-09-14-223810_200x120_scrot.png
 Description   
 Filesize   5.23 KB
 Viewed   282 Time(s)

2019-09-14-223810_200x120_scrot.png

2019-09-14-223835_802x634_scrot.png
Description 
png

 Download 
Filename  2019-09-14-223835_802x634_scrot.png 
Filesize  54.42 KB 
Downloaded  56 Time(s) 
2019-09-14-223843_702x634_scrot.png
 Description   
 Filesize   53.48 KB
 Viewed   282 Time(s)

2019-09-14-223843_702x634_scrot.png

Back to top
View user's profile Send private message MSN Messenger 
step

Joined: 04 May 2012
Posts: 1214

PostPosted: Sat 14 Sep 2019, 18:32    Post subject:  

Thank you very much, fredx181 and stemsee! I don't understand how to set the two source languages for dialog mode. I mean, if I'm talking to someone in Portuguese, I would want to set side A en -> pt and side B pt -> en, right? How would I do that - having two different source languages at once? Or did I misunderstand the purpose of dialogue mode?
_________________
Fatdog64-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Sun 15 Sep 2019, 02:16    Post subject:  

Hi step

you can copy and paste into either input in any language, because google/bing/yandex autodetects input language. That's why only target languages are set.

There is the keyboard layout selection gui if you want to type in another language, you may have to install additional fonts and input methods.

stemsee
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2499
Location: In The Way

PostPosted: Thu 19 Sep 2019, 11:16    Post subject:  

technosaurus wrote:
Where is the microphone icon for input / text?
Pocket Sphinx
and the speaker icon for translation?
Espeak or Flite

I had a thread with pocket sphinx continuous and associated bash helpers, but the binary itself got lost when the forum lowered the limit on file size.

Fred's experiments with sound seemed to prove the facility is too limited.

Have you any code to test/implement?
Back to top
View user's profile Send private message MSN Messenger 
technosaurus


Joined: 18 May 2008
Posts: 4869
Location: Blue Springs, MO

PostPosted: Fri 20 Sep 2019, 01:00    Post subject:  

stemsee wrote:
technosaurus wrote:
Where is the microphone icon for input / text?
Pocket Sphinx
and the speaker icon for translation?
Espeak or Flite

I had a thread with pocket sphinx continuous and associated bash helpers, but the binary itself got lost when the forum lowered the limit on file size.

Fred's experiments with sound seemed to prove the facility is too limited.

Have you any code to test/implement?

I'm too exhausted to put together functional code, but here are the links to the building blocks of it:
http://www.murga-linux.com/puppy/viewtopic.php?p=729912#729912
http://www.murga-linux.com/puppy/viewtopic.php?p=731247#731247
http://murga-linux.com/puppy/viewtopic.php?p=583998#583998

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 4125
Location: holland

PostPosted: Sun 22 Sep 2019, 06:26    Post subject:  

Hi All, posted in Additional Software (PETs, n' stuff) » Utilities a .pet package based on above v6 (small addition is "first run" message).
http://murga-linux.com/puppy/viewtopic.php?p=1037573#1037573

If there's any more development going on here, I'll update the pet accordingly.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1214

PostPosted: Sat 19 Oct 2019, 15:33    Post subject:  

Hi,
I started trans_tray from a terminal, right-clicked the icon and selected "Type or paste text to be translated". The terminal printed this error message:
Code:

yad: wrong boolean value ''

I suppose it's nothing to worry about, but I wanted you to know.

Output from bash -vx trans_tray to give you some context for the error message.
Code:

+ POPUP_TEXT='Left-click for Trans-Paste\nRight-click for Menu'
echo tooltip:"$POPUP_TEXT \nTarget language(s): $TGTLANG \nKeyboard layout: $KBL" 2> /dev/null >&3
+ echo 'tooltip:Left-click for Trans-Paste\nRight-click for Menu \nTarget language(s): English \nKeyboard layout: us,it'

yad --notification --kill-parent --listen \
--image="$ICON" \
--no-middle \
--text-align=center --icon-size=22 \
--command="bash -c trans_paste" <&3
+ yad --notification --kill-parent --listen --image=/root/.trans_tray/icons/google.svg --no-middle --text-align=center --icon-size=22 '--command=bash -c trans_paste'
yad: wrong boolean value ''

_________________
Fatdog64-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 7 [104 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0603s ][ Queries: 12 (0.0104s) ][ GZIP on ]