Browse Source

fixed: in WmCommand_EditCopyBoth() the was not a buffer size info set

updated: russian and spanish translations


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@240 e52654a7-88a9-db11-a3e9-0013d4bc506e
master
Tomasz Sowa 13 years ago
parent
commit
eeb5930120
  1. 196
      src/languages.cpp
  2. 11
      src/mainwindow.cpp

196
src/languages.cpp

@ -510,13 +510,16 @@ void Languages::InitGuiMessagesTab()
"\r\n"
#endif
"Translations:\r\n"
"English Author\r\n" // one tabulator between language and the name of the author
"Polish Author\r\n"
"Spanish Alejandro S. Valdezate <alesanval@gmail.com>\r\n"
"Danish Rune Bisgaard Vammen <runebisgaard@gmail.com>\r\n"
"Chinese Juis <zsyfly@gmail.com>\r\n"
"Russian Vladimir Gladilovich <vdgladilovich@gmail.com>\r\n"
"Swedish Lars 'Bafvert' Gafvert <lars.gafvert@gmail.com>\r\n"
"Spanish Alejandro S. Valdezate\r\n"
" alesanval@gmail.com\r\n"
"Danish Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n"
"Chinese Juis\r\n"
" zsyfly@gmail.com\r\n"
"Russian Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n"
"Swedish Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
);
InsertGuiPair(about_text_portable_version, " portable version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.03\r\n");
@ -702,13 +705,16 @@ void Languages::InitGuiMessagesTab()
"\r\n"
#endif
"T³umaczenie:\r\n"
"Angielski Author\r\n" // tab + two spaces
"Polski Author\r\n"
"Hiszpañski Alejandro S. Valdezate <alesanval@gmail.com>\r\n" // only one space
"Duñski Rune Bisgaard Vammen <runebisgaard@gmail.com>\r\n"
"Chiñski Juis <zsyfly@gmail.com>\r\n"
"Rosyjski Vladimir Gladilovich <vdgladilovich@gmail.com>\r\n"
"Szwedzki Lars 'Bafvert' Gafvert <lars.gafvert@gmail.com>\r\n"
"Hiszpañski Alejandro S. Valdezate\r\n"
" alesanval@gmail.com\r\n"
"Duñski Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n"
"Chiñski Juis\r\n"
" zsyfly@gmail.com\r\n"
"Rosyjski Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n"
"Szwedzki Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
);
InsertGuiPair(about_text_portable_version, " wersja portable");
InsertGuiPair(about_text_exe_packer, "Paker exe: UPX 3.03\r\n");
@ -819,20 +825,21 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_always_scientific,"Siempre");
InsertGuiPair(display_not_always_scientific,"Cuando el exponente es mas grande que:");
InsertGuiPair(display_group_scientific, "Imprimir el resultado como valor cientifico");
InsertGuiPair(display_deg_rad_grad, "Trigonometric functions");
InsertGuiPair(display_deg_rad_grad, "Funciones trigonométricas");
InsertGuiPair(display_grouping, "Agrupar"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "Ninguno");
InsertGuiPair(display_grouping_space, "Espacio");
InsertGuiPair(display_input_decimal_point, "Símbolo de punto decimal en formula"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . o ,");
InsertGuiPair(display_output_decimal_point, "Símbolo de punto decimal en resultado"); // Decimal point in result
InsertGuiPair(display_param_sep, "Parametros separados por");
InsertGuiPair(display_param_sep_item2, " ; o .");
InsertGuiPair(display_param_sep_item3, " ; o ,");
InsertGuiPair(convert_type, "Tipo");
InsertGuiPair(convert_input, "Entrada");
InsertGuiPair(convert_output, "Salida");
InsertGuiPair(convert_dynamic_output, "Auto prefijo");
InsertGuiPair(display_grouping, "Grouping");
InsertGuiPair(display_grouping_none, "None");
InsertGuiPair(display_grouping_space, "Space");
InsertGuiPair(display_input_decimal_point, "Input decimal point");
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "Output decimal point");
InsertGuiPair(display_param_sep, "Parameters separated by");
InsertGuiPair(display_param_sep_item2, " ; or .");
InsertGuiPair(display_param_sep_item3, " ; or ,");
InsertGuiPair(menu_view, "&Ver");
InsertGuiPair(menu_edit, "&Editar");
@ -843,29 +850,31 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_compact_view, "Vista C&ompacta");
InsertGuiPair(menu_view_always_on_top, "&Siempre arriba");
InsertGuiPair(menu_view_pad, "&Pad");
InsertGuiPair(menu_view_lang_english, "&Ingles");
InsertGuiPair(menu_view_lang_english, "&Inglés");
InsertGuiPair(menu_view_lang_polish, "&Polaco");
InsertGuiPair(menu_view_lang_spanish, "&Español");
InsertGuiPair(menu_view_lang_danish, "&Danés"); // 'Danés' is a correct translation for 'Danish'?
InsertGuiPair(menu_view_lang_chinese, "&Chino"); // 'Chino' is a correct translation for 'Chinese'?
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "&Swedish");
InsertGuiPair(menu_view_lang_danish, "&Danés");
InsertGuiPair(menu_view_lang_chinese, "&Chino");
InsertGuiPair(menu_view_lang_russian, "&Ruso");
InsertGuiPair(menu_view_lang_swedish, "&Sueco");
InsertGuiPair(menu_view_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Deshacer");
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
InsertGuiPair(menu_edit_copy, "&Copy \tCtrl+C");
InsertGuiPair(menu_edit_paste, "&Paste");
InsertGuiPair(menu_edit_del, "&Delete \tDel");
InsertGuiPair(menu_edit_paste_formula, "&Pegar");
InsertGuiPair(menu_edit_undo, "&Deshacer \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Cor&tar \tCtrl+X");
InsertGuiPair(menu_edit_copy, "&Copiar \tCtrl+C");
InsertGuiPair(menu_edit_paste, "&Pegar"); // cutting, copying, pasting the the edit which has a focus
InsertGuiPair(menu_edit_del, "&Borrar \tDel");
InsertGuiPair(menu_edit_copy_result, "&Copiar resultado");
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B");
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
InsertGuiPair(menu_edit_bracket, "Bracke&t \tCtrl+0");
InsertGuiPair(menu_edit_copy_both, "Copiar &ambos \tCtrl+B"); // copying in this way: "input edit = output edit"
InsertGuiPair(menu_edit_paste_formula, "Pegar &fórmula\tCtrl+V"); // pasting directly to the input edit
InsertGuiPair(menu_edit_select_all, "Seleccionar &todo \tEsc");
InsertGuiPair(menu_edit_bracket, "Corche&tes \tCtrl+0"); // inserting brackets: (...)
InsertGuiPair(menu_update_available, "Una &nueva versión está disponible"); // not implemented yet
InsertGuiPair(menu_help_help, "&Ayuda");
InsertGuiPair(menu_help_project_page, "&Pagina del proyecto");
InsertGuiPair(menu_help_check_update, "&Check update...");
InsertGuiPair(menu_help_check_update, "&Comprobar actualizaciones...");
InsertGuiPair(menu_help_about, "&Acerca de");
InsertGuiPair(menu_update_available, "&New version is available");
InsertGuiPair(cant_init_calculations, "No se puede inicializar el modulo de calculo");
InsertGuiPair(message_box_error_caption,"TTCalc");
@ -894,14 +903,17 @@ void Languages::InitGuiMessagesTab()
"mantisa y 32 bits para el exponente) que es aproximadamente +/-6.9e+646457021.\r\n"
"\r\n"
#endif
"Translations:\r\n"
"English Author\r\n" // one tabulator between language and the name of the author
"Polish Author\r\n"
"Spanish Alejandro S. Valdezate <alesanval@gmail.com>\r\n"
"Danish Rune Bisgaard Vammen <runebisgaard@gmail.com>\r\n"
"Chinese Juis <zsyfly@gmail.com>\r\n"
"Russian Vladimir Gladilovich <vdgladilovich@gmail.com>\r\n"
"Swedish Lars 'Bafvert' Gafvert <lars.gafvert@gmail.com>\r\n"
"Traducciones:\r\n"
"Español Alejandro Valdezate\r\n"
" valdezate@gmail.com\r\n"
"Danes Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n"
"Chino Juis\r\n"
" zsyfly@gmail.com\r\n"
"Ruso Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n"
"Sueco Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
);
InsertGuiPair(about_text_portable_version, " version portatil");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.03\r\n");
@ -910,37 +922,38 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(unknown_error, "Ocurrio un error desconocido");
InsertGuiPair(cant_find_help, "No se encuentran los ficheros de ayuda");
InsertGuiPair(cant_open_project_page, "No se puede abrir la pagina dle proyecto");
InsertGuiPair(update_title, "Check for a new version");
InsertGuiPair(update_button_next, "Next");
InsertGuiPair(update_button_finish, "Finish");
InsertGuiPair(update_button_cancel, "Cancel");
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download...");
InsertGuiPair(update_no_new_version, "There is not a new version available.");
InsertGuiPair(update_download_from, "Downloading from...");
InsertGuiPair(update_title, "Comprobar si hay alguna version nueva");
InsertGuiPair(update_button_next, "Siguiente");
InsertGuiPair(update_button_finish, "Finalizar");
InsertGuiPair(update_button_cancel, "Cancelar");
InsertGuiPair(update_check_at_startup, "Siempre comprobar si hay una nueva versión al comenzar");
InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones...");
InsertGuiPair(update_is_new_version, "La versión %d.%d.%d está disponible, pulse Siguiente para descargar...");
InsertGuiPair(update_no_new_version, "No hay versiones nuevas disponibles.");
InsertGuiPair(update_download_from, "Descargando desde...");
#ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
InsertGuiPair(update_downloaded_info2, "Press Finish to close TTCalc and run the installer.");
InsertGuiPair(update_downloaded_info1, "Un nuevo programa de instalación ha sido descargado.");
InsertGuiPair(update_downloaded_info2, "Pulse Finalizar para cerrar TTCalc y ejecutar el programa de instalación.");
#else
InsertGuiPair(update_downloaded_info1, "A new version of TTCalc has been downloaded.");
InsertGuiPair(update_downloaded_info1, "Una versión nueva de TTCalc ha sido descargada.");
InsertGuiPair(update_downloaded_info2, "");
#endif
InsertGuiPair(update_download_error, "There was a problem with downloading, please try again later.");
InsertGuiPair(update_download_error, "Hubo un problema durante la descarga. Por favor, inténtelo mas tarde.");
InsertGuiPair(pad_title, "Pad");
InsertGuiPair(pad_menu_file, "&File");
InsertGuiPair(pad_menu_edit, "&Edit");
InsertGuiPair(pad_menu_file_new, "&New"); // temporarily not used
InsertGuiPair(pad_menu_file_open, "&Open...");
InsertGuiPair(pad_menu_file_saveas, "Save &as...");
InsertGuiPair(pad_menu_file_close, "&Close");
InsertGuiPair(pad_menu_edit_undo, "&Undo \tCtrl+Z");
InsertGuiPair(pad_menu_edit_cut, "Cu&t \tCtrl+X");
InsertGuiPair(pad_menu_edit_copy, "&Copy \tCtrl+C");
InsertGuiPair(pad_menu_edit_paste, "&Paste \tCtrl+V");
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
InsertGuiPair(pad_menu_edit_select_all, "Select &all \tCtrl+A");
InsertGuiPair(pad_menu_file, "&Archivo");
InsertGuiPair(pad_menu_edit, "&Editar");
InsertGuiPair(pad_menu_file_new, "&Nuevo"); // temporarily not used
InsertGuiPair(pad_menu_file_open, "&Abrir...");
InsertGuiPair(pad_menu_file_saveas, "Guardar &como...");
InsertGuiPair(pad_menu_file_close, "&Cerrar");
InsertGuiPair(pad_menu_edit_undo, "&Deshacer \tCtrl+Z");
InsertGuiPair(pad_menu_edit_cut, "Cor&tar \tCtrl+X");
InsertGuiPair(pad_menu_edit_copy, "&Copiar \tCtrl+C");
InsertGuiPair(pad_menu_edit_paste, "&Pegar \tCtrl+V");
InsertGuiPair(pad_menu_edit_del, "&Borrar \tDel");
InsertGuiPair(pad_menu_edit_select_all, "Seleccionar &todo \tCtrl+A");
@ -1389,14 +1402,15 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_always_scientific,"Âñåãäà");
InsertGuiPair(display_not_always_scientific,"Êîãäà ïîêàçàòåëü ñòåïåíè áîëüøå");
InsertGuiPair(display_group_scientific, "Âûâîäèòü ðåçóëüòàò â ýêñïîíåíöèàëüíîì âèäå");
InsertGuiPair(display_deg_rad_grad, "Òðèãîíîìåòðè÷åñêèå ôóíêöèè");
InsertGuiPair(display_grouping, "Ãðóïïèðîâàíèå"); // e.g. 1`000`000
InsertGuiPair(display_deg_rad_grad, "Òðèãîíîìåòðèÿ");
InsertGuiPair(display_grouping, "Ðàçä. ãðóïï"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "Íè÷åãî");
InsertGuiPair(display_grouping_space, "Ïðîáåë");
InsertGuiPair(display_input_decimal_point, "Äåñÿòè÷íàÿ òî÷êà ïðè ââîäå"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point, "Äåñÿòè÷íàÿ òî÷êà (ââîä)"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . èëè ,");
InsertGuiPair(display_output_decimal_point, "Äåñÿòè÷íàÿ òî÷êà ïðè âûâîäå"); // Decimal point in result
InsertGuiPair(display_param_sep, "Ïàðàìåòðû ðàçäåëåíû:");
InsertGuiPair(display_output_decimal_point, "Äåñÿòè÷íàÿ òî÷êà (âûâîä)"); // Decimal point in result
InsertGuiPair(display_param_sep, "Ïàðàìåòðû ðàçäåëÿþòñÿ");
InsertGuiPair(display_param_sep_item2, " ; èëè .");
InsertGuiPair(display_param_sep_item3, " ; èëè ,");
@ -1424,12 +1438,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_close_program, "&Çàêðûòü");
InsertGuiPair(menu_edit_undo, "&Îòìåíèòü äåéñòâèå \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Âû&ðåçàòü \tCtrl+X");
InsertGuiPair(menu_edit_copy, "&Êîïèðîâàòü \tCtrl+C");
InsertGuiPair(menu_edit_paste, "&Âñòàâèòü"); // cutting, copying, pasting the the edit which has a focus
InsertGuiPair(menu_edit_paste, "&Âñòàâèòü"); // cutting, copying, pasting the the edit which has a focus
InsertGuiPair(menu_edit_del, "&Óäàëèòü \tDel");
InsertGuiPair(menu_edit_copy_result, "&Êîïèðîâàòü ðåçóëüòàò");
InsertGuiPair(menu_edit_copy_both, "Êîïèðîâàòü ââîä &è âûâîä \tCtrl+B"); // copying in this way: "input edit = output edit"
InsertGuiPair(menu_edit_copy_both, "Êîïèðîâàòü ââîä &è âûâîä \tCtrl+B"); // copying in this way: "input edit = output edit"
InsertGuiPair(menu_edit_paste_formula, "Âñòàâèòü â &ôîðìóëó \tCtrl+V"); // pasting directly to the input edit
InsertGuiPair(menu_edit_select_all, "Âûä&åëèòü âñ¸ \tEsc");
InsertGuiPair(menu_edit_bracket, "Âñòàâèòü ñêî&áêè \tCtrl+0"); // inserting brackets: (...)
@ -1467,14 +1482,18 @@ void Languages::InitGuiMessagesTab()
" 32 áèòà íà ïîêàçàòåëü ñòåïåíè), òî åñòü +/-6.9e+646457021.\r\n"
"\r\n"
#endif
"Ïåðåâîä÷èêè:\r\n"
"Àíãëèéñêèé Àâòîð\r\n" // one tabulator (+ some spaces if needed)
"Ïîëüñêèé Àâòîð\r\n"
"Èñïàíñêèé Alejandro S. Valdezate <alesanval@gmail.com>\r\n"
"Äàòñêèé Rune Bisgaard Vammen <runebisgaard@gmail.com>\r\n"
"Êèòàéñêèé Juis <zsyfly@gmail.com>\r\n"
"Ðóññêèé Vladimir Gladilovich <vdgladilovich@gmail.com>\r\n"
"Øâåäñêèé Lars 'Bafvert' Gafvert <lars.gafvert@gmail.com>\r\n"
"Èñïàíñêèé Alejandro S. Valdezate\r\n"
" alesanval@gmail.com\r\n"
"Äàòñêèé Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n"
"Êèòàéñêèé Juis\r\n"
" zsyfly@gmail.com\r\n"
"Ðóññêèé Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n"
"Øâåäñêèé Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
);
InsertGuiPair(about_text_portable_version, " ïåðåíîñíàÿ âåðñèÿ");
InsertGuiPair(about_text_exe_packer, "óïàêîâùèê EXE: UPX 3.03\r\n");
@ -1484,11 +1503,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_find_help, "Íå óäàåòñÿ íàéòè ôàéëû ïîìîùè");
InsertGuiPair(cant_open_project_page, "Íå óäàåòñÿ îòêðûòü ñàéò ïðîåêòà");
InsertGuiPair(update_title, "Ïîèñê íîâîé âåðñèè");
InsertGuiPair(update_button_next, "Äàëåå");
InsertGuiPair(update_button_finish, "Ãîòîâî");
InsertGuiPair(update_button_cancel, "Îòìåíà");
InsertGuiPair(update_check_at_startup, "Ïðîâåðÿòü íàëè÷èå íîâîé âåðñèè ïðè çàãðóçêå ïðîãðàììû");
InsertGuiPair(update_check_at_startup, "Ïðîâåðÿòü íàëè÷èå îáíîâëåíèé ïðè çàãðóçêå ïðîãðàììû");
InsertGuiPair(update_check_for_info, "Íàæìèòå Äàëåå, ÷òîáû ïðîâåðèòü íàëè÷èå îáíîâëåíèé...");
InsertGuiPair(update_is_new_version, "Äîñòóïíà âåðñèÿ %d.%d.%d, íàæìèòå Äàëåå, ÷òîáû ñêà÷àòü å¸...");
InsertGuiPair(update_no_new_version, "Íåò íîâûõ âåðñèé.");

11
src/mainwindow.cpp

@ -1136,13 +1136,16 @@ return true;
BOOL WmCommand_EditCopyBoth(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if( !OpenClipboard(hWnd) )
return true;
unsigned int in_len = SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_LINELENGTH, 0, 0);
unsigned int out_len = SendDlgItemMessage(hWnd, IDC_OUTPUT_EDIT, EM_LINELENGTH, 0, 0);
bool set_correct = false;
if( in_len >= GetPrgRes()->GetBufferSize() || out_len >= GetPrgRes()->GetBufferSize() )
return true;
if( !OpenClipboard(hWnd) )
return true;
HGLOBAL global = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, in_len+out_len + 20);
if( global )
@ -1153,9 +1156,11 @@ BOOL WmCommand_EditCopyBoth(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
{
char * buf = GetPrgRes()->GetBufferTemp();
*(WORD*)buf = in_len + 1;
SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_GETLINE, 0, (LPARAM)buf);
sprintf(text, "%s = ", buf);
*(WORD*)buf = out_len + 1;
SendDlgItemMessage(hWnd, IDC_OUTPUT_EDIT, EM_GETLINE, 0, (LPARAM)buf);
std::strcat(text, buf);

Loading…
Cancel
Save