Add English localization and configs for RUS or ENG build

git-svn-id: svn://kolibrios.org@6361 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
cheptil 2016-03-22 12:29:16 +00:00
parent fbd634739b
commit b51837d38b
4 changed files with 64 additions and 10 deletions

View File

@ -4,6 +4,34 @@
//#include "..\lib\kolibri.h--" //¯®¤ª«îç ¥¬ ¡¨¡«¨®â¥ªã á KolibriOS API //#include "..\lib\kolibri.h--" //¯®¤ª«îç ¥¬ ¡¨¡«¨®â¥ªã á KolibriOS API
#include "kolibri.h--" #include "kolibri.h--"
#ifndef AUTOBUILD
#include "lang.h--"
#endif
#ifdef LANG_RUS
?define TOP_TEXT_COL 4
?define TOP_TEXT "‘®¡¥à¨â¥ ¢á¥ ç¨á«  ®â 10 ¤® 90 ¯® ¯®à浪ã..."
?define BOT_LEFT_TEXT_COL 4
?define BOT_LEFT_TEXT "ˆé¥¬ ç¨á«®: "
?define BOT_RIGHT_TEXT_COL 162
?define BOT_RIGHT_TEXT "Žáâ «®áì ­ ©â¨: "
?define BOT_LEFT_NUMBER_COL 70
?define BOT_RIGHT_NUMBER_COL 252
?define F2_TEXT "‡ ­®¢® (F2)"
?define WIN_TEXT "‚ë ­ è«¨ ¢á¥ ç¨á« ! :)"
#else
?define TOP_TEXT_COL 2
?define TOP_TEXT "Collect all numbers from 10 to 90 in order..."
?define BOT_LEFT_TEXT_COL 2
?define BOT_LEFT_TEXT "Looking for number: "
?define BOT_RIGHT_TEXT_COL 156
?define BOT_RIGHT_TEXT "Remains to find: "
?define BOT_LEFT_NUMBER_COL 116
?define BOT_RIGHT_NUMBER_COL 252
?define F2_TEXT "Anew (F2)"
?define WIN_TEXT "You have found all numbers! :)"
#endif
int find=10; int find=10;
struct struct
{ {
@ -86,18 +114,18 @@ void draw_window()
DrawBar(0,299,271,1,0x0CFF0C); //«¨­¨ï á­¨§ã DrawBar(0,299,271,1,0x0CFF0C); //«¨­¨ï á­¨§ã
if (find<=90) if (find<=90)
{ {
WriteText(4,4,0x80,0x000000,"‘®¡¥à¨â¥ ¢á¥ ç¨á«  ®â 10 ¤® 90 ¯® ¯®à浪ã..."); WriteText(TOP_TEXT_COL,4,0x80,0x000000,TOP_TEXT);
WriteText(4,289,0x80,0x000000,"ˆé¥¬ ç¨á«®: "); WriteText(BOT_LEFT_TEXT_COL,289,0x80,0x000000,BOT_LEFT_TEXT);
WriteText(162,289,0x80,0x000000,"Žáâ «®áì ­ ©â¨: "); WriteText(BOT_RIGHT_TEXT_COL,289,0x80,0x000000,BOT_RIGHT_TEXT);
WriteNumber(70,289,0x80,0,find); WriteNumber(BOT_LEFT_NUMBER_COL,289,0x80,0,find);
WriteNumber(252,289,0x80,0,90-find+1); WriteNumber(BOT_RIGHT_NUMBER_COL,289,0x80,0,90-find+1);
DrawFlatButton(155,300,115,14,582,0xAFFFAF,"‡ ­®¢® (F2)"); DrawFlatButton(155,300,115,14,582,0xAFFFAF,F2_TEXT);
WriteText(4,304,0x80,0x000000,"Made by Artemonische,2010"); WriteText(2,304,0x80,0x000000,"Made by Artemonische,2010");
} }
IF (find==91) IF (find==91)
{ {
WriteText(70,100,0x80,0x000000,"‚ë ­ è«¨ ¢á¥ ç¨á« ! :)"); WriteText(70,100,0x80,0x000000,WIN_TEXT);
DrawFlatButton(100,110,70,20,582,0xE4DFE1,"‡ ­®¢® (F2)"); DrawFlatButton(100,110,70,20,582,0xE4DFE1,F2_TEXT);
} }
WindowRedrawStatus(2); //ª®­¥æ ¯¥à¥à¨á®¢ª¨ ®ª­  WindowRedrawStatus(2); //ª®­¥æ ¯¥à¥à¨á®¢ª¨ ®ª­ 
} }

View File

@ -1,2 +1,6 @@
if tup.getconfig("NO_CMM") ~= "" then return end if tup.getconfig("NO_CMM") ~= "" then return end
tup.rule("FindNumbers.c--", "c-- %f" .. tup.getconfig("KPACK_CMD"), "FindNumbers") if tup.getconfig("LANG") == "ru"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
tup.rule("FindNumbers.c--", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "FindNumbers.com")

View File

@ -0,0 +1,11 @@
@del lang.h--
@echo #define LANG_ENG 1 >lang.h--
@del FindNumbers
cls
@C-- "FindNumbers.c--"
@rename FindNumbers.com FindNumbers
@del warning.txt
@del lang.h--
@pause

View File

@ -0,0 +1,11 @@
@del lang.h--
@echo #define LANG_RUS 1 >lang.h--
@del FindNumbers
cls
@C-- "FindNumbers.c--"
@rename FindNumbers.com FindNumbers
@del warning.txt
@del lang.h--
@pause