More language code fixes

I commit in several commits to check autobuild
This commit is contained in:
2024-06-02 04:51:22 +01:00
parent e23778f306
commit 66816d7a7e
25 changed files with 43 additions and 43 deletions

View File

@@ -1,12 +1,12 @@
if tup.getconfig('NO_JWASM') ~= "" then return end if tup.getconfig('NO_JWASM') ~= "" then return end
if tup.getconfig("LANG") == "it" then if tup.getconfig("LANG") == "it_IT" then
tup.definerule{command = "echo LANG_IT = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_IT = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "sp" then elseif tup.getconfig("LANG") == "es_ES" then
tup.definerule{command = "echo LANG_SP = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_SP = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "ru" then elseif tup.getconfig("LANG") == "ru_RU" then
tup.definerule{command = "echo LANG_RU = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_RU = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "en" then elseif tup.getconfig("LANG") == "en_US" then
tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}}
else else
tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}}

View File

@@ -3,7 +3,7 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")
INCLUDES = INCLUDES .. "-I" .. tup.getvariantdir() INCLUDES = INCLUDES .. "-I" .. tup.getvariantdir()
LDFLAGS = LDFLAGS .. " -T kolibri.ld" LDFLAGS = LDFLAGS .. " -T kolibri.ld"
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_CMM") ~= "" then return end if tup.getconfig("NO_CMM") ~= "" then return end
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end

View File

@@ -3,7 +3,7 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")
tup.include(HELPERDIR .. "/use_newlib.lua") tup.include(HELPERDIR .. "/use_newlib.lua")
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_CMM") ~= "" then return end if tup.getconfig("NO_CMM") ~= "" then return end
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end

View File

@@ -1,7 +1,7 @@
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_MSVC") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_MSVC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_msvc.lua") tup.include(HELPERDIR .. "/use_msvc.lua")
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then CFLAGS = CFLAGS .. " /DLANG=RUS" then CFLAGS = CFLAGS .. " /DLANG=RUS"
else CFLAGS = CFLAGS .. " /DLANG=ENG" else CFLAGS = CFLAGS .. " /DLANG=ENG"
end end

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_CMM") ~= "" then return end if tup.getconfig("NO_CMM") ~= "" then return end
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end

View File

@@ -6,10 +6,10 @@ tup.include(HELPERDIR .. "/use_sound.lua")
LDFLAGS = LDFLAGS .. " -T kolibri.ld" LDFLAGS = LDFLAGS .. " -T kolibri.ld"
tup.append_table(OBJS, tup.rule("start.asm", "fasm %f %o", "start.o")) tup.append_table(OBJS, tup.rule("start.asm", "fasm %f %o", "start.o"))
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RU" then C_LANG = "LANG_RU"
elseif tup.getconfig("LANG") == "sp" elseif tup.getconfig("LANG") == "es_ES"
then C_LANG = "LANG_SP" -- just for example, other languages are not implemented then C_LANG = "LANG_SP" -- just for example, other languages are not implemented
else C_LANG = "LANG_EN" -- default language is English else C_LANG = "LANG_EN" -- default language is English

View File

@@ -1,9 +1,9 @@
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_MSVC") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_MSVC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_msvc.lua") tup.include(HELPERDIR .. "/use_msvc.lua")
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then CFLAGS = CFLAGS .. " /DLANG=RUS" then CFLAGS += " /DLANG=RUS"
else CFLAGS = CFLAGS .. " /DLANG=ENG" else CFLAGS += " /DLANG=ENG"
end end
compile_msvc{"kosilka.cpp", "KosFile.cpp", "kosSyst.cpp", "mcsmemm.cpp"} compile_msvc{"kosilka.cpp", "KosFile.cpp", "kosSyst.cpp", "mcsmemm.cpp"}
link_msvc("kosilka") link_msvc("kosilka")

View File

@@ -6,10 +6,10 @@ tup.include(HELPERDIR .. "/use_sound.lua")
LDFLAGS = LDFLAGS .. " -T kolibri.ld" LDFLAGS = LDFLAGS .. " -T kolibri.ld"
tup.append_table(OBJS, tup.rule("start.asm", "fasm %f %o", "start.o")) tup.append_table(OBJS, tup.rule("start.asm", "fasm %f %o", "start.o"))
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RU" then C_LANG = "LANG_RU"
elseif tup.getconfig("LANG") == "sp" elseif tup.getconfig("LANG") == "es_ES"
then C_LANG = "LANG_SP" -- just for example, other languages are not implemented then C_LANG = "LANG_SP" -- just for example, other languages are not implemented
else C_LANG = "LANG_EN" -- default language is English else C_LANG = "LANG_EN" -- default language is English

