translate kolibri
-
What encoding I have to use?
Select appropriate http://www.ascii-codes.com/
Note that we use CP866 in files with russian letters, that's why text strings are located in different files.
Note that we use CP866 in files with russian letters, that's why text strings are located in different files.
Ok.
HI, it has been a while since I translated last time.
I've updated my svn local copy and made some change, now I'm trying to translate the game c4, it's not that difficult, but I've some issue with the compilation.
Looking at 15, arcanoid & arcanni the language was specified throug an external file: lang.inc, and I tried to do the same thing with this program.
1st difference: I had to compile it with nasm and not fasm
I'm not an assembler programmer, but what does it implies? Isn't the language the same?
2nd difference:
in the other source codes external file where added with the " include 'filename' " command, in this programm they are added with the " %include 'filename' " command.
Again, why this difference and what does it imply?
I created the lang.inc file and made some tries including the file with the two commands specified above, (I've made no other difference), but I can't compile the source code anymore:
1st attempt:
include 'lang.inc'
error:
c4.asm:24: error: parser: instruction expected
make: *** [it] Error 1
%include 'lang.inc'
error:
lang.inc:1: error: parser: instruction expected
make: *** [it] Error 1
how should I proceed? What I'm trying to obtain is a lang variable, so that I can write some if-else statements.
update, ok, i managed to add the language variable, the fil lang has to be something like: lang equ 'it'
and not lang fix it
but how do I write an if-else statement?
with
i obtain the following error:
thanks in advance!
I've updated my svn local copy and made some change, now I'm trying to translate the game c4, it's not that difficult, but I've some issue with the compilation.
Looking at 15, arcanoid & arcanni the language was specified throug an external file: lang.inc, and I tried to do the same thing with this program.
1st difference: I had to compile it with nasm and not fasm
I'm not an assembler programmer, but what does it implies? Isn't the language the same?
2nd difference:
in the other source codes external file where added with the " include 'filename' " command, in this programm they are added with the " %include 'filename' " command.
Again, why this difference and what does it imply?
I created the lang.inc file and made some tries including the file with the two commands specified above, (I've made no other difference), but I can't compile the source code anymore:
1st attempt:
include 'lang.inc'
error:
c4.asm:24: error: parser: instruction expected
make: *** [it] Error 1
%include 'lang.inc'
error:
lang.inc:1: error: parser: instruction expected
make: *** [it] Error 1
how should I proceed? What I'm trying to obtain is a lang variable, so that I can write some if-else statements.
update, ok, i managed to add the language variable, the fil lang has to be something like: lang equ 'it'
and not lang fix it
but how do I write an if-else statement?
with
Code: Select all
if lang equ 'it'
db "Nuova partita",0
else
db "New game",0
end if
Code: Select all
c4.asm:768: error: parser: instruction expected
c4.asm:772: error: parser: instruction expected
c4.asm:917: error: symbol `end' redefined
make: *** [it] Error 1
thanks in advance!
FASMfedesco wrote: 1st difference: I had to compile it with nasm and not fasm
I'm not an assembler programmer, but what does it implies? Isn't the language the same?
http://it.wikipedia.org/wiki/FASM
http://en.wikipedia.org/wiki/Fasm
NASM
http://it.wikipedia.org/wiki/NASM_(informatica)
http://en.wikipedia.org/wiki/Netwide_Assembler
It's different compilers Assembler. Each of them has its advantages and disadvantages. If the program is written using NASM syntax, then it can not be compiled with the compiler FASM without changes. You can change the code so that the compiler can understand it, but it takes time and extra effort.
As for your next question - is already syntaxis that uses NASM and need to read the documentation for the compiler.
Всем чмоки в этом проекте! Засуньте эти 11 лет себе в жопу!
Try this with NASM:
Code: Select all
%define lang 'it'
%if lang = 'it'
db "Nuova partita",0
%else
db "New game",0
%endif
ok, thank you very much for your response, i've compiled the program successfully with the translation, but I have still a problem.
In italian some expression are longer in englihs (i mean that the string of character are longer), and the box designed for the program are not long enough, i've attached a screenshot.
Is it ok if I simply upload the program with the translation and someone else tries to fix it (redesign partially the application) or should I try to fix it? I fear it's a little bit to much for me, I've tried to do something, but... it didnt really work
In the image you can't for example read "Nuova partita" ("new game"), but only "nuova par" or "giocatore x", but only "giocatore" ("player x", where x is 1 or 2) and "CPU livello x" but only "lo x" ("cpu level x", where x is 1, ... , 8 )
In italian some expression are longer in englihs (i mean that the string of character are longer), and the box designed for the program are not long enough, i've attached a screenshot.
Is it ok if I simply upload the program with the translation and someone else tries to fix it (redesign partially the application) or should I try to fix it? I fear it's a little bit to much for me, I've tried to do something, but... it didnt really work
In the image you can't for example read "Nuova partita" ("new game"), but only "nuova par" or "giocatore x", but only "giocatore" ("player x", where x is 1 or 2) and "CPU livello x" but only "lo x" ("cpu level x", where x is 1, ... , 8 )
- Attachments
-
-
Schermata-1.png (2.96 KiB)Viewed 4292 times
-
probably you can change the design in the same way in c4.asm like
%if lang = 'it'
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*10)
%else
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6)
%endif
%if lang = 'it'
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*10)
%else
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6)
%endif
In c4.asm:
Spoiler:
Code: Select all
; button dimensions
;..........................
%if lang = 'it'
BUTTON_NEW_WIDTH equ 56 + 28
%else
BUTTON_NEW_WIDTH equ 56
%endif
;..........................
; label dimensions
%if lang = 'it'
LABEL_PL1_X equ 90 + 10
%else
LABEL_PL1_X equ 90
%endif
;..........................
%if lang = 'it'
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6 - 4)
%else
LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6)
%endif
;..........................
label_pl1type:
istruc LABEL
at LABEL.position
%if lang = 'it'
dd MOS_DWORD(LABEL_PL1TYPE_X + 18,LABEL_PL1TYPE_Y)
%else
dd MOS_DWORD(LABEL_PL1TYPE_X,LABEL_PL1TYPE_Y)
%endif
dd playertypes+PL1TYPE_INIT*PLAYERTYPELEN
dd MOS_RGB(255,255,255)
dd MOS_RGB(0,0,0)
iend
label_pl2type:
istruc LABEL
at LABEL.position
%if lang = 'it'
dd MOS_DWORD(LABEL_PL2TYPE_X + 18,LABEL_PL2TYPE_Y)
%else
dd MOS_DWORD(LABEL_PL2TYPE_X,LABEL_PL2TYPE_Y)
%endif
dd playertypes+PL2TYPE_INIT*PLAYERTYPELEN
dd MOS_RGB(255,255,255)
dd MOS_RGB(0,0,0)
iend
Spoiler:
Ok, thank you very much for the help, but I still have some problem with the dimension of the images, probably I forgot something, even if I checked the code more times, I'll attach it...
Again; thank you very much!
Again; thank you very much!
- Attachments
-
-
Schermata.png (2.38 KiB)Viewed 4276 times
-
c4.asm (20.22 KiB)Downloaded 157 times
-
Ok, somehow I managed to solve the issue with spacing an the languages, thank you very much
Now kernel sources are in UTF; binary still uses 1-byte codepages. You can change message encodings use FASM macros.
Seriously? That is a great news!SoUrcerer wrote:Now kernel sources are in UTF; binary still uses 1-byte codepages. You can change message encodings use FASM macros.
Yeah. USB stack in trunk now too, and may be even network branch
Good work SoUrcerer!
Who is online
Users browsing this forum: No registered users and 3 guests