LinuxMCE Forums

General => Developers => Topic started by: omniware on February 09, 2008, 12:17:14 pm

Title: Translations
Post by: omniware on February 09, 2008, 12:17:14 pm
I'm a new user here.

I want to know if developpers are working about translate LinuxMCE to another languajes, specually to Spanish.

I think LinuxMCE is a great software and I want to made some tests to install it into my house.

There people haven't speaking English. If LinuxMCE is not tranlated to Spanish it is very difucoult to install.

I hope to help to translate LinuxMCE to spanish

Thanks a lot about you work.
Title: Re: Translations
Post by: nite_man on February 09, 2008, 10:32:18 pm
If you're interested to have Spanish version of LMCE you may do translation by yourself. Check this wiki article - http://wiki.linuxmce.org/index.php/Translate_the_GUI_into_another_language (http://wiki.linuxmce.org/index.php/Translate_the_GUI_into_another_language) and this topic about French translation - http://forum.linuxmce.org/index.php?topic=2558.0;topicseen (http://forum.linuxmce.org/index.php?topic=2558.0;topicseen).

Personally I'm gonna translate LMCE to Russian. So, everything in our hands :)
Title: Re: Translations
Post by: FladeX on February 29, 2008, 09:57:58 pm
Personally I'm gonna translate LMCE to Russian. So, everything in our hands :)
Can I help you with this job? ;) I really needed in russian translate of LinuxMCE...
Title: Re: Translations
Post by: enrique.lopez on March 03, 2008, 05:51:41 pm
I'm a new user here.

I want to know if developpers are working about translate LinuxMCE to another languajes, specually to Spanish.

I think LinuxMCE is a great software and I want to made some tests to install it into my house.

There people haven't speaking English. If LinuxMCE is not tranlated to Spanish it is very difucoult to install.

I hope to help to translate LinuxMCE to spanish

Thanks a lot about you work.

the spanish translations is in pogress but its impossiblr for me run correctly linuxmce 7.04, 7.10 b2 and b3, but now with b4 i stand.
Bye
Title: Re: Translations
Post by: solidd_swa on May 05, 2008, 03:06:31 pm
hey guys,

I am working on an Arabic translation. I followed the instructions i had ( i just changed the German DB name in the language table to Arabic) then i used the HaDesigner program to change the former German text to arabian word.

now when i start Linuxmce, the eateries i changed are all ?????? question marks. i bet this is a character set problem.
i also installed the kde Arabic packages, no dice.

what do you guys suggest i do? i am doing this for my job, and i would appreciate a fast response.
Title: Re: Translations
Post by: Ender on May 06, 2008, 10:52:20 am
Hi,

First, you have to add a record to Language table, let's say "Romanian". Then add records in Text_LS for each text to be translated, having FK_Language that new language id and FK_Text the id of the text to translate.

To test, in webadmin choose that language for an orbiter and fully regen it.

Title: Re: Translations
Post by: Ender on May 06, 2008, 10:54:47 am
Quote : "now when i start Linuxmce, the eateries i changed are all HuhHuh question marks. i bet this is a character set problem."

What are you using to insert records in the database? Make sure the text added is UTF8.
Title: Re: Translations
Post by: solidd_swa on May 06, 2008, 12:19:37 pm
i dont know much about character encoding, so if someone can please teach me. i know arabic is unicode. i am not sure again if its UTF8. and how would i be able to store arabic characters in the DB
Title: Re: Translations
Post by: chriss on May 06, 2008, 02:14:29 pm
There are some incosistencies with character encoding. See http://www.charonmedia.org/pipermail/lmce-dev/2008-January/000214.html on the dev mailing list on how to work around this. I did also file a mantis ticket inlcuding the instructions for integrating my german translation.

Cheers,
/Chriss
Title: Re: Translations
Post by: mmnogueira on May 06, 2008, 07:54:43 pm
Hello All,

