Page 1 of 20

translate kolibri

Posted: Wed Sep 07, 2011 11:42 pm
by fedesco
Was just asking myself if I could contribute to kolibrios translating it from English to italian (not developing software, not able to do it), but did not find anywhere where to start, could please someone give me a hint?
I could also find someone translating it in german, maybe other languages too!

Re: translate kolibri

Posted: Thu Sep 08, 2011 8:24 am
by SoUrcerer
At first, you should check, have kolibri fonts symbols for italian or not. If in italian you need only "english" letters, than everything is ok, and you can go to next step:)
Second step. Get Kolibri SVN(read wiki or ask here to learn how to get svn).
Third step. Ask somebody about editing kolibri's keyboard layouts (i don't know how to do it, but i'm sure it's easy). Add your layout in PANEL application (i don't know how to do this too,but somebody know,i'm sure),and after it you can select italian keyboard layout.
Fourth step. Edit all programs' sources, adding italian text strings (most of programs already have RU and EN text strings.You need to add IT strings too, not to edit EN or RU)
Fifth step. For every fixed program you need to create "build_it.bat" file - you can use "build_en.bat" as example. it's very easy.
Sixth step. You compile every fixed app, archive it with special "kpack" archiver and edit your IMG file with your favourite tool (as for me, i use mtools). Boot your version of OS. Check everything. If something is broken after your changes, restore sources of broken apps from backup or svn.
Seventh step. Ask somebody for helping blue boot screen and preparing italian autonightly build.
Eight step. Fix errors in translations,translate new programs:)

Of course,you may/should check your fixes of anything little by little.

Also, I can tell you how to write programs for kolibri.It's easy;)

Re: translate kolibri

Posted: Thu Sep 08, 2011 8:42 am
by fedesco
omg, didn't think it would have been that complicated....

i know that many opensource programs uses .po files for beeing multilanguage, so I hoped it would be the same

1 step) no, italian has some symbols more: é ò à è ù, is that a big problem? (german has the following symbols: ß, ä, ü, ö, but not the italians)
2 step) will try to check out today
3 step) why do I have to do this? I have a dualboot on my pc, can't I use the other operating system?
4 step) I'll gel the sources from SVN, right?
5 step) ok
6 step) Sorry, I do not know how to compile, maybe you can give me some advice; as operating system I am using Ubuntu....
7 step) ok
8 step) ;)

ok, thank you very much for all the instruction, today I'll gain some information for SVN, and I'll need some tutorial for compiling
I just do not understand one thing: why do I have to check if all programs are working if I only add strings? Because I do not know very god KolibriOS (I installed it yesterday, so I wont be able to say if every program is working right or not.
Instead of writing the text strings in the source code isn't it possible to write the on a separate file? I think it's better, because if with italian and german language in addition the files gets to heavy it could be they would not fit anymore on a floppy of 1.44mb, having them on a separate file you could propose them as download is the user wants to add another language ...

Re: translate kolibri

Posted: Thu Sep 08, 2011 8:57 am
by Jaeger
.po files are for Unix gettext library, it is a bit too heavy for Kolibri ;-)

3) You can edit resources in linux, but you would like other Italian people can use Kolibri, right? They will need Italian letters e.g. to edit texts.
4) Yes, you just need to install Subversion and run
svn co svn://kolibrios.org <your_directory_for_kolibri>
In order to commit your translation, write a PM to mike.dld and ask for SVN account.
I just do not understand one thing: why do I have to check if all programs are working if I only add strings?
Just to make sure that your changes do not break them. People can make mistakes ;)
Instead of writing the text strings in the source code isn't it possible to write the on a separate file?
Not for all programs. Most Kolibri programs were not aimed to be localizeable, so moving text resources into a separated file needs source recomposition. It is a useful work, but it presumes programming skills.

Re: translate kolibri

Posted: Thu Sep 08, 2011 9:48 am
by Asper
Hi fedesco!

You can start from translation strings in this file. It contains some descriptions of how and what to translate. I have yet completed it, but most part of programs and kernel strings are there. Some strings exist only in Russian for now.

In English
translist_en.txt (28.48 KiB)
Downloaded 614 times
In Russian
translist_ru.txt (28.22 KiB)
Downloaded 541 times

Re: translate kolibri

Posted: Thu Sep 08, 2011 9:53 am
by SoUrcerer
For compiling you can use Kolibri or Ubuntu, as you would. If you use ubuntu, you should download fasm compiler ( flatassembler.net ) and copy "fasm" file to your /usr/bin/ folder. After it you can compile most of kolibri programs.

Typical instructions:
go to folder with program sources (use terminal or mc)
create file with name "lang.inc" (with "nano lang.inc" command)
write "lang fix en" and save file with ctrl+x
compile with "fasm programname.asm programname" command
if everything is ok,you'll get working binary file. You can use it with kolibri:)
if you don't sure about program name, check "build_en.bat" file from program sources folder.
After compiling you can use program called "kpack", this program works from kolibri (may be somebody have version for linux).

Re: translate kolibri

Posted: Thu Sep 08, 2011 2:59 pm
by Freeman
IMHO, you also need to solve problem with mixed charset (codepages) in the same file. It can make a problem for some editors and loss of Russian text, if you're using standard Western European locale. When Russian text will lost, you cannot check-in these sources back into SVN or your changes will be rolled back by maintaners.

This problem exists for Italian, German and any other European language and for Hebrew, if yogev_ezra will want to make Hebrew version of Kolibri.

Re: translate kolibri

Posted: Thu Sep 08, 2011 3:48 pm
by SoUrcerer
fedesco wrote:omg, didn't think it would have been that complicated....

