Browse Source

* added: new language: Danish

translation made by: Rune Bisgaard Vammen <runebisgaard at gmail dot com>
* changed status to: 0.8.4 prerelease



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@124 e52654a7-88a9-db11-a3e9-0013d4bc506e
0.8.x
Tomasz Sowa 13 years ago
parent
commit
dd32ebd6cd
  1. 7
      CHANGELOG
  2. 2
      README
  3. 2
      help/index.html
  4. 4
      src/compileconfig.h
  5. 199
      src/languages.cpp
  6. 3
      src/languages.h
  7. 24
      src/mainwindow.cpp
  8. 3
      src/programresources.cpp
  9. 1
      src/resource.h
  10. 1
      src/resource.rc

7
CHANGELOG

@ -1,3 +1,8 @@
Version 0.8.4 prerelease (2009.04.30):
* added: new language: Danish
translation made by: Rune Bisgaard Vammen <runebisgaard at gmail dot com>
Version 0.8.3 (2009.04.06):
* fixed: calculating the size of the main window
now it looks good on MS Vista and when a user changes size of some
@ -23,7 +28,7 @@ Version 0.8.3 (2009.04.06):
* added: variables and functions can have underline characters
in their names
* added: 'remove trailing zeroes' option on 'display' tab
* added: new language: spanish
* added: new language: Spanish
translation made by Alejandro S. Valdezate
alesanval at gmail dot com
* added: on display tab: we can select 'deg' 'rad' or 'grad' for calculating

2
README

@ -17,6 +17,6 @@ display values with the base (radix) from two to sixteen.
Author: Tomasz Sowa
Contact: t.sowa@slimaczek.pl
Licence: BSD (open source)
Interface: English, Polish, Spanish
Interface: English, Polish, Spanish, Danish
Project page: http://ttcalc.sourceforge.net/
Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista

2
help/index.html

@ -43,7 +43,7 @@ display values with the base (radix) from two to sixteen.
<tr><td>Author:</td><td>Tomasz Sowa</td></tr>
<tr><td>Contact:</td><td>t.sowa@slimaczek.pl</td></tr>
<tr><td>Licence:</td><td>BSD (open source)</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish</td></tr>
<tr><td>Project page:</td><td><a href="http://ttcalc.sourceforge.net/">http://ttcalc.sourceforge.net/</a></td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP/Vista</td></tr>
</table>

4
src/compileconfig.h

@ -55,8 +55,8 @@
*/
#define TTCALC_MAJOR_VER 0
#define TTCALC_MINOR_VER 8
#define TTCALC_REVISION_VER 3
#define TTCALC_PRERELEASE_VER 0
#define TTCALC_REVISION_VER 4
#define TTCALC_PRERELEASE_VER 1

199
src/languages.cpp