The Brazilian Portuguese translation is 90% done. First I created a Portuguese BR language in the Languages table (code 9). Then I exported the Text_LS table to a .ods file and opened it with OO Calc (in OO Calc is very easy to add lines, sort, substitute, compare, check spelling etc.). Finally I saved the file in CSV format and imported it to the pluto_main db using phpMyAdmin. After correcting collation and character encoding, following the instructions above on this thread, my LMCE is - partially - speaking Portuguese. Very easy and straightforward. However, some issues remain:

1. Some strings are not translated (e.g. items of the Lights, Media and Security menus);
2. Since most of the strings in Portuguese are much bigger than in English, their font sizes need to be adjusted in order to fit the available space in buttons and menu items.

Any help re the issues above will be greatly appreciated.

Finally, if someone is interested in this work, please send me the instructions on how to upload the file.

Thanks in advance,

Marcos Nogueira
S. Paulo - Brazil
LMCE 7.10 RC1 - UI2
Title: Re: Translations
Post by: brsisr on May 06, 2008, 08:25:32 pm


View Profile Email Personal Message (Online)
   
   
Re: Adding FULL support for other regions/country/languages
« Reply #4 on: May 02, 2008, 01:53:17 pm »
   Reply with quoteQuote Modify messageModify Remove messageRemove
Hi All!

I tried to translate the Linux MCE to Russion , please find my scripts which perform a first automatic translation:

First script , which takes the string from DB and traslate it to russion( Every one could change this to it lamgauge):

#### Global variables
lang_id=4;
base_lang_id=1;
lang_desc='Russian';
###char_set='utf8';
###char_set='koi8r';
###char_set='cp1251';
char_set='cp866';

dbuser='odbcuser';
dbip='localhost'

#### End Global variables


### create language entry
mysql -u$dbuser -h$dbip -e "insert into  \`pluto_main\`.\`Language\` (PK_Language, Description , psc_id) values ($lang_id ,\"$lang_desc\",$lang_id );"

### clean the xisting language from DB
mysql -u$dbuser -h$dbip -e "delete from pluto_main.Text_LS where FK_Language =$lang_id;"

### Read the first string id for english language
fk_text_=`mysql -u$dbuser -h$dbip -e "SELECT FK_Text FROM pluto_main.Text_LS where FK_Text > 0 and FK_Language=$base_lang_id and Description not like '%<\%%' order by FK_Text Limit 1"`;
### clean field name
fk_text=`echo $fk_text_ | cut -f 2 -d " "`

#### do this operation for each record in DB
while [ "$fk_text" != "" ] ; do
### Read the text for string id which stored in fk_text   
   description_=`mysql -u$dbuser -h$dbip -e "select Description from pluto_main.Text_LS where FK_Text=$fk_text and FK_Language =$base_lang_id;"`
### clean field name
   description=`echo $description_ | sed  's/Description //' | sed 's/\\\n//'`;
   
   
### tralsation of the string
   description_rus=`echo $description | ./trans e2r` ;

### print for debug purpose
   echo -----------------------
   echo fk_text ::$fk_text::
   echo description::$description::
   echo description_rus::$description_rus::
   echo -----------------------

#### insert the translated string back to DB
   mysql -u$dbuser -h$dbip -e "insert into  \`pluto_main\`.\`Text_LS\` (FK_Text,FK_Language,Description) values($fk_text,$lang_id,\"$description_rus\");" --default-character-set=$char_set

### Read the next string id for english language
   fk_text_=`mysql -u$dbuser -h$dbip -e "SELECT FK_Text FROM pluto_main.Text_LS where FK_Text > $fk_text and FK_Language=$base_lang_id and Description not like '%<\%%' order by FK_Text Limit 1"`;

### clean field name
   fk_text=`echo $fk_text_ | cut -f 2 -d " "`
   
done;

The second script is a perl script which perform an automatic translation from internet ( not such good , but for first time is good enough)

