maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   eSpeakTime german localization (https://talk.maemo.org/showthread.php?t=56675)

trurl 2010-06-20 12:15

eSpeakTime german localization
 
1 Attachment(s)
Hello folks,

i was so excited by the app eSpeakTime that i made a german localization. I edited the file /usr/bin/espeaktime-now.sh by adding the following lines:

Code:

if [ $(echo $LC_MESSAGES) == "de_DE" ]; then
espeak -vde -w $fname $(date "+%H:Uhr:$(echo %M|sed 's/0*//')")
else
espeak -w $fname $(date "+%H:%M")
fi

This changes the espeak language to german, adds the word "Uhr" and cuts the leading zeros in the Minutes. I hope it makes it a bit more human understandable.

I also attached the complete file (don't forget to rename if from .txt to .sh)

Manul 2010-06-20 12:29

Re: eSpeakTime german localization
 
Just a quick hint: You can get the minutes with the leading 0s stripped using '%-M'.

trurl 2010-06-20 12:34

Re: eSpeakTime german localization
 
Quote:

Originally Posted by Manul (Post 722585)
Just a quick hint: You can get the minutes with the leading 0s stripped using '%-M'.


Thanks for that, good point. So now it will look like this:

Code:

if [ $(echo $LC_MESSAGES) == "de_DE" ]; then
espeak -vde -w $fname $(date "+%-H:Uhr:%-M")
else
espeak -w $fname $(date "+%H:%M")
fi

Now it will cut the leading zeros in the hours too.

CutterSlade 2010-06-20 15:55

Großartig!!
 
I always wanted such a feature for my cellphones! Is it possible to change the voice (volume,pitch, etc) with that file?
Also it would be great if the media player would be paused while espeak is speaking.

puiradu 2010-06-20 16:26

Re: eSpeakTime german localization
 
Hi! could anyone be kind to write the commands for xterm for copying the espeaktime-now.sh from /usr/bin/espeaktime-now.sh to /home/user/MyDocs? Thank you!

puiradu 2010-06-20 16:28

Re: eSpeakTime german localization
 
I assume that for romanian this sequence: if [ $(echo $LC_MESSAGES) == "de_DE" will be f [ $(echo $LC_MESSAGES) == "ro_RO". Wright?

Laughing Man 2010-06-20 16:31

Re: eSpeakTime german localization
 
Quote:

Originally Posted by puiradu (Post 722732)
Hi! could anyone be kind to write the commands for xterm for copying the espeaktime-now.sh from /usr/bin/espeaktime-now.sh to /home/user/MyDocs? Thank you!

To copy in Linux. Use the command cp.

The way cp works is:

cp folder/file you want to copy destination (and note if it has spaces in the filename you will need to surround it with quotation marks like "Program Files" TARGET

So for what you asked for it would be..

Code:

cp /usr/bin/espeaktime-now.sh /home/user/MyDocs
Where the first part following cp is the file you wanted to copy, with the /home/user/MyDocs/ being the directory you want to copy them too.

Hint you can press tab to have xterm auto complete paths for you. So instead of typing out espeak time, you can type in esp and press tab to get the rest.

puiradu 2010-06-20 17:40

Re: eSpeakTime german localization
 
i still don't get it. i renamed the atached file to espeaktime-now.sh and i used the command cp /home/user/MyDocs/espeaktime-now.sh /usr/bin/ to copy it to the location and the hour is still played in english.

i tryed another method: i deleted the file espeaktime-now.sh from /usr/bin and added the new one and the result is that the hour is not played at all.

what I did wrong? how to make this work?

trurl 2010-06-20 17:59

Re: eSpeakTime german localization
 
Quote:

Originally Posted by puiradu (Post 722797)
i still don't get it. i renamed the atached file to espeaktime-now.sh and i used the command cp /home/user/MyDocs/espeaktime-now.sh /usr/bin/ to copy it to the location and the hour is still played in english.

i tryed another method: i deleted the file espeaktime-now.sh from /usr/bin and added the new one and the result is that the hour is not played at all.

what I did wrong? how to make this work?

Hmm... make sure you copy it as root.

i'dont know if ro_RO is right. To find that out type "echo $LC_MESSAGES" into xterm.

puiradu 2010-06-20 18:21

Re: eSpeakTime german localization
 
i get it now. this depends to the phone language not to espeak languages! i guess the file made by trurl works only if the language of the phone is set to german!

unfortunately there isn't romanian localization for maemo. I ofer myself to make the translation but I don't know how or what programs to use. Anyone? who can help me to make romanian localiation for n900? any skilled developers?


All times are GMT. The time now is 14:14.

vBulletin® Version 3.8.8