@ -82,6 +82,9 @@ void Languages::InitErrorMessagesTab()
{
error_messages_tab.push_back( std::map<ttmath::ErrorCode, std::string>() );
/*
english messages relating to ttmath library
*/
InsertErrorPair(ttmath::err_ok,"ok");
InsertErrorPair(ttmath::err_nothing_has_read,"");
InsertErrorPair(ttmath::err_unknown_character,"An unknown character");
@ -108,7 +111,11 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_still_calculating,"Calculating...");
InsertErrorPair(ttmath::err_too_big_factorial,"A too big argument for the factorial() function");
// pl
/*
polish messages relating to ttmath library
*/
error_messages_tab.push_back( std::map<ttmath::ErrorCode, std::string>() );
@ -139,7 +146,9 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_too_big_factorial,"Zbyt du¿y argument dla funkcji factorial()");
// sp
/*
spanish messages relating to ttmath library
*/
error_messages_tab.push_back( std::map<ttmath::ErrorCode, std::string>() );
@ -169,6 +178,39 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_still_calculating,"Calculando ...");
InsertErrorPair(ttmath::err_too_big_factorial,"Argumento muy grande para la funcion factorial()");
/*
danish messages relating to ttmath library
*/
error_messages_tab.push_back( std::map<ttmath::ErrorCode, std::string>() );
InsertErrorPair(ttmath::err_ok,"ok");
InsertErrorPair(ttmath::err_nothing_has_read,"");
InsertErrorPair(ttmath::err_unknown_character,"Et ukendt tegn");
InsertErrorPair(ttmath::err_unexpected_final_bracket,"En uforventet endelig klasse");
InsertErrorPair(ttmath::err_stack_not_clear,"Et ukendt tegn er væk");
InsertErrorPair(ttmath::err_unknown_variable,"En ukendt variabel");
InsertErrorPair(ttmath::err_division_by_zero,"Division med nul");
InsertErrorPair(ttmath::err_interrupt,"Beregningen er blevet afbrydt");
InsertErrorPair(ttmath::err_overflow,"Overflow fejl");
InsertErrorPair(ttmath::err_unknown_function,"En ukendt funktion");
InsertErrorPair(ttmath::err_unknown_operator,"En ukendt operator");
InsertErrorPair(ttmath::err_unexpected_semicolon_operator,"En ukendt semikolon operator");
InsertErrorPair(ttmath::err_improper_amount_of_arguments,"Ukorrekt mængde af argumenter");
InsertErrorPair(ttmath::err_improper_argument,"Uægte argumentation");
InsertErrorPair(ttmath::err_unexpected_end,"Uforventet slutning");
InsertErrorPair(ttmath::err_internal_error,"En intern fejl");
InsertErrorPair(ttmath::err_incorrect_name,"Ukorrekt navn for en variabel eller function");
InsertErrorPair(ttmath::err_incorrect_value,"Ukorrekt værdi for en variabel eller funktion");
InsertErrorPair(ttmath::err_variable_exists,"Denne variabel eksisterer allerede");
InsertErrorPair(ttmath::err_variable_loop,"Det er en gentagelse mellem variabler");
InsertErrorPair(ttmath::err_functions_loop,"Der er en gentagelse mellem funktioner");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variabler eller funktioner skal kun returnere én værdi");
InsertErrorPair(ttmath::err_still_calculating,"Regner...");
InsertErrorPair(ttmath::err_too_big_factorial,"Et for stort argument for factorial() funktionen");
}
@ -219,7 +261,10 @@ void Languages::InsertGuiPair(GuiMsg code, const char * message)
void Languages::InitGuiMessagesTab()
{
// en
/*
english gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
InsertGuiPair(button_ok,"Ok");
@ -300,6 +345,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_english, "&English");
InsertGuiPair(menu_view_lang_polish, "&Polish");
InsertGuiPair(menu_view_lang_spanish, "&Spanish");
InsertGuiPair(menu_view_lang_danish, "&Danish");
InsertGuiPair(menu_view_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Undo");
InsertGuiPair(menu_edit_paste, "&Paste");
@ -344,7 +390,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_find_help, "I can't find any help files");
InsertGuiPair(cant_open_project_page, "I can't open the project webpage");
// pl
/*
polish gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
InsertGuiPair(button_ok,"Ok");
@ -425,6 +476,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_english, "&Angielski");
InsertGuiPair(menu_view_lang_polish, "&Polski");
InsertGuiPair(menu_view_lang_spanish, "&Hiszpañski");
InsertGuiPair(menu_view_lang_danish, "&Duñski");
InsertGuiPair(menu_view_close_program, "&Zamknij");
InsertGuiPair(menu_edit_undo, "&Cofnij");
InsertGuiPair(menu_edit_paste, "&Wklej");
@ -470,7 +522,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_open_project_page, "Nie mogê otworzyæ strony projektu");
// sp
/*
spanish gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
@ -554,6 +611,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_english, "&Ingles");
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_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Deshacer");
InsertGuiPair(menu_edit_paste, "&Pegar");
@ -598,6 +656,137 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_find_help, "No se encuentran los ficheros de ayuda");
InsertGuiPair(cant_open_project_page, "No se puede abrir la pagina dle proyecto");
/*
danish gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
InsertGuiPair(button_ok,"Ok");
InsertGuiPair(button_cancel,"Anuller");
InsertGuiPair(message_box_caption,"TTCalc");
InsertGuiPair(dialog_box_add_variable_caption,"Tilføj en ny variabel");
InsertGuiPair(dialog_box_edit_variable_caption,"Rediger en variabel");
InsertGuiPair(dialog_box_add_variable_incorrect_name,"Et ukorrekt navn for variablen");
InsertGuiPair(dialog_box_add_variable_incorrect_value,"En ukorrekt værdi for variablen");
InsertGuiPair(dialog_box_add_variable_variable_exists,"Denne variabel eksisterer allerede");
InsertGuiPair(dialog_box_edit_variable_unknown_variable,"Der er ikke denne variabel i min tabel. Der er sandsynligvis en intern fejl!");
InsertGuiPair(dialog_box_delete_variable_confirm,"Vil du slette disse variabler?");
InsertGuiPair(dialog_box_variable_not_all_deleted,"Der er nogle variabler det ikke var mugligt at slette. Sandsynligvis en intern fejl!");
InsertGuiPair(dialog_box_add_function_caption,"Tilføj en ny funktion");
InsertGuiPair(dialog_box_edit_function_caption,"Rediger en funktion");
InsertGuiPair(dialog_box_add_function_function_exists,"Denne funktion eksisterer allerede");
InsertGuiPair(dialog_box_edit_function_unknown_function,"Der er ikke denne funktion i min tabel. Der er sandsynligvis en intern fejl!");
InsertGuiPair(dialog_box_delete_function_confirm,"Vil du slette disse funktioner?");
InsertGuiPair(dialog_box_function_not_all_deleted,"Der er nogle funktioner det ikke var mugligt at slette. Sandsynligvis en intern fejl!");
InsertGuiPair(dialog_box_add_function_incorrect_name,"Et ukorrekt navn for funktionen");
InsertGuiPair(list_variables_header_1,"Navn");
InsertGuiPair(list_variables_header_2,"Værdi");
InsertGuiPair(list_functions_header_1,"Navn");
InsertGuiPair(list_functions_header_2,"Param.");
InsertGuiPair(list_functions_header_3,"Værdi");
InsertGuiPair(button_add,"Tilføj");
InsertGuiPair(button_edit,"Rediger");
InsertGuiPair(button_delete,"Slet");
InsertGuiPair(button_clear,"C");
InsertGuiPair(tab_standard,"Standard");
InsertGuiPair(tab_variables,"Variabler");
InsertGuiPair(tab_functions,"Funktioner");
InsertGuiPair(tab_precision,"Præcision");
InsertGuiPair(tab_display,"Visning");
InsertGuiPair(tab_convert,"Konverter");
InsertGuiPair(radio_precision_1,"Lille - 96 bits for mantissen, 32 bits for exponenten");
InsertGuiPair(radio_precision_2,"Mellem - 288 bits for mantissen, 64 bits for exponenten");
InsertGuiPair(radio_precision_3,"Stor - 864 bits for mantissen, 128 bits for exponenten");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 gyldige cifre (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 gyldige cifre");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 cifre");
InsertGuiPair(overflow_during_printing,"Overflow under printning");
InsertGuiPair(combo_rounding_none,"Ingen");
InsertGuiPair(combo_rounding_integer,"til heltal");
InsertGuiPair(combo_rounding_to_number,"til");
InsertGuiPair(combo_rounding_after_comma,"ciffer(cifre)");
InsertGuiPair(check_remove_zeroes,"Fjern sidste trailing nuller");
InsertGuiPair(display_input, "Input");
InsertGuiPair(display_output, "Output");
InsertGuiPair(display_rounding, "Afrunding");
InsertGuiPair(display_always_scientific,"Altid");
InsertGuiPair(display_not_always_scientific,"Når exponenten er større end:");
InsertGuiPair(display_group_scientific, "Print resultatet som den videnskablige værdi");
InsertGuiPair(display_decimal_point, "Decimal punkt");
InsertGuiPair(display_deg_red_grad, "sin/cos asin/acos");
InsertGuiPair(convert_type, "Type");
InsertGuiPair(convert_input, "Input");
InsertGuiPair(convert_output, "Udput");
InsertGuiPair(convert_dynamic_output, "Auto præfix");
InsertGuiPair(menu_view, "&Vis");
InsertGuiPair(menu_edit, "&Rediger");
InsertGuiPair(menu_help, "&Hjælp");
InsertGuiPair(menu_language, "&Sprog");
InsertGuiPair(menu_view_new_window, "&Nyt vindue");
InsertGuiPair(menu_view_normal_view, "No&rmal visning");
InsertGuiPair(menu_view_compact_view, "K&ompakt visning");
InsertGuiPair(menu_view_always_on_top, "&Altid øverst");
InsertGuiPair(menu_view_lang_english, "&Engelsk");
InsertGuiPair(menu_view_lang_polish, "&Polsk");
InsertGuiPair(menu_view_lang_spanish, "&Spansk");
InsertGuiPair(menu_view_lang_danish, "&Dansk");
InsertGuiPair(menu_view_close_program, "&Afslut");
InsertGuiPair(menu_edit_undo, "&Fortryd");
InsertGuiPair(menu_edit_paste, "&Sæt ind");
InsertGuiPair(menu_edit_copy_result, "&Kopier resultatet");
InsertGuiPair(menu_help_help, "&Hjælp");
InsertGuiPair(menu_help_project_page, "&Projekt side");
InsertGuiPair(menu_help_about, "&Om");
InsertGuiPair(cant_init_calculations, "Moduelt for uregninger kunne ikke sættes i gang");
InsertGuiPair(message_box_error_caption,"TTCalc");
InsertGuiPair(cant_create_thread, "Den anden tråd for udregning kunne ikke laves");
InsertGuiPair(cant_create_main_window, "Applikationens hovedvindue kunne ikke laves");
InsertGuiPair(cant_init_common_controls,"De fælles kontrol indstillinger kunne ikke sættes i gang (InitCommonControlsEx)");
InsertGuiPair(about_text,
"Matematisk lommeregner TTCalc %d.%d.%d%s%s\r\n"
"Forfatter: Tomasz Sowa\r\n"
"Kontakt: t.sowa@slimaczek.pl\r\n"
"Licens: BSD (open source)\r\n"
"Projekt side: http://ttcalc.sourceforge.net\r\n"
"Bignum biblotek: TTMath %d.%d.%d%s\r\n"
"Programmerings sprog: C++\r\n"
"Kompilator: %s\r\n"
"%s" // for upx
"\r\n"
"TTCalc bruger TTMath bignum bibloteket"
" som kan findes ved http://sourceforge.net/projects/ttmath\r\n"
"\r\n"
#ifdef TTCALC_PORTABLE
"Dette er den transportable version af programmet TTCalc. I denne version "
"kan du kun udregne med én slags præcision (96 bits for "
"mantissen og 32 bits for exponenten) det er omkring +/-6.9e+646457021.\r\n"
"\r\n"
#endif
"Hvis du har spørgsmål, gode råd eller interessante idér vedrørende"
" dette program eller hvis du vil tilslutte dig dette projekt som"
" en udvikler eller en programmør er du velkommen til at kontakte forfatteren."
);
InsertGuiPair(about_text_portable_version, " transportabel version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.03\r\n");
InsertGuiPair(about_box_title, "Om");
InsertGuiPair(about_box_button_close, "Luk");
InsertGuiPair(unknown_error, "Der er sket en ukendt fejl");
InsertGuiPair(cant_find_help, "Der kunne ikke findes nogen hjælp filer");
InsertGuiPair(cant_open_project_page, "Projekt siden kunne ikke åbnes");
}

3
src/languages.h

@ -118,6 +118,7 @@ public:
menu_view_lang_english,
menu_view_lang_polish,
menu_view_lang_spanish,
menu_view_lang_danish,
menu_view_close_program,
menu_edit_undo,
menu_edit_paste,
@ -146,7 +147,7 @@ public:
// (after conversion to 'int' we pass it into the std::vector)
enum Country
{
en = 0, pl, sp
en = 0, pl, sp, da
};

24
src/mainwindow.cpp

@ -405,6 +405,7 @@ HMENU menu = GetMenu(hWnd);
SetMenuLanguageItem(menu, IDM_LANGUAGE_ENGLISH, Languages::menu_view_lang_english);
SetMenuLanguageItem(menu, IDM_LANGUAGE_POLISH, Languages::menu_view_lang_polish);
SetMenuLanguageItem(menu, IDM_LANGUAGE_SPANISH, Languages::menu_view_lang_spanish);
SetMenuLanguageItem(menu, IDM_LANGUAGE_DANISH, Languages::menu_view_lang_danish);
SetMenuLanguageItem(menu, IDM_CLOSE_PROGRAM, Languages::menu_view_close_program);
SetMenuLanguageItem(menu, IDM_EDIT_UNDO, Languages::menu_edit_undo);
SetMenuLanguageItem(menu, IDM_EDIT_PASTE, Languages::menu_edit_paste);
@ -766,15 +767,21 @@ void WmInitMenuPopUpView(HMENU menu)
CheckMenuItem(menu, IDM_LANGUAGE_ENGLISH, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_POLISH, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_SPANISH, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_DANISH, MF_BYCOMMAND|MF_UNCHECKED);
if( GetPrgRes()->GetLanguages()->GetCurrentLanguage() == Languages::en )
Languages::Country lang = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
if( lang == Languages::en )
CheckMenuItem(menu, IDM_LANGUAGE_ENGLISH, MF_BYCOMMAND|MF_CHECKED);
else
if( GetPrgRes()->GetLanguages()->GetCurrentLanguage() == Languages::pl )
if( lang == Languages::pl )
CheckMenuItem(menu, IDM_LANGUAGE_POLISH, MF_BYCOMMAND|MF_CHECKED);
else
if( GetPrgRes()->GetLanguages()->GetCurrentLanguage() == Languages::sp )
if( lang == Languages::sp )
CheckMenuItem(menu, IDM_LANGUAGE_SPANISH, MF_BYCOMMAND|MF_CHECKED);
else
if( lang == Languages::da )
CheckMenuItem(menu, IDM_LANGUAGE_DANISH, MF_BYCOMMAND|MF_CHECKED);
}
@ -1037,6 +1044,16 @@ BOOL WmCommand_LanguageSpanish(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
return true;
}
BOOL WmCommand_LanguageDanish(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
GetPrgRes()->GetLanguages()->SetCurrentLanguage(Languages::da);
SetMenuLanguage(hWnd);
SetOutputEditLanguage(hWnd);
TabWindowFunctions::SetLanguage( GetDlgItem(hWnd, IDC_TAB) );
return true;
}
@ -1108,6 +1125,7 @@ void CreateCommandMessagesTable(Messages & cmessages)
cmessages.Associate(IDM_LANGUAGE_ENGLISH, WmCommand_LanguageEnglish);
cmessages.Associate(IDM_LANGUAGE_POLISH, WmCommand_LanguagePolish);
cmessages.Associate(IDM_LANGUAGE_SPANISH, WmCommand_LanguageSpanish);
cmessages.Associate(IDM_LANGUAGE_DANISH, WmCommand_LanguageDanish);
cmessages.Associate(IDM_HELP_HELP, WmHelp);
cmessages.Associate(IDM_HELP_PROJECT_PAGE, WmProjectPage);
}

3
src/programresources.cpp

@ -803,6 +803,9 @@ std::string ini_value[20];
SetDisplayRounding( atoi(ini_value[11].c_str()) );
SetRemovingZeroes( bool(atoi(ini_value[15].c_str())) );
if( ini_value[13] == "3" )
languages.SetCurrentLanguage(Languages::da);
else
if( ini_value[13] == "2" )
languages.SetCurrentLanguage(Languages::sp);
else

1
src/resource.h

@ -195,6 +195,7 @@
#define IDM_LANGUAGE_ENGLISH 40010
#define IDM_LANGUAGE_POLISH 40011
#define IDM_LANGUAGE_SPANISH 40012
#define IDM_LANGUAGE_DANISH 40013
#define IDM_CLOSE_PROGRAM 40020
#define IDM_EDIT_UNDO 40030
#define IDM_EDIT_PASTE 40031

1
src/resource.rc

@ -28,6 +28,7 @@ BEGIN
MENUITEM "&English", 40010
MENUITEM "&Polish", 40011
MENUITEM "&Spanish", 40012
MENUITEM "&Danish", 40013
END
MENUITEM SEPARATOR
MENUITEM "&Close", 40020

Loading…
Cancel
Save