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 Sun 18 Nov 2018, 01:33
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Xdialog strange behavior [SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
Argolance


Joined: 06 Jan 2008
Posts: 3457
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 25 Aug 2018, 13:20    Post subject:  Xdialog strange behavior [SOLVED]  

Bonsoir,
Code:
#!/bin/sh

export TEXTDOMAIN=yapi_test
export OUTPUT_CHARSET=UTF-8

 MSG1="$(gettext 'YaPI (Yet another Puppy Installer) supports 3 alternative installation types and mounts your drives seeking every installable Pup iso:')"
 MSG2="$(gettext '(1) FRUGAL*****
   The files vmlinuz, initrd.gz and pup_xxx.sfs (plus, as needed, sfs files starting with an a, f, y, or z) are copied to a chosen partition.
   This partition will retain, undisturbed, all existing information currently held in the form of directories and files.
   This can be any type of partition, for example: MSDOS, Windows (FAT, NTFS) or Linux (EXT2, EXT3, EXT4 or REISERFS).
   THIS IS RECOMMENDED AS THE BEST OPTION for most users. IT IS ALSO THE SAFEST as with this method nothing is overwritten.')\n\n
 $(gettext 'or, (2) SUPERFLOPPY (simple but destructive without care and needs a special process if wanting to return the drive to normal use)
   Wnich takes over the entire storage device. It has neither MBR, master boot record, nor PARTITIONS and only a SINGLE file system.
   It uses part of the storage device space for its frugal installation and the remaining space is used for data storage.')"
 MSG3="$(gettext 'or, (3) FULL (may also be destructive if there is any mistake in the drive chosen for installation, either before or during the process)
   A full installation, taking over an entire partition. This is the traditional Linux hard drive installation.
   It requires the partition to have a Linux filesystem (EXT2, EXT3, EXT4 or REISERFS).')"
 MSG4="$(gettext 'THE TYPE OF DEVICE (hard drive, USB flash drive, etc.), partition format, will also determine what type of install(s) may be offered.
   Some devices cannot accept all three types of installion. So,
   the installer will automatically offer to select any of the alternative installations which are actually available to you.')"
 MSG5="$(gettext 'TO BOOT Puppy:
   Depending upon the device(s) available and how Puppy is installed.
   It may be also necessary to install a boot loader or to amend one if there is enough space left to add yet another FRUGAL Pup.')"
 MSG6="$(gettext 'However, you will get full advice on implementing all your available options as you use YaPI.')"

Xdialog --left --msgbox "$MSG1\n\n $MSG2\n\n $MSG3\n\n $MSG4\n\n $MSG5\n\n $MSG6" 0 0

English script works fine.
I built a mo file (using poeditor) and the last paragraph is truncated if I shorten the first line I can lengthen the last line. Also vice versa. Shocked
Any idea?
Thanks.
Cordialement.
French_pot_po_mo.tar.gz
Description 
gz

 Download 
Filename  French_pot_po_mo.tar.gz 
Filesize  8.57 KB 
Downloaded  28 Time(s) 

_________________


Last edited by Argolance on Fri 31 Aug 2018, 18:14; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 5175
Location: Ontario

PostPosted: Sat 25 Aug 2018, 14:41    Post subject:  

Xdialog has a limit to number of characters it will accept in a box.
I once came across this problem Rolling Eyes

Translations from English to a foreign language typically require a few
more characters. You seem to be right on the limit.

I would try reducing the size of translation. Leave out articles (le la) and punctuation.
_______________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5175
Location: Ontario

PostPosted: Mon 27 Aug 2018, 19:43    Post subject:  

I did a check and it is possible to add more characters by adding an extra
option to Xdialog

Quote:
Xdialog --left --backtitle "\n$(gettext 'Conversion factor\nUnit A to Unit B')" --msgbox "$MSG1\n\n $MSG2\n\n $MSG3\n\n $MSG4\n\n $MSG5\n\n $MSG6" 0 0


Using the 'backtitle' option more lines are possible.
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3457
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 28 Aug 2018, 13:04    Post subject:  

Bonsoir,
don570 wrote:
Using the 'backtitle' option more lines are possible.

Thanks for the trick!
I solved this problem by using yad which has another strange behavior: text is wrapped by default and the no-wrapp option doesn't seem to work or exist... It still offers many more possibilities especially for text formatting!

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
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.0484s ][ Queries: 13 (0.0056s) ][ GZIP on ]