Programs and scripts that are not yet internationalized

For efforts in internationalising Puppy and solving problems in this area
Message
Author
robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#21 Post by robwoj44 »

Secure telnet internationalized

/usr/sbin/securetelnetshell

Code: Select all

#!/bin/sh
#frontend for ssh, secure telnet.
#(c) Barry Kauler 2004 
#2007 Lesser GPL licence v2 (refer: /usr/share/doc/legal)
#120331 fix help url.
#130515 gettexted by robwoj44

export TEXTDOMAIN=securetelnetshell
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8
. gettext.sh

[ -f /etc/securetelnetrc ] && . /etc/securetelnetrc
HDRMSG="$(gettext '#Configuration file for secure telnet. See Network menu.')"

while [ 1 ]
do

RETSTR=`Xdialog --wmclass "securetelnet" --title "$(gettext 'Secure telnet')" --stdout --left --separator "|" --help "" --3inputsbox "$(gettext 'ssh can be used for secure remote login,\ninvoked with the format:\n ssh -l username -p port hostname\nI suggest try port 22, if not known.')" 0 0 "$(gettext 'Hostname:')" "$SSHHOSTNAME" "$(gettext 'Port:')" "$SSHPORT" "$(gettext 'Username:')" "$SSHUSERNAME"`

RETVAL=$?
case $RETVAL in
 0) #ok
  RETHOSTNAME=`echo -n "$RETSTR" | cut -f 1 -d "|"`
  RETPORT=`echo -n "$RETSTR" | cut -f 2 -d "|"`
  RETUSERNAME=`echo -n "$RETSTR" | cut -f 3 -d "|"`
   echo "$HDRMSG" > /etc/securetelnetrc
   echo "SSHHOSTNAME=\"${RETHOSTNAME}\"" >> /etc/securetelnetrc
   echo "SSHPORT=\"${RETPORT}\"" >> /etc/securetelnetrc
   echo "SSHUSERNAME=\"${RETUSERNAME}\"" >> /etc/securetelnetrc

    echo '#!/bin/sh' > /tmp/runssh.sh
    echo -e "ssh -l $RETUSERNAME -p $RETPORT $RETHOSTNAME 2>/tmp/scratch1.txt" >> /tmp/runssh.sh
    echo 'if [ ! $? -eq 0 ];then' >> /tmp/runssh.sh
    echo -e "ERRSTR=\"\`cat /tmp/scratch1.txt\`\"" >> /tmp/runssh.sh
    echo -en "Xdialog --wmclass \"securetelnet\" --title \"$(gettext 'Secure telnet')\" --infobox \"$(gettext 'Failed to execute:')" >> /tmp/runssh.sh
    echo -n '\n' >> /tmp/runssh.sh
    echo -n " ssh -l $RETUSERNAME -p $RETPORT $RETHOSTNAME" >> /tmp/runssh.sh
    echo -n '\n' >> /tmp/runssh.sh
    echo -n "$(gettext 'ssh error message:')" >> /tmp/runssh.sh
    echo -n '\n' >> /tmp/runssh.sh
    echo '$ERRSTR" 0 0 40000' >> /tmp/runssh.sh
    echo 'fi' >> /tmp/runssh.sh
    sync
    chmod 755 /tmp/runssh.sh

  rxvt -bg "#ff80e0" -name "$(gettext 'securetelnet')" -title "$(gettext 'Secure telnet')" -e "/tmp/runssh.sh"
  break
  ;;
 1) #cancel
  break
  ;;
 2) #help
  #defaulthtmlviewer file:///usr/share/doc/ssh.htm &
  defaultbrowser http://linux.die.net/man/1/ssh &
  ;;
 *)
  break
  ;;
esac


done

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#22 Post by robwoj44 »

PureFTPd

/usr/sbin/run-pureftpd

Code: Select all

#!/bin/sh

#Add to /etc/rc.d/rc.local for auto startup: pure-ftpd -EbBADHk 90
#130515 gettexted by robwoj44

. gettext.sh
export TEXTDOMAIN=run-pureftpd
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8

if [ "$(ps | grep $(cat /var/run/pure-ftpd.pid) | grep pure-ftpd)" != "" ] ; then

