diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 9f329bc771..a14336f268 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -19,11 +19,45 @@ #include "imgs\toolbar.txt" #include "imgs\left_p.txt" +#ifndef AUTOBUILD +#include "lang.h--" +#endif + +#ifdef LANG_RUS + ?define T_FILE "” ©«" + ?define T_TYPE "’ЁЇ" + ?define T_SIZE "ђ §¬Ґа" + ?define T_NEW_FOLDER "Ќ®ў п Ї ЇЄ " + ?define T_NEW_FILE "Ќ®ўл© д ©«" + ?define T_DELETE_FILE "‚л ¤Ґ©б⢨⥫쭮 е®вЁвҐ г¤ «Ёвм" + ?define T_YES "„ " + ?define T_NO "ЌҐв" + ?define T_DEL_ERROR_1 "ЋиЁЎЄ . Џ ЇЄ  ­Ґ Їгбв п." + ?define T_DEL_ERROR_2 "ЋиЁЎЄ . ” ©«®ў п бЁб⥬  в®«мЄ® ¤«п з⥭Ёп." + ?define NOT_CREATE_FOLDER "ЌҐ г¤ «®бм ᮧ¤ вм Ї ЇЄг." + ?define NOT_CREATE_FILE "ЌҐ г¤ «®бм ᮧ¤ вм д ©«." + ?define ERROR_1 "ЋиЁЎЄ  ЇаЁ § Јаг§ЄҐ ЎЁЎ«Ё®вҐЄЁ /rd/1/lib/box_lib.obj" + +#else + ?define T_FILE "File" + ?define T_TYPE "Type" + ?define T_SIZE "Size" + ?define T_NEW_FOLDER "New folder" + ?define T_NEW_FILE "New file" + ?define T_DELETE_FILE "Do you really want to delete" + ?define T_YES "Yes" + ?define T_NO "No" + ?define T_DEL_ERROR_1 "Error. Folder isn't empty." + ?define T_DEL_ERROR_2 "Error. Filesystem read-only." + ?define NOT_CREATE_FOLDER "Folder can not be created." + ?define NOT_CREATE_FILE "File can not be created." + ?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj" +#endif enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir -#define TITLE "Eolite File Manager v1.91" -#define ABOUT_TITLE "Eolite v1.91" +#define TITLE "Eolite File Manager v1.92" +#define ABOUT_TITLE "Eolite v1.92" dword col_work = 0xE4DFE1; dword col_border = 0x9098B0; //A0A0B8; //0x819FC5; dword col_padding = 0xC8C9C9; @@ -75,7 +109,7 @@ void main() files.line_h=18; mem_Init(); - if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Error while loading library /rd/1/lib/box_lib.obj"); + if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1); SystemDiscsGet(); GetIni(1); if (param) @@ -377,9 +411,9 @@ void draw_window() for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); DrawLeftPanel(); //ListBox - DrawFlatButton(files.x,40,onLeft(files.x,168),16,31,col_work,"File"); - DrawFlatButton(onLeft(168,0),40,73,16,32,col_work,"Type"); - DrawFlatButton(onLeft(95,0),40,68,16,33,col_work,"Size"); + DrawFlatButton(files.x,40,onLeft(files.x,168),16,31,col_work,T_FILE); + DrawFlatButton(onLeft(168,0),40,73,16,32,col_work,T_TYPE); + DrawFlatButton(onLeft(95,0),40,68,16,33,col_work,T_SIZE); DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18"); DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19"); @@ -592,8 +626,12 @@ void Del_Form() int dform_x = files.w - 200 / 2 + files.x; //oeia ieii if (!files.count) return; + #ifdef LANG_RUS + DrawFlatButton(dform_x,160,215,80,0,col_work, ""); //oi?ia + #else DrawFlatButton(dform_x,160,200,80,0,col_work, ""); //oi?ia - WriteText(dform_x+19,175,0x80,0,"Do you really want to delete"); + #endif + WriteText(dform_x+19,175,0x80,0,T_DELETE_FILE); IF (strlen(#file_name)<28) { WriteText(strlen(#file_name)*6+dform_x+20,190,0x80,0,"?"); @@ -605,8 +643,8 @@ void Del_Form() ESI = 24; WriteText(dform_x+20,190,0,0,#file_name); //ieoai eiy } - DrawFlatButton(dform_x+20,208,70,20,301,0xFFB6B5,"Yes"); - DrawFlatButton(dform_x+111,208,70,20,302,0xC6DFC6,"No"); + DrawFlatButton(dform_x+20,208,70,20,301,0xFFB6B5,T_YES); + DrawFlatButton(dform_x+111,208,70,20,302,0xC6DFC6,T_NO); del_active=1; } @@ -620,8 +658,8 @@ void Del_File(byte dodel) IF (del_rezult) { Write_Error(del_rezult); - IF ( itdir) ShowMessage("Error. Folder isn't empty."); - IF (!itdir) ShowMessage("Error. Filesystem read-only."); + IF ( itdir) ShowMessage(T_DEL_ERROR_1); + IF (!itdir) ShowMessage(T_DEL_ERROR_2); } } del_active=0; @@ -648,7 +686,7 @@ void ReName(byte rename) if (del_rezult!=0) { Write_Error(del_rezult); - ShowMessage("Error. Folder isn't empty."); + ShowMessage(T_DEL_ERROR_1); return; } ELSE CreateDir(#temp); @@ -750,30 +788,30 @@ void FnProcess(char N) break; case 6: strcpy(#temp, #path); - strcat(#temp, "New folder"); + strcat(#temp, T_NEW_FOLDER); CreateDir(#temp); if (!EAX){ - SelectFile("New folder"); + SelectFile(T_NEW_FOLDER); FnProcess(2); } else { Write_Error(EAX); - ShowMessage("Folder can not be created."); + ShowMessage(NOT_CREATE_FOLDER); } break; case 7: strcpy(#temp, #path); - strcat(#temp, "New file"); + strcat(#temp, T_NEW_FILE); WriteFile(0, 0, #temp); if (!EAX){ - SelectFile("New file"); + SelectFile(T_NEW_FILE); FnProcess(2); } else { Write_Error(EAX); - ShowMessage("File can not be created."); + ShowMessage(NOT_CREATE_FILE); } break; case 10: //F10 diff --git a/programs/cmm/eolite/include/about_dialog.h b/programs/cmm/eolite/include/about_dialog.h index 8fb896ae90..f2cd793b89 100644 --- a/programs/cmm/eolite/include/about_dialog.h +++ b/programs/cmm/eolite/include/about_dialog.h @@ -4,6 +4,18 @@ #define BROWSER_PATH "/sys/htmlv" #define BROWSER_LINK "http://kolibri-n.org/index.php" +#ifdef LANG_RUS + ?define INTRO_TEXT_1 "Ћ Eolite" + ?define INTRO_TEXT_2 "ђ §а Ў®взЁЄЁ:" + ?define INTRO_TEXT_3 "Џ®бҐвЁвҐ" + ?define INTRO_TEXT_4 "‡ Єалвм" + +#else + ?define INTRO_TEXT_1 "About Eolite" + ?define INTRO_TEXT_2 "Developers:" + ?define INTRO_TEXT_3 "Visit" + ?define INTRO_TEXT_4 "Close" +#endif void about_dialog() { @@ -21,17 +33,25 @@ void about_dialog() break; case evReDraw: - DefineAndDrawWindow(600,150,181,232+GetSkinHeight(),0x34,col_work,"About Eolite"); + DefineAndDrawWindow(600,150,181,232+GetSkinHeight(),0x34,col_work,INTRO_TEXT_1); DrawBar(0,0,172,50,0x8494C4); PutPaletteImage(#logo,85,85,43,7,8,#logo_pal); WriteTextB(46,100,0x90,0xBF40BF,ABOUT_TITLE); - WriteText(55,120,0x80,0,"Developers:"); + #ifdef LANG_RUS + WriteText(50,120,0x80,0,INTRO_TEXT_2); + #else + WriteText(55,120,0x80,0,INTRO_TEXT_2); + #endif WriteText(39,130,0x80,0,"Leency & Veliant"); WriteText(45,140,0x80,0,"KolibriOS Team"); WriteText(61,150,0x80,0,"2008-2013"); - WriteText(29,170,0x80,0,"Visit"); - DrawLink(66,170,0x80,23, "kolibri-n.org"); - DrawFlatButton(85,190,70,22,10,0xE4DFE1, "Close"); + #ifdef LANG_RUS + WriteText(19,170,0x80,0,INTRO_TEXT_3); + #else + WriteText(29,170,0x80,0,INTRO_TEXT_3); + #endif + DrawLink(71,170,0x80,23, "kolibri-n.org"); + DrawFlatButton(85,190,70,22,10,0xE4DFE1, INTRO_TEXT_4); DrawFilledBar(0, 216, 172, 12); } } \ No newline at end of file diff --git a/programs/cmm/eolite/include/file_menu.h b/programs/cmm/eolite/include/file_menu.h index acafa05224..7a4f549afa 100644 --- a/programs/cmm/eolite/include/file_menu.h +++ b/programs/cmm/eolite/include/file_menu.h @@ -1,5 +1,21 @@ //Leency 2008-2013 +#ifdef LANG_RUS +char *captions[] = { + "ЋвЄалвм", "Enter", + "ЋвЄалвм б Ї®¬®ймо...", "CrlEnt", + "ЋвЄалвм Є Є ⥪бв", "F3", + "ЋвЄалвм ў HEX", "F4", + // + "Љ®ЇЁа®ў вм", "Crl+C", + "‚л१ вм", "Crl+X", + "‚бв ўЁвм", "Crl+V", + "ЏҐаҐЁ¬Ґ­®ў вм", "F2", + "“¤ «Ёвм", "Del", + "ЋЎ­®ўЁвм", "F5", + 0, 0}; + +#else char *captions[] = { "Open", "Enter", "Open with...", "CrlEnt", @@ -11,8 +27,9 @@ char *captions[] = { "Paste", "Crl+V", "Rename", "F2", "Delete", "Del", - //"Refresh", "F5", + "Refresh", "F5", 0, 0}; +#endif proc_info MenuForm; diff --git a/programs/cmm/eolite/include/left_panel.h b/programs/cmm/eolite/include/left_panel.h index 50a3f5d0a9..8a7057b14f 100644 --- a/programs/cmm/eolite/include/left_panel.h +++ b/programs/cmm/eolite/include/left_panel.h @@ -1,5 +1,28 @@ //Leency 2008-2013 +#ifdef LANG_RUS +char *actions[] = { + 57, "Ќ®ўл© д ©«", "F7", + 56, "Ќ®ў п Ї ЇЄ ", "F6", + 60, "Ќ бва®©ЄЁ", "F10", + 0,0,0 +}; +?define T_DEVICES "“бва®©бвў " +?define T_ACTIONS "„Ґ©бвўЁп" + +#else +char *actions[] = { + 57, "New file", "F7", + 56, "New folder", "F6", + 60, "Options", "F10", + 0,0,0 +}; + +?define T_DEVICES "Devices" +?define T_ACTIONS "Actions" +#endif + + void Tip(int y, dword caption, id, arrow) { int i; @@ -51,7 +74,7 @@ void SystemDiscsDraw() char dev_name[10], disc_name[100]; int i, dev_icon; - Tip(56, "Devices", 55, "="); + Tip(56, T_DEVICES, 55, "="); for (i=0; i<20; i++) DeleteButton(100+i); for (i=0;i