1 step) no, italian has some symbols more: é ò à è ù, is that a big problem? (german has the following symbols: ß, ä, ü, ö, but not the italians)
It's a big problem for now. We haven't Unicode support, so we use few codepages (mostly mortification of CP866). You see, we haven't symbols for é ò à è ù and so on. We can replace few symbols from our fonts with them, but then pseudo-graphic or russian text will be displayed incorrectly.
Korean, chinese, japanese, hebrew and few other languages are still big problem: we should support right-to-left and mixed writings, and so on. I hope we'll have support for new cool fonts with at least partial unicode support soon.
fedesco wrote: I just do not understand one thing: why do I have to check if all programs are working if I only add strings? Because I do not know very god KolibriOS (I installed it yesterday, so I wont be able to say if every program is working right or not.
Of course you should check only translated program or library (and, of course, programs which use that library). Right, people can make mistakes ;)
fedesco wrote: Instead of writing the text strings in the source code isn't it possible to write the on a separate file? I think it's better, because if with italian and german language in addition the files gets to heavy it could be they would not fit anymore on a floppy of 1.44mb, having them on a separate file you could propose them as download is the user wants to add another language ...
Things are easier ;) There are special data blocks in source files, look:

Code: Select all

if lang eq ru
   title    db	 'Доска отладки и сообщений',0
else if lang eq en
   title    db	 'General debug & message board',0
else if lang eq de
   title    db	 'Allgemeines debug- & nachrichtenboard',0
end if
You create file "lang.inc" with "lang fix ru", and your program will have only russian title. String "lang fix en" in "lang.inc" means that compiled program will be on English. So, we have few strings for different languages in source files, but only one of them will be in compiled program - depends on what we want. Few programs already have german and estonian (???) translations.

Re: translate kolibri

Posted: Thu Sep 08, 2011 3:55 pm
by SoUrcerer
Freeman wrote:IMHO, you also need to solve problem with mixed charset (codepages) in the same file. It can make a problem for some editors and loss of Russian text, if you're using standard Western European locale. When Russian text will lost, you cannot check-in these sources back into SVN or your changes will be rolled back by maintaners.

This problem exists for Italian, German and any other European language and for Hebrew, if yogev_ezra will want to make Hebrew version of Kolibri.
Hmm, right. This problem can be solved with kate text editor, for example. Just change charset, not decode whole file - and everything will be alright :)

Re: translate kolibri

Posted: Thu Sep 08, 2011 5:53 pm
by Freeman
I prefer more general solution -- one encoding/charset per file.

Code: Select all

if lang eq ru
   #include russian.inc
else if lang eq en
   #include english.inc
else if lang eq de
   #include german.inc
end if
Mixing charset in the same file is bad practice. You cannot restrict use only of selected, "right" editors and have no protection against character loss in common case.

Re: translate kolibri

Posted: Thu Sep 08, 2011 5:56 pm
by SoUrcerer
As for me, it's good decision, but this method require code refactoring of tens programs.

Re: translate kolibri

Posted: Thu Sep 08, 2011 6:44 pm
by fedesco
whoa, so many answer

thank you very much everybody, I'll try to begin to translate aspers file, then install the compiler and so on, if I have other questions will write on this topic ;)

@Jaeger:
sorry for point 3, I thought you meant that I had to translate everything inside kolibrios, didn't get you where speaking about the keyboard because of the special characters :P


just opened the file asper indicated to me; in the file where some Russian word (at least I guess so :P), but opening the file with gedit I can only see strange characters like

Code: Select all

‡ ¬¥ç ­šï
I think I have to try to open it with Kate, as sorcerer suggested, but in what code do I have to type? Unicode, Western European locale? (do not event know which formats uses Edith or windows notepad...)

Re: translate kolibri

Posted: Mon Sep 12, 2011 6:27 pm
by Nable
Freeman wrote:Mixing charset in the same file is bad practice.
As far as I remember, there is only one charset for KolibriOS applications - cp866.
Yes, you text editors and fs drivers support other charsets, but applications must display (i.e. 'send strings to sysfunctions' ) everything in cp866. Am I right?

Re: translate kolibri

Posted: Sun Dec 02, 2012 12:59 pm
by fedesco
Ok

1) downloaded the source code through svn
2) I'm able to read the source file with the correct codifications (cp866)
3) I've installed FASM on my linux box.
4)I've edited some files

But, when I try to compile, a program i do not get an executable file, i get a data file. For example, if I try to compile the game 15, i do

Code: Select all

>/opt/fasm/fasm 15.ASM out
flat assembler  version 1.70.03  (16384 kilobytes memory)
4 passes, 1062 bytes.
and I get

Code: Select all

>file out
out: data
>chmod +x out
./out
bash: ./out: cannot execute binary file
I'm not able to get an executable even with the original source code...


I searched in the forum, but was not able to find it, where do I submit the translations/code I wrote?

Re: translate kolibri

Posted: Sun Dec 02, 2012 1:13 pm
by SoUrcerer
fedesco wrote:But, when I try to compile, a program i do not get an executable file, i get a data file. For example, if I try to compile the game 15, i do
Код:
>/opt/fasm/fasm 15.ASM out
flat assembler version 1.70.03 (16384 kilobytes memory)
4 passes, 1062 bytes.

and I get
Код:
>file out
out: data
>chmod +x out
./out
bash: ./out: cannot execute binary file
Hey, it isn't true. Your "out" file is binary, but it isn't Linux binary! You should run it in Kolibri. In folder with your "out" binary launch Qemu:

Code: Select all

qemu -fda ~/kolibri.img -boot a -net nic,model=ne2k_pci -net user -hda fat:./
Note that you should have kolibri.img file in your home folder.
You'll find your dinary file at /hd0/1/ folder inside Kolibri.

You can submit your translation in any new topic :)