Xdialog --wmclass "pure-ftpd" --title "$(gettext 'Start/Stop PureFTPD')" --stdout --ok-label "$(gettext 'Stop Server')" --cancel-label "$(gettext 'Cancel')" --yesno "$(gettext 'Pure-FTPD is running. \n Would you like to stop the server?')" 0 0

 if  [ "$?" = "1" ] ;then  
 exit
 fi
 kill -9 $(cat /var/run/pure-ftpd.pid)
 exit
fi
vMsgH=15 ; vMsg=''
	vMsgW=40
	cfg=`Xdialog --title "$vServerTitle Start/Stop Pure-FTPD." \
			--backtitle "$(gettext 'Pure-ftpd is currently not Running.')" \
			--left --separator \  \
			--ok-label "$(gettext 'Start Pure-ftpd')" \
			--checklist " " \
		15 85 4 \
		'-u 1' "$(gettext 'Prevent user root connections.')" off \
		'-E' "$(gettext 'Prevent anonymous connections.')" on \
		2>&1 || echo .`
	[ "$cfg" == "." ] && exit
		
pure-ftpd -bBADHk 90 $cfg
 
Xdialog --wmclass "pure-ftpd" --title "$(gettext 'Start/Stop PureFTPD')" --stdout --ok-label "$(gettext 'OK')" --infobox "$(gettext 'Pure-ftpd is started. \n If you allowed anonymous connections, web browsers will connect as user ftp. \n User ftp's home directory is at /root/ftpd. \n If you allowed root logins you should set a root password. \n To set a password for root, open a terminal and type passwd. \n To stop the server run this script again.')" 0 0 90000

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#23 Post by robwoj44 »

Thanks to the example of pwallpaer (i18n by L18L) I internationalized gpptp.
/usr/sbin/gpptp
Attachments
gpptp-0.2.tar.gz
gpptp with gpptp.pot
(8.93 KiB) Downloaded 672 times

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#24 Post by vicmz »

Pwsget

/usr/sbin/pwsget

Code: Select all

#! /bin/bash

# Pwget created by Lobster with thanks to Zigbert and Pwsget additions by gposil
# for Puppy Dingo and Linux Tmxxine
# Jan 2008 GPL v3 License
# http://tmxxine.com
# 20130515 internationalized (vicmz)

export TEXTDOMAIN=pwsget
export OUTPUT_CHARSET=UTF-8

LOGIN=""

export Pwget='
<window title="'$(gettext 'Pwget - File downloader utility')'" resizable="false">
<vbox>
 <frame>
  <text><label>'$(gettext 'Copy and Paste URL location of required file into "Address". Add destination and click "OK". If the site requires it, you can enter "Login" and "Password"')'.</label></text>
 </frame>
 <hbox>
 <text><label>'$(gettext 'Login:       ')'</label></text>
 <entry><variable>LOGIN</variable></entry></hbox>
 <hbox>
 <text><label>'$(gettext 'Password:')'</label></text>
 <entry><variable>PWORD</variable></entry></hbox>
 <hbox>
  <text><label>'$(gettext 'Address:  ')'</label></text>
  <entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
 </hbox>
 <hbox>
  <text><label>'$(gettext 'Dest Dir:  ')'</label></text>
  <entry accept="directory"><variable>DEST</variable><input>/tmp/pm_mirror_dir</input></entry>
  <button>
   <input file icon="gtk-open"></input>
   <action type="fileselect">DEST</action>
   <action>refresh:DEST</action>
  </button>
 </hbox>
 <hbox>
  <button help>
   <action>`Xdialog --wrap --screencenter --left --title "'$(gettext 'Pwget - HELP')'" --msgbox "'$(gettext 'Pwget is a simple front end to the wget utility. Wget is used for downloading larger files from the internet such as ISOs. The files are verified during the download procedure. As ISO and other files are checked and downloads resumed, they do not require a md5sum check. Copy and paste the source file you wish to download. Use the file selector to choose the destination. \n\n Lobster, Jan 2008')'" 600x0`</action>
  </button>
  <button cancel></button>
  <text><label>'$(gettext 'Download')'</label></text>
  <button ok></button>
 </hbox>
</vbox>
</window>'

