HOWTO: NC10 scripts

Discussions about Linux installation and configuration on Samsung laptops
mbt28
Newbie
Newbie
Posts: 31
Joined: 23/04/2009, 11:18

RE: [NC10] New scripts, updated scripts and a general summary

Post by mbt28 » 03/05/2009, 20:33

Bluetooth turkish translation

Code: Select all

#!/bin/sh
# script by Fortunato Ventre (voRia) - http://www.voria.org - vorione@gmail.com
#
# "Toggle bluetooth on/off on Samsung NC10"
#

if [ $USER != "root" ]; then
	echo "You need admin rights to run this script. Try with sudo."
	exit 1
fi

LOCALE=`export | grep -w LANG | cut -d\' -f2`
case $LOCALE in
	it_IT*)
		POPUP_TITLE="Bluetooth"
		BT_ON="Bluetooth attivato"
		BT_OFF="Bluetooth disattivato"
		;;
	tr_TR*)
		POPUP_TITLE="Mavidiş"
		BT_ON="Mavidiş etkin"
		BT_OFF="Mavidiş devre dışı"
		;;
	*)
		POPUP_TITLE="Bluetooth"
		BT_ON="Bluetooth enabled"
		BT_OFF="Bluetooth disabled"
		;;
esac

ICON=bluetooth

if which notify-send > /dev/null; then
	USE_POPUP=1
else
	USE_POPUP=0
fi

# If $SUDO_USER is not specified, defaults to root.
if [ -z $SUDO_USER ]; then
	SUDO_USER="root"
fi

if /etc/init.d/bluetooth status | grep not > /dev/null; then
	modprobe btusb
	/etc/init.d/bluetooth start > /dev/null
	if [ $USE_POPUP = 1 ]; then
		sudo -u $SUDO_USER -- notify-send -u normal -i $ICON -t 2000 "$POPUP_TITLE" "$BT_ON"
	fi
else
	/etc/init.d/bluetooth stop > /dev/null
	hciconfig hci0 down
	sleep 1
	modprobe -r btusb
	modprobe -r sco
	modprobe -r rfcomm
	modprobe -r bnep
	if [ $USE_POPUP = 1 ]; then
		sudo -u $SUDO_USER -- notify-send -u normal -i $ICON -t 2000 "$POPUP_TITLE" "$BT_OFF"
	fi
fi
exit 0


mzaworsk
Newbie
Newbie
Posts: 5
Joined: 05/05/2009, 20:51

RE: [NC10] New scripts, updated scripts and a general summary

Post by mzaworsk » 05/05/2009, 21:31

took some time to translate into german. just adding the scripts. dont know ho you want to have the diff stuff.

bye

martin z.
Last edited by mzaworsk on 05/05/2009, 21:32, edited 1 time in total.

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 05/05/2009, 21:38

First of all, welcome!
Thank you for the translation, you can just paste here the added lines for every script. There is no need to make diffs, they are just a bunch of lines. :)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

mzaworsk
Newbie
Newbie
Posts: 5
Joined: 05/05/2009, 20:51

RE: [NC10] New scripts, updated scripts and a general summary

Post by mzaworsk » 05/05/2009, 22:02

'voRia' pid='989' dateline='1241555884' wrote: First of all, welcome!
Thank you for the translation, you can just paste here the added lines for every script. There is no need to make diffs, they are just a bunch of lines. :)
hi all, hi voRia ;)
here are the translations of each script

btonoff.sh

Code: Select all

de_DE*)
		POPUP_TITLE="Bluetooth"
		BT_ON="Bluetooth eingeschaltet"
		BT_OFF="Bluetooth ausgeschaltet"
		;;
cputemp.sh

Code: Select all

de_DE*)
		POPUP_TITLE="Hardware Sensor Monitor"
		CPU_TEMP="Prozessor Temperatur:"
		;;
wconoff.sh
I think that is is better to use Webcam (name of webcam) in ALL languages for the POPUP_TITLE.
why?
-> maybe somone has an usb webcam, so if we take the name branded on the netbook (Digital Motion Camera) it is better to determine which webcam we just talk about in the script. so maybe it should be made in every language like this:
POPUP_TITLE="$native_name_of_a_webcam_in_a_spec_languge$ (Digital Motion Camera)"

Code: Select all