Second script, name "trans":
#!/usr/bin/perl -w
 
 use WWW::Babelfish;
     # Dummy UserAgent
 use constant AGENT =>
             'Mozilla/4.73 [en] (X11; U; Linux)';
     # Supported Languages
 my @languages = qw(English French German Italian
                  Portuguese Russian Spanish);
     # Build hash that assigns language abbreviations
     # to languages (e=>English, g=>German, ...)
 foreach my $language (@languages) {
     my $initial = substr($language, 0, 1);
     $i2full{lc($initial)} = $language;
}
     # All abbreviations in one string (efgpirs)
 my $chars = join '', keys %i2full;
     # Conversion direction from the
     # command line (g2e, e2f, ...)
 my $way = shift;
 usage() unless defined $way;
 usage("Scheme $way not supported") unless
 ($from, $to) = $way =~ /^([$chars])2([$chars])$/;
     # Read in text to be translated
my $data = join '', <>;
    # Contact Babelfish
my $babel = WWW::Babelfish->new(agent => AGENT);
usage("Cannot connect to Babelfish") unless
    defined $babel;
    # Perform translation
my $transtext = $babel->translate(
    source      => $i2full{$from},
    destination => $i2full{$to},
    text        => $data
);
die("Error: " . $babel->error) unless
    defined($transtext);
print $transtext, "\n";
##################################################
sub usage {
##################################################
    my $msg = shift;
    my $prog = $0;
    print "usage: $prog ",
          "[${chars}]2[${chars}] file ...\n";
    foreach $c (sort split //, $chars) {
        print " $c: $i2full{$c}\n";
    }
    exit(1);
}

My scripts are support currently 6 languages :
English French German Italian Portuguese Russian Spanish

You only have to modify them a little to change the language.
The translation are taken from Babelfish.
the second script I took from some Linux forum.( I am really sorry , I forgot who wrote it originally).

However it is not enough.The OrbiterGen could not recognize the fonts.I found in code that if font are not updated , the arial will be used.
Anyone has an ideas where in DB , I need to update the fonts?
Even French and German , which exist in DB could not be recognized well enough.


BTW: How could I add the scripts to the distro?
Title: Re: Translations
Post by: solidd_swa on May 10, 2008, 10:47:35 am
Quote
in phpmyadmin change collation type of
Description field in Text_LS from latin1-swedish-ci to utf8-unicode-ci.
Mysql should convert your strings from latin1 to utf-8. Now you change
field type from longtext to longblob. And last step is to change field
type from longblob to longtext with collation type set to
latin1-swedish-ci.

so i did all that, i still see ? ? ? ? ?  but now i do see that swl stores arabic, since before i would see ? ? ? after i save the arabic file in phpmyadmin. but now i see arabic in phpmyadmin.

I still see ? ? ? ? in the linuxmce user interface. any other ideas?

abdullah
Title: Re: Translations
Post by: Jeovane on May 16, 2008, 02:37:42 am
Hello All,

The Brazilian Portuguese translation is 90% done. First I created a Portuguese BR language in the Languages table (code 9). Then I exported the Text_LS table to a .ods file and opened it with OO Calc (in OO Calc is very easy to add lines, sort, substitute, compare, check spelling etc.). Finally I saved the file in CSV format and imported it to the pluto_main db using phpMyAdmin. After correcting collation and character encoding, following the instructions above on this thread, my LMCE is - partially - speaking Portuguese. Very easy and straightforward. However, some issues remain:

1. Some strings are not translated (e.g. items of the Lights, Media and Security menus);
2. Since most of the strings in Portuguese are much bigger than in English, their font sizes need to be adjusted in order to fit the available space in buttons and menu items.

Any help re the issues above will be greatly appreciated.

Finally, if someone is interested in this work, please send me the instructions on how to upload the file.

Thanks in advance,

Marcos Nogueira
S. Paulo - Brazil
LMCE 7.10 RC1 - UI2

Hi! Marcos, I'm just starting to use the linuxMCE, I'm brazilian too.
If you need some help, that I can help, you can count with me.
I would like to know how to get your translation, if it is possible.
Thanks a lot.
Muito obrigado pela atenção e boa sorte nesta jornada.