I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 --program=Pwget --center ); do
   eval $STATEMENTS
done
IFS=$I
if [ $EXIT = OK ]; then
  if [ -z $LOGIN ]; then
  rxvt -name Xwget -bg black -fg yellow -e wget -c -P "$DEST" $SOURCE
  rox -d "$DEST"
  fi
  if [ -n $LOGIN ]; then
  rxvt -name Xwget -bg black -fg yellow -e wget -c --http-user=$LOGIN --http-password=$PWORD --ftp-user=$LOGIN --ftp-password=$PWORD -P "$DEST" $SOURCE
  rox -d "$DEST"
  fi
fi 
Attachments
image-4.png
pwsget - es
(22.72 KiB) Downloaded 789 times
Last edited by vicmz on Wed 15 May 2013, 19:56, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs and scripts that are not yet internationalized

#25 Post by L18L »

found this one:
/usr/sbin/pplog_gui wrote:#! /bin/sh
#(c) Barry Kauler July 2008, licence: GPL2
# i18n Apr 2013

. gettext.sh
export TEXTDOMAIN=pplog_gui
export OUTPUT_CHARSET=UTF-8
TITLE="$(gettext 'PPLOG personal blog')"
BUTTON_START="$(gettext 'START')"
BUTTON_STOP="$(gettext 'STOP')"
BUTTON_EXIT="$(gettext 'EXIT')"
BUTTON_PPLOG="$(gettext 'PPLOG')"

PSSTATUS="`ps`"
if [ "`echo "$PSSTATUS" | grep ' hiawatha'`" = "" ];then
xmessage -center -bg '#ffc0c0' -buttons START:10,EXIT:11 -title "${TITLE}" "$(eval_gettext '${TITLE} requires the Hiawatha web server to be running.')
$(eval_gettext 'Click the ${BUTTON_START} button to do this, otherwise click ${BUTTON_EXIT} to abort.')"
[ $? -ne 10 ] && exit

echo '' > /tmp/hiawatha_error
hiawatha 2>/tmp/hiawatha_error

if [ $? -ne 0 ];then
ERRMSG="`cat /tmp/hiawatha_error`"
xmessage -center -bg 'red' -buttons EXIT:10 -title "${TITLE}" "$(gettext 'There was an error when attempting to start Hiawatha, this error message:')

${ERRMSG}

$(eval_gettext 'Click ${BUTTON_EXIT} button to quit:')"
exit
fi
fi

xmessage -center -bg 'orange' -buttons ${BUTTON_PPLOG}:10,${BUTTON_STOP}:11,${BUTTON_EXIT}:12 -title "${TITLE}" "
$(eval_gettext 'Click the ${BUTTON_PPLOG} button to run the ${TITLE}.

The Hiawatha web server is currently running, which is required for PPLOG.
If you want to stop the server and exit, click the ${BUTTON_STOP} button.

To just quit, click the ${BUTTON_EXIT} button:')"

case $? in
10)
exec defaulthtmlviewer http://127.0.0.1:80/blog/pup_pplog.pl
;;
11)
hiawatha.run stop
exit
;;
*)
exit
;;
esac

###END###
:D

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#26 Post by robwoj44 »

I updated the list in the first post

/usr/sbin/Floppy_Formatter

Code: Select all

#! /bin/bash
#USB Floppy Formatter GUI by 8-bit Sept. 12, 2009
#Modified Oct. 19,2009  Very little error checking done. Can it be implemented without external programs?
#Written with the idea someone might get some use out of it.
#Consider this program to be open source to modify as you wish.
#130515 robwoj44 internationalized

. gettext.sh
export TEXTDOMAIN=Floppy_Formatter
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8