de_DE*)
		POPUP_TITLE="Webcam (Digital Motion Camera)"
		WC_ON="Webcam eingeschaltet"
		WC_OFF="Webcam ausgeschaltet"
		WC_INUSE="Webcam in Benutzung.
Die Webcam kann im Moment nicht ausgeschaltet werden."
		;;
cpuscaling.sh

Code: Select all

de_DE*)
		POPUP_TITLE="Prozessorüberwachung"
		GOVERNOR_CHANGED="Prozessortaktstufe geändert zu:"
		GOVERNOR_INUSE="Aktuell verwendete Prozessortaktstufe:"
		;;
wlonoff.sh.sh[/b]

Code: Select all

de_DE*)
		POPUP_TITLE="Funknetzwerk"
		WIFI_ON="Funknetzwerk eingeschaltet"
		WIFI_OFF="Funknetzwerk ausgeschaltet
		;;

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 05/05/2009, 22:11

Thanks again for your work :)
'mzaworsk' pid='993' dateline='1241557320' wrote: I think that is is better to use Webcam (name of webcam) in ALL languages for the POPUP_TITLE.
why?
-> maybe somone has an usb webcam, so if we take the name branded on the netbook (Digital Motion Camera) it is better to determine which webcam we just talk about in the script. so maybe it should be made in every language like this:
POPUP_TITLE="$native_name_of_a_webcam_in_a_spec_languge$ (Digital Motion Camera)"
The fact is that the script disables the webcam by removing the 'uvcvideo' module from the kernel. This is a generic module used by a LOT of different webcams, so it's very likely that its removal disables all the webcams.
Last edited by voria on 05/05/2009, 22:12, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

mzaworsk
Newbie
Newbie
Posts: 5
Joined: 05/05/2009, 20:51

RE: [NC10] New scripts, updated scripts and a general summary

Post by mzaworsk » 05/05/2009, 22:24

'voRia' pid='994' dateline='1241557862' wrote: Thanks again for your work :)
'mzaworsk' pid='993' dateline='1241557320' wrote: I think that is is better to use Webcam (name of webcam) in ALL languages for the POPUP_TITLE.
why?
-> maybe somone has an usb webcam, so if we take the name branded on the netbook (Digital Motion Camera) it is better to determine which webcam we just talk about in the script. so maybe it should be made in every language like this:
POPUP_TITLE="$native_name_of_a_webcam_in_a_spec_languge$ (Digital Motion Camera)"
The fact is that the script disables the webcam by removing the 'uvcvideo' module from the kernel. This is a generic module used by a LOT of different webcams, so it's very likely that its removal disables all the webcams.
ah okay. well done.

:)

martin z.

mbt28
Newbie
Newbie
Posts: 31
Joined: 23/04/2009, 11:18

RE: [NC10] New scripts, updated scripts and a general summary

Post by mbt28 » 06/05/2009, 11:43

Turkish translation of all of scripts.

btonoff.sh

Code: Select all

tr_TR*)
		POPUP_TITLE="Mavidiş"
		BT_ON="Mavidiş etkin"
		BT_OFF="Mavidiş devre dışı"
		;;
cputemp.sh

Code: Select all

tr_TR*)
		POPUP_TITLE="Donanım İzleyici"
		CPU_TEMP="İşlemci Isısı:"
		;;
wconoff.sh

Code: Select all

tr_TR*)
		POPUP_TITLE="Dahili Kamera"
		WC_ON="Kamera etkin"
		WC_OFF="Kamera devre dışı"
		WC_INUSE="Kamera kullanımda.
Şu an için devre dışı bırakılamaz."
		;;
cpuscaling.sh

Code: Select all

tr_TR*)
		POPUP_TITLE="İşlemci Yönetimi"
		GOVERNOR_CHANGED="İşlemci yönetimi değiştirildi:"
		GOVERNOR_INUSE="İşlemci yönetimi kullanımda:"
		;;
wlonoff.sh.sh

Code: Select all

tr_TR*)
		POPUP_TITLE="Kablosuz Bağlantı"
		WIFI_ON="Kablosuz bağlantı etkin"
		WIFI_OFF="Kablosuz bağlantı devre dışı"
		;;
Last edited by mbt28 on 06/05/2009, 14:34, edited 1 time in total.

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 06/05/2009, 12:31

