Author Topic: question about Translation  (Read 5526 times)

mihajzm

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
question about Translation
« on: March 22, 2009, 07:57:19 pm »
Hello,

I have successfully installed LinuxMCE on my automation server this weekend. And I find it's a great software.
Now I want to translate the UI to Slovak language. I found various info how to done it. Installed HAD designer, successfully connected to database. Now when I want to change I have three options in the table English,French,German. I could rewrite text in one of these, but I want to have option for Slovak. How can I add this option to database?

thanks for answer.


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: question about Translation
« Reply #1 on: March 22, 2009, 08:42:49 pm »
You have to manually add an entry to the Language table in the pluto_main database.

-Thom

mihajzm

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: question about Translation
« Reply #2 on: March 22, 2009, 09:02:23 pm »
so easy. :) done it allready.

ok. now I want program a driver for my self made Relay ,Input , Thermometer boards. All are on RS485 network. the communication is
special. Before I wrote server daemon communicating with this boards and visualization made in JAVA.
Now I want to interconnect with dce and show all the stuff on orbiter.
Could you give me a some program example how to done it.

thanks


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: question about Translation
« Reply #3 on: March 22, 2009, 09:23:01 pm »
Well,

You can write DCE devices in two ways, either using Ruby, using GSD.
Or via C++ using DCEGen, sql2cpp and the other tools.

Which do you want to do?

mihajzm

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: question about Translation
« Reply #4 on: March 22, 2009, 09:56:49 pm »
I program mainly in C. Therefore C++ is my preferred way. Is there a simple example (source code), how to write DCE device in C++.


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: question about Translation
« Reply #5 on: March 22, 2009, 10:18:26 pm »
These instructions will change after the 0810 release, so I am not putting this in the wiki, it is temporary.

This will take some work, but, since you're only doing a simple device, the following instructions will work. If you choose to do full development on LMCE, you'll need to install 0810, and create a complete build environment, with a functioning build server...

do an SVN checkout of the following branch:

http://svn.linuxmce.org/branches/LinuxMCE-0810  put it in /home/src for example. This is the top of the checkout, which i will refer to as $TOP. It will refer to /home/src/LinuxMCE-0810

then copy the contents of /usr/pluto/lib into $TOP/src.. Notice there is a lib dfirectory under the src/ directory in the checkout, just to clarify.

you then need to create two scripts, and put these into /usr/local/bin

prep.sh
Code: [Select]
#!/bin/bash

### Use this script to prepare the build for dev work.
### NOTE: Be sure to run unprep to revert the prepped
### makefiles!

## Back up the original unprepped makefiles.
for i in $(find . -name Makefile)
do
  echo Backing up $i to $i.unprep
  cp $i $i.unprep
done

echo Prepping sources...

find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_defines->/-DKDE_LMCE -DDEBUG -DTHREAD_LOG -DLOG_ALL_QUERIES -I\/opt\/libxine1
-pluto\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include -I\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/include\/SD/' -i '{}'
\;
find . -iname Makefile -exec sed -e 's/<-mkr_t_compile_libs->/-L\/opt\/libxine1-pluto\/lib -L\/opt\/libsdl1.2-1.2.7+1.2.8cvs20041007\/lib/' -i '{}' \;


unprep.sh
Code: [Select]
#!/bin/bash

### this script undoes all of the prepping steps done by prep.sh by
### simply moving the old prep files back into place.

for i in $(find . -name Makefile.unprep)
do

echo Undoing Prep for $i

mv $i `dirname $i`/Makefile

done

So, now... you can use those to prep and unprep your makefiles generated by DCEGen. I say this, because you'll have to prep them, before building, and unprep them, before sending in a patch.

Once you have this in place:

apt-get install pluto-dcegen
apt-get install pluto-sql2cpp

and you'll have everything you need.

So the basic process to developing a device:

* create a new device template, make note of the device template id#
* in that device template, specify what type of device it is (probably an interface), the commands it should deal with, the events it can send to the rest of the system, and other bits such as plug and play information (if it's a USB device, what's the vendor/model ID, if it's a serial device, do you have a way to send strings to detect it?, if it's an ethernet device, is there a MAC address range?, etc.).
* you then go to $TOP/src/DCEGen and run /usr/pluto/bin/DCEGen -d xxxx where xxxx is the device template #
* then go to $TOP/src/sql2cpp and run /usr/pluto/bin/sql2cpp  ... this will generate new define constants that the code needs.
* your new code skeleton is in $TOP/src/MyNewDevice with stubs for each command you need to implement.

you can then manually add the device via advanced > config > devices, make note of the device #.

then you can do the following process:

* hack
* make bin
* cp MyNewDevice /usr/pluto/bin
* /usr/pluto/bin/MyNewDevice -d yy where yy is the device #.

* repeat.

When you are ready to contribute the code, talk to us, and we'll try to fold it in.

-Thom

mihajzm

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: question about Translation
« Reply #6 on: March 22, 2009, 10:50:54 pm »
thank you very much. I start working on it.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: question about Translation
« Reply #7 on: March 22, 2009, 11:04:17 pm »
Or... you can follow the proper instructions on building it as described in the wiki: http://wiki.linuxmce.org/index.php/Building_LinuxMCE_0810
"Change is inevitable. Progress is optional."
-- Anonymous


mihajzm

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: question about Translation
« Reply #8 on: March 28, 2009, 12:29:14 pm »
only to clarify
the SVN link should be

http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/