View File

@@ -1,7 +1,7 @@
if tup.getconfig("NO_MSVC") ~= "" then return end if tup.getconfig("NO_MSVC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_msvc.lua") tup.include(HELPERDIR .. "/use_msvc.lua")
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then CFLAGS = CFLAGS .. " /DLANG=RUS" then CFLAGS = CFLAGS .. " /DLANG=RUS"
else CFLAGS = CFLAGS .. " /DLANG=ENG" else CFLAGS = CFLAGS .. " /DLANG=ENG"
end end

View File

@@ -33,7 +33,7 @@ align 4
open_b rb 560 open_b rb 560
txt_err_img_file: txt_err_img_file:
if lang eq ru if lang eq ru_RU
db '<27><EFBFBD><E8A8A1> N' db '<27><EFBFBD><E8A8A1> N'
.n: db '* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨨ 䠩<><E4A0A9> ' .n: db '* <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⨨ 䠩<><E4A0A9> '
else else
@@ -181,4 +181,4 @@ end if
mov [buf],eax mov [buf],eax
stdcall [img_to_rgb2], ebx,[buf] ;<EFBFBD><EFBFBD>ࠧ㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> rgb stdcall [img_to_rgb2], ebx,[buf] ;<EFBFBD><EFBFBD>ࠧ㥬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> rgb
stdcall [img_destroy], ebx ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> stdcall [img_destroy], ebx ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
} }

View File

@@ -1,6 +1,6 @@
; Timer with three buttons ; ; Timer with three buttons ;
; %define lang "ru" ; %define lang "ru_RU"
; %define lang "it" ; %define lang "it_IT"
ORG 0 ORG 0
BITS 32 BITS 32
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
@@ -88,7 +88,7 @@ ButtonEvents:
.pause dd EmptyProc ; at start Pause must not work .pause dd EmptyProc ; at start Pause must not work
.reset dd On_ButtonReset .reset dd On_ButtonReset
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
%ifidn lang, "ru" %ifidn lang, "ru_RU"
sz_timer db "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",0 sz_timer db "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",0
sz_start: db "<22><><EFBFBD><EFBFBD><EFBFBD>" sz_start: db "<22><><EFBFBD><EFBFBD><EFBFBD>"
@@ -97,7 +97,7 @@ ButtonEvents:
.end: db 0 .end: db 0
sz_reset: db "<22><><EFBFBD><EFBFBD><EFBFBD>" sz_reset: db "<22><><EFBFBD><EFBFBD><EFBFBD>"
.end: db 0 .end: db 0
%elifidn lang, "it" %elifidn lang, "it_IT"
sz_timer db "Timer",0 sz_timer db "Timer",0
sz_start: db "lancio" sz_start: db "lancio"
@@ -390,4 +390,4 @@ TimerStarted:
EmptyProc: EmptyProc:
ret ret
; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- ;
END: END:

View File

@@ -3,6 +3,6 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"}) tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru_RU" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"cnc_control.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "cnc_control") tup.rule({"cnc_control.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "cnc_control")

View File

@@ -1,5 +1,5 @@
@echo lang fix ru >lang.inc @echo lang fix ru_RU >lang.inc
@fasm.exe -m 16384 cnc_control.asm cnc_control @fasm.exe -m 16384 cnc_control.asm cnc_control
@erase lang.inc @erase lang.inc
@kpack cnc_control @kpack cnc_control
@pause @pause

View File

@@ -56,7 +56,7 @@ txt_err_no_1_point_sel db '
txt_min_x db 'min x: ',0 txt_min_x db 'min x: ',0
txt_min_y db 'min y: ',0 txt_min_y db 'min y: ',0
if lang eq ru if lang eq ru_RU
; ;
; rus ; rus
; ;

View File

@@ -2,8 +2,8 @@ if not exist bin mkdir bin
@copy *.nc bin\*.nc @copy *.nc bin\*.nc
@erase lang.inc @erase lang.inc
@echo lang fix ru >lang.inc @echo lang fix ru_RU >lang.inc
@fasm.exe -m 32768 cnc_editor.asm bin\cnc_editor.kex @fasm.exe -m 32768 cnc_editor.asm bin\cnc_editor.kex
@kpack bin\cnc_editor.kex @kpack bin\cnc_editor.kex
pause pause