Translations added. Thank you! :)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

mbt28
Newbie
Newbie
Posts: 31
Joined: 23/04/2009, 11:18

RE: [NC10] New scripts, updated scripts and a general summary

Post by mbt28 » 06/05/2009, 14:36

I changed cpuscaling.sh translation this will be more understandable.

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 10/05/2009, 15:01

New 'nc10-scripts' package on repository. Changelog:

Code: Select all

nc10-scripts (0.4~ppa1~nc10~jaunty) jaunty; urgency=low

  * Replaced 'cpuscaling.sh' with a new script.
  * Added 'cpuscaling_helper.py', used by 'cpuscaling.sh' to properly
    update notifications.
  * Changed default keybindings for 'cputemp.sh' and 'cpuscaling.sh'
    respectively to FN-F7 and FN-F8.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

User avatar
Cimi
Jr. Member
Jr. Member
Posts: 95
Joined: 23/04/2009, 18:22
Location: Padova, Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by Cimi » 10/05/2009, 16:07

good job! works really well, thank you

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 10/05/2009, 16:40

Yet another 'nc10-scripts' package. Changelog:

Code: Select all

 nc10-scripts (0.4~ppa2~nc10~jaunty) jaunty; urgency=low
 
   * Removed 'cputemp.sh'.
   * Renamed 'cpuscaling.sh' to 'cpumanager.sh'. Now it shows cpu temp too.
Please provide translations for cpumanager_helper.py, thanks. ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

Cezary
Newbie
Newbie
Posts: 12
Joined: 13/03/2009, 17:01
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by Cezary » 10/05/2009, 17:29

pl_PL:

popup_title = "CPU"
cpu_temp = "Temperatura: "
cpu_governor = "Zarządca: "

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

RE: [NC10] New scripts, updated scripts and a general summary

Post by voria » 11/05/2009, 16:04

Thanks, Cezary. :)

I've added the cpu frequency too.

Is "Częstotliwość:" a good polish translation for "Frequency:"? I asked google and it says so :P
Last edited by voria on 11/05/2009, 16:19, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

seb0
Newbie
Newbie
Posts: 2
Joined: 10/05/2009, 17:46

RE: [NC10] New scripts, updated scripts and a general summary

Post by seb0 » 11/05/2009, 18:55

Hi voria,

Here is my little contribution to your project.
I don't know exactly how it works but there is other french speaking countries in addition to France.

They are :
Belgium, Switzerland and Canada.
So you may have to add fr_BE, fr_ ...

If you can tell me how I can check that up on my ubuntu, I could tell you what is my country code is different from fr_FR as I am from Belgium.

here are the translations.

btonoff.sh

Code: Select all

fr_FR*)
        POPUP_TITLE="Bluetooth"
        BT_ON="Bluetooth activé"
        BT_OFF="Bluetooth désactivé"
        ;;
cputemp.sh

Code: Select all

fr_FR*)
        POPUP_TITLE="Moniteur matériel"
        CPU_TEMP="Température processeur:"
        ;;
wconoff.sh

Code: Select all

fr_FR*)
        POPUP_TITLE="Webcam"
        WC_ON="Webcam activée"
        WC_OFF="Webcam désactivée"
        WC_INUSE="Webcam en cours d'utilisation.
Le périphérique ne peut être désactivé pour le moment."
        ;;
cpuscaling.sh

Code: Select all

fr_FR*)
        POPUP_TITLE="Régulateur processeur"
	GOVERNOR_CHANGED="Régulation processeur changée en:"
	GOVERNOR_INUSE="Régulation processeur actuellement sur:"
        ;;
wlonoff.sh

Code: Select all

fr_FR*)
        POPUP_TITLE="Réseau sans fil"
        WIFI_ON="Réseau sans fil activé"
        WIFI_OFF="Réseau sans fil désactivé"
        ;;
cpumanager_helper.py

Code: Select all

elif language == "fr_FR":
    popup_title = "Processeur"
    cpu_temp = "Température : "
    cpu_freq = "Fréquence : "
    cpu_governor = "Mode : "
Thanks in advance :)

Take care
sebastien

EDIT: Changed the cpu manager translation for a better lisibilty. (There where too much text)
Last edited by seb0 on 11/05/2009, 21:04, edited 1 time in total.

Post Reply