Board.KolibriOS.org

Official KolibriOS board
It is currently Fri Nov 28, 2014 1:43 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 288 posts ]  Go to page 1 2 3 4 5 ... 20  Next
Author Message
 Post subject: translate kolibri
PostPosted: Wed Sep 07, 2011 11:42 pm 
Offline

Joined: Wed Sep 07, 2011 10:00 pm
Posts: 54
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!


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 8:24 am 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
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;)

_________________
Image


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 8:42 am 
Offline

Joined: Wed Sep 07, 2011 10:00 pm
Posts: 54
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 ...


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 8:57 am 
Offline
User avatar

Joined: Wed Aug 18, 2010 5:38 pm
Posts: 102
Location: St.Petersburg, Russia.
.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.
Quote:
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 ;)

Quote:
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.


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 9:48 am 
Offline
User avatar

Joined: Fri Jun 27, 2008 3:22 pm
Posts: 963
Location: Kyrgyzstan, Bishkek
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
Attachment:

In Russian
Attachment:


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 9:53 am 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
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).

_________________
Image


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 2:59 pm 
Offline
UniEnv Guy
User avatar

Joined: Tue May 08, 2007 12:44 am
Posts: 327
Location: Санкт-Петербург
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.

_________________
@Veresk: Ну вот есть у сервера IPv6. И что с ним такого сделать, чтоб кошерно было?
@Graf: Настрой в кроне выключение по субботам


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 3:48 pm 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
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:
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.

_________________
Image


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 3:55 pm 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
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 :)

_________________
Image


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 5:53 pm 
Offline
UniEnv Guy
User avatar

Joined: Tue May 08, 2007 12:44 am
Posts: 327
Location: Санкт-Петербург
I prefer more general solution -- one encoding/charset per file.
Code:
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.

_________________
@Veresk: Ну вот есть у сервера IPv6. И что с ним такого сделать, чтоб кошерно было?
@Graf: Настрой в кроне выключение по субботам


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 5:56 pm 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
As for me, it's good decision, but this method require code refactoring of tens programs.

_________________
Image


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Thu Sep 08, 2011 6:44 pm 
Offline

Joined: Wed Sep 07, 2011 10:00 pm
Posts: 54
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:
‡ ¬¥ç ­šï


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...)


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Mon Sep 12, 2011 6:27 pm 
Offline
Just Flooding

Joined: Sat Jan 06, 2007 2:30 pm
Posts: 269
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?


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Sun Dec 02, 2012 12:59 pm 
Offline

Joined: Wed Sep 07, 2011 10:00 pm
Posts: 54
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:
>/opt/fasm/fasm 15.ASM out
flat assembler  version 1.70.03  (16384 kilobytes memory)
4 passes, 1062 bytes.

and I get
Code:
>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?


Top
 Profile  
 
 Post subject: Re: translate kolibri
PostPosted: Sun Dec 02, 2012 1:13 pm 
Offline
User avatar

Joined: Mon Sep 24, 2007 11:11 am
Posts: 2803
Location: Москва
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:
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 :)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 288 posts ]  Go to page 1 2 3 4 5 ... 20  Next

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Mobile version