llfloppy()
{
#gxmessage -center -name     Floppy_Formatter "Insert writable unmounted floppy in drive."


ERR0=1
while [ ! $ERR0 -eq 0 ];do
  xmessage -center -name     Floppy_Formatter "$(gettext 'Please wait...Low-level formatting disk ')" &
 if [ $CBOX3 = "true" ];then
  ufiformat -f $COMBO1 $WORD1
 else
  if [ $CBOX4 = "true" ];then
	fdformat /dev/fd0u$COMBO1
 else
  if [ $CBOX5 = "true" ];then
    fdformat /dev/fd1 $COMBO1

	gxmessage -center -name     Floppy_Formatter "$(gettext 'No internal floppy drive found.')"
	return
  fi
 fi
 fi
 ERR0=$?
 killall xmessage
 if [ ! $ERR0 -eq 0 ];then
  xmessage -bg "#ffe0e0" -name "$gettext 'loformat')" -title "$(gettext  '  Lo-level Formatter')" -center \
  -buttons "$(gettext 'Try again')":20,"$(gettext 'MENU')":10 -file -<<XMSG
$(gettext 'ERROR low-level formatting disk.
Is the write-protect tab closed?')
XMSG

  AN0=$?
  if [ $AN0 -eq 10 ];then
   ERR0=0
  fi
  if [ $AN0 -eq 0 ];then
   ERR0=0
  fi
  if [ $AN0 -eq 1 ];then
   ERR0=0
  fi
 else
   gxmessage -center -name     Floppy_Formatter  "$(gettext 'Formatting of disk is finished. ')"
 fi
done
return
}
dosfloppy()
{
#gxmessage -center -name     Floppy_Formatter "Insert writable unmounted floppy in drive."
ERR0=1
while [ ! $ERR0 -eq 0 ];do
  if [ $CBOX3 = "true" ];then
    xmessage -center -name     Floppy_Formatter "$(gettext 'Please wait...making dos filesystem. And checking for errors ')" &
    $CBOX2 $WORD1 $COMBO1
  else
    if [ $CBOX4 = "true" ];then
      xmessage -center -name     Floppy_Formatter "$(gettext 'Please wait...making dos filesystem. And checking for errors ')" &
      $CBOX2 /dev/fd0 $COMBO1
  else
    if [ $CBOX5 = "true" ];then
      xmessage -center -name     Floppy_Formatter "$(gettext 'Please wait...making dos filesystem. And checking for errors')" &
  fi
  fi
 fi
 ERR0=$?
 killall xmessage
 if [ ! $ERR0 -eq 0 ];then
#gxmessage -center -name USB_Floppy_Formatter "Error is "$ERR0""
  xmessage -bg "#ffe0e0" -name "$(gettext 'loformat')" -title "$(gettext  '  Lo-level Formatter')" -center \
  -buttons "$(gettext 'Try again')":30,"$(gettext 'MENU')":10 -file -<<XMSG
$(gettext 'ERROR making DOS filesystem.
Is the write-protect tab closed?
If this is second try, Floppy
has bad sectors. Low level format
or replace floppy!')
XMSG

  AN0=$?
  if [ $AN0 -eq 10 ];then
   ERR0=0
  fi
  if [ $AN0 -eq 0 ];then
   ERR0=0
  fi
  if [ $AN0 -eq 1 ];then
   ERR0=0
  fi
 else
   gxmessage -center -name     Floppy_Formatter  "$(gettext 'Making dos filesystem is finished. ')"
 fi
done
return
}
top_menu()
{
 export CHOOSER="
<window title=\"$(gettext  '  Floppy Formatter  ')\"icon-name=\"gtk-floppy\">
<vbox>
<frame          $(gettext  ' Choose type of floppy drive ')            >
<hbox>
     <checkbox>
      <label>$(gettext 'USB floppy Drive ')                                 </label>
      <variable>CBOX3</variable>
      <default>false</default>
    </checkbox>

</hbox>
<hbox>
    <checkbox>
      <label>$(gettext 'Internal floppy drive 0 ')                         </label>
      <variable>CBOX4</variable>
      <default>false</default>
    </checkbox>
</hbox>
<hbox>
    <checkbox>
      <label>$(gettext 'Internal floppy drive 1 ')                         </label>
      <variable>CBOX5</variable>
      <default>false</default>
    </checkbox>
</hbox>
 </frame>
 
  <frame $(gettext 'choose size of floppy:')>
    <combobox>
     <variable>COMBO1</variable>
      <item>1440</item>
      <item>720</item>
    </combobox>   
</frame>
<frame $(gettext 'choose Options:') >
<hbox>
     <checkbox>
      <label>$(gettext 'Low level format ')                               </label>
      <variable>CBOX1</variable>
      <default>false</default>
    </checkbox>

</hbox>
<hbox>
    <checkbox>
      <label>$(gettext 'MSDOS file system. ')                           </label>
      <variable>CBOX2</variable>
      <default>false</default>
    </checkbox>
</hbox>
 </frame>

<hbox>
  <button>
   <input file icon=\"gtk-ok\"></input>
        <label>$(gettext 'OK')</label>
        <action type=\"exit\">EXIT_OK</action>
   </button>
   <button>
   <input file icon=\"gtk-quit\"></input>
        <label>$(gettext 'QUIT')</label>
        <action type=\"exit\">EXIT_NOW</action>
      </button>
</hbox>
</vbox>
</window>
"

CHOOSER2==`gtkdialog3 --program=CHOOSER --center`

if [ "`echo $CHOOSER2 | grep EXIT_NOW`" != "" ]; then
 exit 0
fi

#Get all of the variables
CBOX1="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep CBOX1 | sed 's/CBOX1//'`"
CBOX2="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep CBOX2 | sed 's/CBOX2//'`"
CBOX3="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep CBOX3 | sed 's/CBOX3//'`"
CBOX4="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep CBOX4 | sed 's/CBOX4//'`"
CBOX5="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep CBOX5 | sed 's/CBOX5//'`"
COMBO1="`echo "$CHOOSER2" | sed 's/\"//g' | sed 's/=//g' | grep COMBO1 | sed 's/COMBO1//'`"
if [ $CBOX3 = "true" ];then
 #Added Test for presence of USB floppy drive
 FLOP="`ufiformat -i`"
 WORD1="`echo $FLOP | cut -f 3 -d ' '`"
 if  [ -z $WORD1 ];then
   gxmessage -center -name USB_Floppy_Formatter "$(gettext ' No USB Drive Found ')            "
   top_menu
 fi
#End of added test
fi
if [ $CBOX4 = "true" ];then
 IN="`which /root/.pup_event/drive_fd0/AppRun`"
 echo $IN
 if [ -z $IN ];then
   gxmessage -center -name Floppy_Formatter "$(gettext 'No internal floppy drive found ')   "
   top_menu
 fi
fi
if [ $CBOX5 = "true" ];then
 IN="`which /root/.pup_event/drive_fd1/AppRun`"
 echo $IN
 if [ -z $IN ];then
   gxmessage -center -name Floppy_Formatter "$(gettext 'No internal floppy drive found ')   "
   top_menu
 fi
fi



if [ $CBOX3 = "false" ] && [ $CBOX4 = "false" ] && [ $CBOX5 = "false" ];then
   gxmessage -center -name USB_Floppy_Formatter "$(gettext ' Error-No drive type selected! ') "
   top_menu
else
  if [ $CBOX1 = "false" ] && [ $CBOX2 = "false" ];then
   gxmessage -center -name USB_Floppy_Formatter "$(gettext ' Error-No Options selected! ')    "
   top_menu
else
  if [ $CBOX1 = "true" ];then
   llfloppy
    #rxvt +sb -bg green -geometry 80x4 -e $CBOX1 $COMBO1 $WORD1
  else
    CBOX1="" #setting it back to "null" allows us to pass all parameters without doing more "if thens"
  fi
fi
fi
if [ $CBOX2 = "true" ];then
    CBOX2="mkfs.msdos -v -c -I "
  dosfloppy
 #rxvt +sb -bg green -geometry 80x4 -e $CBOX2 $WORD1
else
 CBOX2="" #setting it back to "null" allows us to pass all parameters without doing more "if thens"
fi

unset CHOOSER
top_menu
}
top_menu

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs and scripts that are not yet internationalized

#27 Post by L18L »

robwoj44 wrote:I updated the list in the first post
Thank you.

Just one note,
the configuration for grub is now
legacy grub config 2013
internationalized by the developer rcsn51 himself.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#28 Post by robwoj44 »

ssh-gui internationalized
/usr/sbin/ssh-gui
Attachments
ssh-gui-0.7.1_pup1.tar.gz
ssh-gui with ssh-gui.pot
(8.11 KiB) Downloaded 654 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs and scripts that are not yet internationalized

#29 Post by L18L »

robwoj44,
though I could make a translation in momanager...
(copied gpptp to /usr/share/doc/nls/gpptp/)
but when

Edit
/usr/sbin/gpptp (gpptp gpptp)
things went crazy

directory /usr/share/locale/gpptp/ was created
and not editable.

[edit]source of gpptp (gpptp.c ? ) is also needed in GPL software [/edit]

BarryK,
thus put /usr/sbin/gpptp on hold for now.

rodin.s,
can you confirm it is working or not please.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs that are not yet internationalized

#30 Post by L18L »

Sorry, same with /usr/sbin/ssh-gui :cry:

adding source could help find the bug 8)

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#31 Post by robwoj44 »

Thank you for the verification. I add the sources of gpptp and ssh-gui. I made the internalization of c files for the first time. It seems to work (I connected to vpn with polish gpptp), but really I'm not sure if I made it correctly. To make the pot file I used: xgettext -d gpptp -s -o gpptp.pot --keyword=_ gpptp.c
Attachments
sources.tar.gz
Sources of gpptp and ssh-gui with Makefile
(8.59 KiB) Downloaded 635 times
Last edited by robwoj44 on Thu 16 May 2013, 19:07, edited 2 times in total.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#32 Post by robwoj44 »

Pdict internationalized

/usr/sbin/pdict

Code: Select all

#!/bin/sh
##! /usr/sbin/gtkdialog3 -e
#BK nov 2007 gui frontend for dict.
#110126 improvements.
#130516 robwoj44 internationalized

export TEXTDOMAIN=pdict
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8
. gettext.sh


echo -n "" > /tmp/pdict-results.txt

yaf-splash -placement center -bg orange -close never -timeout 60 -fontsize large -text "$(gettext 'Please wait, accessing online Dict server...')" &
DICTLIST="`dict --dbs`"
killall yaf-splash
COMBOCONTENT="`echo "$DICTLIST" | tr "'" "_" | grep '^ ' | grep -v '^ \-' | sed -e 's/^ //' | sed -e 's/^/<item>/' | sed -e 's/$/<\/item>/'`" #'geany
COMBOCONTENT="<item>all        $(gettext 'Search all databases')</item>
${COMBOCONTENT}"

echo '#/bin/sh' > /tmp/pdict-func1
echo 'dict -d $2 $1  > /tmp/pdict-results.txt 2>&1'  >> /tmp/pdict-func1 #110126
chmod 755 /tmp/pdict-func1

export MAIN_DIALOG="
<window title=\"$(gettext 'Pdict dictionary and thesaurus')\" icon-name=\"gtk-info\">
 <vbox>
  <hbox>
   <text><label>$(gettext 'enter a word:')</label></text>
   <entry activates-default=\"true\">
    <variable>WORD</variable>
   </entry>
   <button has-default=\"true\">
    <input file stock=\"gtk-find\"></input>
    <label>$(gettext 'dict')</label>
    <action>/tmp/pdict-func1 \$WORD \$MYCHOICE</action>
    <action>refresh:INFO</action>
   </button>
  </hbox>
  <text><label>$(gettext 'Choose which online database (default is all):')</label></text>
  <combobox>
   <variable>MYCHOICE</variable>
$COMBOCONTENT
  </combobox>
  <frame result:>
   <edit>
    <variable>INFO</variable>
    <input file>/tmp/pdict-results.txt</input>
    <width>450</width>
    <height>300</height>
   </edit>
  </frame>
  <hbox>     
   <button>
    <label>$(gettext 'exit')</label>
    <input file stock=\"gtk-quit\"></input>
    <action type=\"exit\">EXIT</action>
   </button>
  </hbox>
 </vbox>
</window>
"

##i don't know enough about themes to do this any better...
##note, normal gtkrc is now ~/.gtkrc
#cp -f /etc/gtk-2.0/gtkrcMONOSPACED /etc/gtk-2.0/gtkrc
#echo '#!/bin/sh
# sleep 2
# rm -f /etc/gtk-2.0/gtkrc
#' > /tmp/delaygtkrc.sh
#chmod 755 /tmp/delaygtkrc.sh
#/tmp/delaygtkrc.sh &


RETSTRING="`gtkdialog3 --program=MAIN_DIALOG`"

###END###

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs and scripts that are not yet internationalized

#33 Post by L18L »

robwoj44 wrote:Thank you for the verification. I add the sources of gpptp and ssh-gui. I made the internalization of c files for the first time. It seems to work (I connected to vpn with polish gpptp), but really I'm not sure if I made it correctly. To make the pot file I used: xgettext -d gpptp -s -o gpptp.pot --keyword=_ gpptp.c
I am also no C guru, just tried to internationalize some progs.

gpptp
can be edited now (don't know what was wrong :roll: )
ssh-gui
mo file can be created and used
but not edited (by momanager and me)
compiling:
file INSTALL said: make (that's all) but did not succed.
but in console this was working:
# gcc -o ssh-gui ssh-gui.c ssh_widget.c notebook.c `pkg-config --libs --cflags gtk+-2.0`
notebook.c: In function ‘destroy’:
notebook.c:12:2: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
# upx ssh-gui
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2013
UPX 3.09 Markus Oberhumer, Laszlo Molnar & John Reiser Feb 18th 2013

File size Ratio Format Name
-------------------- ------ ----------- -----------
22510 -> 8832 39.24% linux/elf386 ssh-gui

Packed 1 file.
# xgettext -d ssh-gui -s -o ssh-gui.pot --keyword=_ ssh-gui.c ssh_widget.c notebook.c
#


Sorry I have no idea how to continue for now :cry:

[edit] I suspect it has something to do with different CHARSET
Last edited by L18L on Fri 17 May 2013, 18:23, edited 1 time in total.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#34 Post by robwoj44 »

I think it is my fault. I do not add the file netbook.c which I did not change.
I reloaded sources.tar.gz with this file and Makefile.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

alien2puppy

#35 Post by don570 »

alien2puppy by 01micko should be gettexted.
The instructions are important and all in English.
It could be included in a langpack as well.

I'll look at it and post a gettext version on Saturday.

__________________________________________

The help system of 'strippkg' is in English but it's only a couple of words.
It's not worth translating.

___________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

alien2puppy - gettext

#36 Post by don570 »

I was successful in making a gettext version of 'alien2puppy'

People can now put it in their langpacks if they wish.

Available HERE

____________________________________________________

I discovered that Momanager is useless if the script has expressions
that use UTF-8 characters. I had to use strictly ascii.

L18L explained how to get around this problem
with a terminal command but shouldn't Momanager be
able to handle UTF-8 characters.

Code: Select all

xgettext --from-code=UTF-8 -L shell script.sh 

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#37 Post by Bert »

Thanks for your work Don 8)

Your gettexted version of alien2puppy is working fine. See attachment for a dutch alien2puppy :)

As a beginning momanager user I have noticed it is important to specify utf-8 in both Geany and Poedit, before saving the translation.

Geany: Document>Set encoding>Unicode>UTF-8
Geany will otherwise close without warning when saving and translation is lost

Poedit: Catalog>Setup>charset.
Poedit will give error to show utf-8 is needed

That way typical utf-8 characters are accepted and included like they should be in the translation (é, à, ç, ö, etc..)

Hope I understood what you are saying correctly.
Attachments
capture30560.png
(46.2 KiB) Downloaded 691 times
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: alien2puppy - gettext

#38 Post by L18L »

don570 wrote:...I discovered that Momanager is useless if the script has expressions
that use UTF-8 characters....
I would define it in a positive way:

The script maker ensures that it can be translated using momanager 8)

Bert wrote: it is important to specify utf-8 in both Geany and Poedit
+1 :D

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Programs and scripts that are not yet internationalized

#39 Post by L18L »

L18L wrote:...
Sorry I have no idea how to continue for now :cry:

[edit] I suspect it has something to do with different CHARSET
And there is a mismatch of ssh-gui and ssh_gui somewhere :roll:

[edit] mystery solved :lol:
Last edited by L18L on Mon 20 May 2013, 17:17, edited 1 time in total.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#40 Post by robwoj44 »

I made the folder /usr/share/doc/nls/ssh-gui and placed ssh-gui.pot. It was possible for me to change actual translation of ssh-gui.mo. I made the test in racy 5.5.

Post Reply