View File

@@ -56,7 +56,7 @@ txt_err_no_1_point_sel db '
txt_min_x db 'min x: ',0 txt_min_x db 'min x: ',0
txt_min_y db 'min y: ',0 txt_min_y db 'min y: ',0
if lang eq ru if lang eq ru_RU
; ;
; rus ; rus
; ;

View File

@@ -572,7 +572,7 @@ txt_05: db 'G0 Z'
txt_06: db 'G0 M5 X0 Y0 Z' txt_06: db 'G0 M5 X0 Y0 Z'
.z: rb 12 .z: rb 12
if lang eq ru if lang eq ru_RU
capt_n_file db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><>',0 capt_n_file db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><>',0
capt_sel_fig db '<27><EFBFBD><EBA1A5><EFBFBD><EFBFBD><><E4A8A3><EFBFBD>:',0 capt_sel_fig db '<27><EFBFBD><EBA1A5><EFBFBD><EFBFBD><><E4A8A3><EFBFBD>:',0
txt_circle: db '<27><><EFBFBD><EFBFBD><E3A6AD><EFBFBD><EFBFBD>' txt_circle: db '<27><><EFBFBD><EFBFBD><E3A6AD><EFBFBD><EFBFBD>'
@@ -586,4 +586,4 @@ txt_circle: db 'Circle'
.end: db 0 .end: db 0
txt_rect: db 'Rectangle' txt_rect: db 'Rectangle'
.end: db 0 .end: db 0
end if end if

View File

@@ -268,7 +268,7 @@ endp
align 4 align 4
capt_p rb 64 capt_p rb 64
if lang eq ru if lang eq ru_RU
capt_fig: db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ',39 capt_fig: db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ',39
.name: rb 55 .name: rb 55
capt_poi: db '<27><>窠: ' capt_poi: db '<27><>窠: '

View File

@@ -167,7 +167,7 @@ proc timer_funct_scale
endp endp
align 4 align 4
if lang eq ru if lang eq ru_RU
capt_opt db '<27><><EFBFBD><EFBFBD><EFBFBD><E0AEA9>',0 capt_opt db '<27><><EFBFBD><EFBFBD><EFBFBD><E0AEA9>',0
capt_sc db '<27><><EFBFBD><EFBFBD>⠡:',0 capt_sc db '<27><><EFBFBD><EFBFBD>⠡:',0
else else

View File

@@ -1,12 +1,12 @@
if tup.getconfig('NO_JWASM') ~= "" or tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig('NO_JWASM') ~= "" or tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("LANG") == "it" then if tup.getconfig("LANG") == "it_IT" then
tup.definerule{command = "echo LANG_IT = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_IT = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "sp" then elseif tup.getconfig("LANG") == "es_ES" then
tup.definerule{command = "echo LANG_SP = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_SP = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "ru" then elseif tup.getconfig("LANG") == "ru_RU" then
tup.definerule{command = "echo LANG_RU = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_RU = 1 > %o", outputs = {"lang.inc"}}
elseif tup.getconfig("LANG") == "en" then elseif tup.getconfig("LANG") == "en_US" then
tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}}
else else
tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_EN = 1 > %o", outputs = {"lang.inc"}}

View File

@@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"}) tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "ru_RU" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"format.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "FORMAT") tup.rule({"format.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "FORMAT")

View File

@@ -346,7 +346,7 @@ ch2 check_box2 Otstup shl 16 + 12, (190+dy) shl 16 + 12, 6, 0xFFFFFFFF, 0xAABBCC
browse db '...', 0 browse db '...', 0
if lang eq ru ;RU language if lang eq ru_RU ;RU language
title db "Formatting Disk Utility", 0 title db "Formatting Disk Utility", 0

View File

@@ -4,7 +4,7 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_tcc.lua") tup.include(HELPERDIR .. "/use_tcc.lua")
CFLAGS += " -I" .. tup.getvariantdir() CFLAGS += " -I" .. tup.getvariantdir()
if tup.getconfig("LANG") == "ru" if tup.getconfig("LANG") == "ru_RU"
then C_LANG = "LANG_RUS" then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config else C_LANG = "LANG_ENG" -- this includes default case without config
end end