Jeovane V. Sousa
Uberlândia-MG-Brasil
Title: Re: Translations
Post by: mmnogueira on May 16, 2008, 06:17:08 pm
Hello Jeovane,

Hi! Marcos, I'm just starting to use the linuxMCE, I'm brazilian too.
If you need some help, that I can help, you can count with me.
I would like to know how to get your translation, if it is possible.
Thanks a lot.
Muito obrigado pela atenção e boa sorte nesta jornada.

Jeovane V. Sousa
Uberlândia-MG-Brasil

Welcome to the club. Be prepared for many sleepless nights... :-)

The translations issues mentioned at my previous posts are not resolved yet. Thanks to Thom and his excellent screencasts I'm playing with HADesigner more comfortabily now, but so far haven't been able to decypher this beast. Re the PTBR translation I'll send it to your email ASAP.

Thanks for your help offering - I'll certainly need it since I'm not a Linux expert at all. Let's keep in touch.

Best regards,

Marcos Nogueira
S. Paulo - Brazil
Title: Re: Translations
Post by: mmnogueira on May 16, 2008, 08:25:59 pm
Hello Jeovane,

Please send your email address to marcos dot nogueira at ig do com dot br.

tks,

Marcos
Title: Re: Translations
Post by: abooreal on May 20, 2008, 06:08:19 am
hi guys,
   I am doing a translation to Chinese. I got the DB items translated and inserted following the steps found here, but I can't see my text at all (they all appear as square boxes).

Then I tried to use the HADesigner to edit my text, still no good.
 
I am guessing that this is a font related issue. Has anyone solved this issue yet?

I will try to share my research as I progress.
Title: Re: Translations
Post by: Zaerc on May 20, 2008, 02:31:50 pm
Sounds like the system doesn't have all the needed fonts installed to display those characters properly.
Title: Re: Translations
Post by: abooreal on May 29, 2008, 05:52:32 am
O...K...
I spent some time trying to translate the GUI to use Asian fonts. Failed, but I'd like to post my findings here.

I converted the mysql db into utf8 format, it didn't do anything to the output.

I later wrote a small C++ function to see if my Chinese data can be displayed correctly, yes all the Characters are displayed correctly in the command prompt. (I tried with both mysql connector and db_wrapper connector, the results are identical)
The GUI still cannot display.

Then I looked into the OrbiterGen code and discovered that the OrbiterGen supports font file parameter input (-f fontFilePath).
The default path is "/usr/share/fonts/truetype/msttcorefonts" and "arial.ttf" is attached at the end.

