Page 1 of 1

Gettext of shutdownconfig (woof-ce)

Posted: Wed 18 Feb 2015, 16:50
by ASRI éducation
Hello,

I can not completely translate the script /usr/sbin/shutdownconfig (woof-ce testing Commits on Nov 8, 2014) in french language.
- Translation causes errors when I use single quotes ' (this is often necessary in French).
- A part gettext is not functional.

I dare not change the script, because I do not fully understand its focntionnement.
I can just signal that would be necessary that a contributor (more competent than me) tries to improve the situation.

Exemple
Actual script (gettext non functional) - Line 172

Code: Select all

$(eval_gettext "or \Zb${T_cd}\ZB button to save your session back to the CD/DVD..." )"
New script (gettext functional)

Code: Select all

$(eval_gettext 'or \Zb${T_cd}\ZB button to save your session back to the CD/DVD...')"
Other parts (gettext non functional)

Code: Select all

T_sanitext="`eval_gettext \"\Zb\Z1FINAL SANITY CHECK:\Zn\ZB
Partition you are saving to:      \Zb\\\${SAVEPART}\ZB
The filesystem of \\\${SAVEPART} partition: \Zb\\\${SAVEFS}\ZB
Name of the save file:            \Zb\\\${NAMEONLY}\ZB
Path (folder) of the save file:   \Zb\\\${SAVEPATH}\ZB
Size of save file:                \Zb\\\${SIZEPFILE}KB (\\\${AAAMB}MB)\ZB
Filesystem inside save file:      \Zb\\\${SFFS}\ZB
If they definitely look right, choose \Zb\\\${T_saniyes}\ZB button...
Looks ok, but you want to change the folder, choose \Zb\\\${T_sanichange}\ZB...
If anything looks wrong, choose \Zb\\\${T_notsave}\ZB...\"`"

Code: Select all

T_sanitext="`eval_gettext \"\Zb\Z1FINAL SANITY CHECK:\Zn\ZB
Partition you are saving to:      \Zb\\\${SAVEPART}\ZB
The filesystem of \\\${SAVEPART} partition: \Zb\\\${SAVEFS}\ZB
Path (folder) of the pupsave:   \Zb\\\${SAVEPATH}/${NAMEONLY}\ZB
If they definitely look right, choose \Zb\\\${T_saniyes}\ZB button...
Looks ok, but you want to change the folder, choose \Zb\\\${T_sanichange}\ZB...
If anything looks wrong, choose \Zb\\\${T_notsave}\ZB...\"`"
Other translators have they contate the same problems?
Regards

Posted: Wed 18 Feb 2015, 19:11
by don570
When I was testing eval_gettext in the programming section of the forum
I found that the curly brackets was giving eval_gettext problems.

The solution was to define another variable before I had to use the
eval_gettext script.

So I would try

Code: Select all

MYVARIABLE=${T_cd}
...
...
...
$(eval_gettext "or \Zb$MYVARIABLE\ZB button to save your session back to the CD/DVD..." )"


_________________________________________

Re: Gettext of shutdownconfig (woof-ce)

Posted: Fri 27 Feb 2015, 12:39
by L18L
ASRI éducation wrote:I dare not change the script
7 lines is a bit too long for one gettext. So I have been changing your

Code: Select all

T_sanitext="`eval_gettext "\Zb\Z1FINAL SANITY CHECK:\Zn\ZB
Partition you are saving to:      \Zb\\\${SAVEPART}\ZB
The filesystem of \\\${SAVEPART} partition: \Zb\\\${SAVEFS}\ZB
Path (folder) of the pupsave:   \Zb\\\${SAVEPATH}/${NAMEONLY}\ZB
If they definitely look right, choose \Zb\\\${T_saniyes}\ZB button...
Looks ok, but you want to change the folder, choose \Zb\\\${T_sanichange}\ZB...
If anything looks wrong, choose \Zb\\\${T_notsave}\ZB..."`"	
to

Code: Select all

T_sanitext="\Zb\Z1$(gettext 'FINAL SANITY CHECK:')\Zn\ZB 
$(gettext 'Partition you are saving to: ')     \Zb${SAVEPART}\ZB 
$(eval_gettext 'The filesystem of ${SAVEPART} partition: ')\Zb${SAVEFS}\ZB 
$(gettext 'Path (folder) of the pupsave: ')  \Zb${SAVEPATH}/${NAMEONLY}\ZB 
$(eval_gettext 'If they definitely look right, choose \Zb$T_saniyes\ZB button...')
$(eval_gettext 'Looks ok, but you want to change the folder, choose \Zb$T_sanichange\ZB...')
$(eval_gettext 'If anything looks wrong, choose \Zb${T_notsave}\ZB...')"
... no problem.