I downloaded the uming.ttf font file (apt-get install ttf-arphic-uming), changed the OrbiterGen.cpp so that it takes the file name alone with the path, recompiled it, copied it to the usr/bin directory, and changed the 2 .sh files that uses OrbiterGen (Sorry I don't have access to my linuxMCE now, and I have very bad memories... :-[ just do a "grep -r OrbiterGen *" in /usr/bin/ folder). Still no luck.

I changed back the OrbiterGen to the original one. Copied the uming.ttf to the default "/usr/share/fonts/truetype/msttcorefonts" folder.

Backup my original arial.ttf, and rename my uming.ttf to arial.ttf.... reboot, regen the orbiter, still no luck.
THEN, it totally screwed up my system. Now I cannot boot up the system...  :-[
I am reinstalling the entire thing now. I guess my next attempt is to go with the c_str() functions.

Any comment?
Title: Re: Translations
Post by: danielk on June 03, 2008, 08:41:39 pm
abooreal,

I'm not sure what went wrong, but m1ch43l on IRC (chat button) has a utf8 conversion mostly complete. AFAIK Xine is not playing utf8 encoded files yet but the other apps are all working.

PS Is Chinese readable Left-to-Right? If not, that may be the next issue after utf8 & fonts.
Title: Re: Translations
Post by: Zaerc on June 03, 2008, 09:18:47 pm
I think you're just supposed to put the fonts in there (without renaming them) and then go to the folder and run:
Code: [Select]
mkfontscale && mkfontdir
fc-cache

Not sure if that still works, but it used to be the way to add new fonts to X-windows (to resolve those squares).
Title: Re: Translations
Post by: abooreal on June 04, 2008, 03:36:16 pm
Thnx guys for the reply...
I don't have access to my MCE machine this week, I will try the method Zaerc talked about.

to danielk,
Chinese IS Left-to-right-able language.

my latest finding was the following:
I discover that the orbiter items are generated by the SDL lib.
It uses the SDL_ttf.h lib.
I did a grep and discover that the orbiter gen used "ttf_RenderText_xxxxx" while there is a "ttf_RenderUTF8_xxxxx" function available.
I was going to replace all the RenderText functions with the RenderUTF8 function, but I will try Zaerc's method first.

Once again, thanks for the quick reply!!!! really appriciated!  ;D ;D ;D
Title: Re: Translations
Post by: Cidikley on August 28, 2008, 07:26:14 pm
Hello Jeovane,

Please send your email address to marcos dot nogueira at ig do com dot br.

tks,

Marcos
Hello! I'm also interested in the translation into Portuguese, if I can help let me know something, if you can pass me so I try I also thank.
tks,
Cidikley
Title: Re: Translations
Post by: samir on April 28, 2009, 11:40:42 am
hey guys,
has anyone able to use the chinese fonts in the database. The thing that I am trying to do is upload the audio files named in chinese to database. The files are uploaded with the mediasync but I see very wierd characters.even in mysql browser I see that. I changed the collation of pluto_media , file table to utf8_general_ci but still the same , any help ?
please thanks.
Title: Re: Translations
Post by: tschak909 on April 28, 2009, 03:17:56 pm
We need some help making sure that non-roman fonts, etc. can display properly.

-Thom
Title: Re: Translations
Post by: samir on April 29, 2009, 01:21:05 pm
I thought someone was already working on this... hope someone can help me out. I have finished new skin for my hotel project. Very soon I will post here the screenshots.
Thom, thanks for  the screencast.



Title: Re: Translations
Post by: tschak909 on April 29, 2009, 04:53:27 pm
If you're doing this for commercial benefit. You must apply for a Pluto license. Furthermore, given the specialized nature of this, you'll need to apply for specialized license conditions.

-Thom
Title: Re: Translations
Post by: hari on April 29, 2009, 05:24:51 pm
only if he sells it, not as "user" in his hotel
Title: Re: Translations
Post by: samir on April 30, 2009, 04:03:27 am
it is for my own purpose.
Title: Re: Translations
Post by: samir on April 30, 2009, 08:39:53 am
anyone able to read chinese characters in database or datagrid ?
I have mp3 files that  are named in chinese and whenever I try to copy it to database I get very strange characters. Collation for database (pluto_main and pluto_media both are utf8). I am only stuck with this last problem. Any help will be highly appreciated.
thanks
Title: Re: Translations
Post by: samir on May 11, 2009, 01:51:07 pm
solved the problem... if anyone needs help for displaying chinese or asian character in linuxmce ... let me know !!

LINUX MCE ROCKS :D
Title: Re: Translations
Post by: posde on May 11, 2009, 01:52:54 pm
samir,

please post a ticket on svn.linuxmce.org, mark it feature_patch, select 0810 Release as the milestone, and describe what you did.

Thanks.
Title: Re: Translations
Post by: tschak909 on May 11, 2009, 04:12:32 pm
Can you please provide us a patch?

-Thom
Title: Re: Translations
Post by: samir on May 12, 2009, 01:08:43 am
I will post a ticket by tomorrow .
Title: Re: Translations
Post by: samir on May 12, 2009, 04:04:21 am
hi ,
I have a posted a ticket on svn.linuxmce.org please review and let me know if its ok .It is with the subject Chinese characters on linuxmce.

samir