merged from trunk: Swedish language, support for TTMath 0.9.0

changed version: 0.8.7 now


git-svn-id: svn://ttmath.org/publicrep/ttcalc/branches/0.8.x@197 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2009-09-16 17:51:26 +00:00
parent eda79cdbe6
commit dc56087444
16 changed files with 390 additions and 174 deletions

View File

@ -1,3 +1,13 @@
Version 0.8.7 (2009.09.16):
* added: new language: Swedish
translation made by: Lars 'Bäfvert' Gäfvert <lars.gafvert at gmail dot com>
* changed: version of the TTMath library: 0.9.0 prerelease now
Changes from TTMath 0.9.0 prerelease relating to TTCalc:
* added: gamma() function
* changed: factorial() function is very fast now
Version 0.8.6 (2009.06.30):
* added: new language: Russian
translation made by: Vladimir Gladilovich <vdgladilovich at gmail dot com>

2
README
View File

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

View File

@ -44,7 +44,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@ttmath.org</td></tr>
<tr><td>Licence:</td><td>BSD (open source)</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian, Swedish</td></tr>
<tr><td>Project page:</td><td><a href="http://ttcalc.sourceforge.net/">http://ttcalc.sourceforge.net/</a></td></tr>
<tr><td>Bignum library:</td><td>TTMath <a href="http://ttmath.org/">http://www.ttmath.org/</a></td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP/Vista</td></tr>

View File

@ -9,6 +9,7 @@
<param name="Keyword" value="sqrt">
<param name="Keyword" value="root">
<param name="Keyword" value="factorial">
<param name="Keyword" value="gamma">
<param name="Keyword" value="abs">
<param name="Keyword" value="sgn">
<param name="Keyword" value="mod">
@ -40,9 +41,12 @@ root(8;3)=2<br>
root(-8;3)=-2
</dd>
<dt>factorial(x)</dt>
<dt>factorial(n)</dt>
<dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd>
<dt>gamma(x)</dt>
<dd>The gamma function<br>gamma(45.89)=7,861174...e+55</dd>
<dt>abs(x)</dt>
<dd>The absolute value of x<br>abs(-10)=10</dd>

View File

@ -3,8 +3,8 @@
[Setup]
AppName=TTCalc
AppVerName=TTCalc 0.8.6
AppVersion=0.8.6
AppVerName=TTCalc 0.8.7
AppVersion=0.8.7
AppPublisher=Tomasz Sowa
AppPublisherURL=http://ttcalc.sourceforge.net
AppSupportURL=http://ttcalc.sourceforge.net
@ -28,6 +28,7 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "chinese"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "swedish"; MessagesFile: "compiler:Languages\Swedish.isl"
[InstallDelete]
; prior to 0.8.3 we were using mingwm10.dll (now it is not needed and will be deleted if exists)

View File

@ -58,7 +58,6 @@
typedef ttmath::Big<4,27> TTMathBig3;
typedef TTMathBig3 TTMathBigMax;
#else
/* portable */

View File

@ -55,7 +55,7 @@
*/
#define TTCALC_MAJOR_VER 0
#define TTCALC_MINOR_VER 8
#define TTCALC_REVISION_VER 6
#define TTCALC_REVISION_VER 7
#define TTCALC_PRERELEASE_VER 0

View File

@ -109,7 +109,7 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"There's a recurrence between functions");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variables or functions must return only one value");
InsertErrorPair(ttmath::err_still_calculating,"Calculating...");
InsertErrorPair(ttmath::err_too_big_factorial,"A too big argument for the factorial() function");
//InsertErrorPair(ttmath::err_too_big_factorial,"A too big argument for the factorial() function");
@ -143,7 +143,7 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Pomiêdzy funkcjami zachodzi wywo³anie rekurencyjne");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Zmienne albo funkcje mog¹ posiadaæ (zwracaæ) tylko jedn¹ wartoœæ");
InsertErrorPair(ttmath::err_still_calculating,"Obliczanie...");
InsertErrorPair(ttmath::err_too_big_factorial,"Zbyt du¿y argument dla funkcji factorial()");
//InsertErrorPair(ttmath::err_too_big_factorial,"Zbyt du縴 argument dla funkcji factorial()");
/*
@ -176,7 +176,7 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Recurrencia entre funciones");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variables o funciones solo pueden retornar un valor");
InsertErrorPair(ttmath::err_still_calculating,"Calculando ...");
InsertErrorPair(ttmath::err_too_big_factorial,"Argumento muy grande para la funcion factorial()");
//InsertErrorPair(ttmath::err_too_big_factorial,"Argumento muy grande para la funcion factorial()");
/*
@ -208,7 +208,7 @@ void Languages::InitErrorMessagesTab()
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");
//InsertErrorPair(ttmath::err_too_big_factorial,"Et for stort argument for factorial() funktionen");
/*
@ -240,7 +240,7 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"º¯ÊýÑ­»·");
InsertErrorPair(ttmath::err_must_be_only_one_value,"±äÁ¿»òº¯Êý±ØÐëÓзµ»ØÖµ");
InsertErrorPair(ttmath::err_still_calculating,"ÕýÔÚ¼ÆËã...");
InsertErrorPair(ttmath::err_too_big_factorial,"½×³Ëº¯ÊýµÄ²ÎÊýÌ«´ó");
//InsertErrorPair(ttmath::err_too_big_factorial,"阶乘函数的参数太大");
/*
@ -272,12 +272,50 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_functions_loop,"Ôóíêöèè ðåêóððåíòíû");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Ïåðåìåííûå èëè ôóíêöèè äîëæíû âîçâðàùàòü òîëüêî îäíî çíà÷åíèå");
InsertErrorPair(ttmath::err_still_calculating,"Ïîäñ÷èòûâàåì...");
InsertErrorPair(ttmath::err_too_big_factorial,"Ñëèøêîì áîëüøîé àðãóìåíò äëÿ ôóíêöèè factorial()");
//InsertErrorPair(ttmath::err_too_big_factorial,"央桫觐<E6A1AB> 犷朦<E78AB7><E69CA6> 囵泱戾眚 潆<> 趔黻鲨<E9BBBB> factorial()");
/*
swedish 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,"Ett ok鋘t tecken");
InsertErrorPair(ttmath::err_unexpected_final_bracket,"En of鰎v鋘tat slutlig klass");
InsertErrorPair(ttmath::err_stack_not_clear,"Ett ok鋘t tecken saknas");
InsertErrorPair(ttmath::err_unknown_variable,"En ok鋘d variabel");
InsertErrorPair(ttmath::err_division_by_zero,"Division med noll");
InsertErrorPair(ttmath::err_interrupt,"Ber鋕ningen har avbrutits");
InsertErrorPair(ttmath::err_overflow,"Overflow fel");
InsertErrorPair(ttmath::err_unknown_function,"En ok鋘d funktion");
InsertErrorPair(ttmath::err_unknown_operator,"En ok鋘d operator");
InsertErrorPair(ttmath::err_unexpected_semicolon_operator,"En ok鋘d semikolonoperator");
InsertErrorPair(ttmath::err_improper_amount_of_arguments,"Felaktig m鋘gd argument");
InsertErrorPair(ttmath::err_improper_argument,"Ogiltig argumentation");
InsertErrorPair(ttmath::err_unexpected_end,"Of鰎v鋘tat fel");
InsertErrorPair(ttmath::err_internal_error,"Ett internt fel");
InsertErrorPair(ttmath::err_incorrect_name,"Ogiltigt namn f鰎 en variabel eller funktion");
InsertErrorPair(ttmath::err_incorrect_value,"Ogiltigt v鋜de f鰎 en variabel eller funktion");
InsertErrorPair(ttmath::err_variable_exists,"Denna variabel existerar redan");
InsertErrorPair(ttmath::err_variable_loop,"Det 鋜 en upprepepning mellan variabler");
InsertErrorPair(ttmath::err_functions_loop,"Det 鋜 en upprepning mellan funktioner");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variabler eller funktioner skall kunna avge ett v鋜de");
InsertErrorPair(ttmath::err_still_calculating,"R鋕nar b鋠rar...");
//InsertErrorPair(ttmath::err_too_big_factorial,"Ett f鰎 stort argument f鰎 factorial() funktionen");
}
// for gui messages
@ -411,6 +449,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&Danish");
InsertGuiPair(menu_view_lang_chinese, "&Chinese");
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "&Swedish");
InsertGuiPair(menu_view_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Undo");
InsertGuiPair(menu_edit_paste, "&Paste");
@ -544,6 +583,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&Duñski");
InsertGuiPair(menu_view_lang_chinese, "&Chiñski");
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "&Szwedzki");
InsertGuiPair(menu_view_close_program, "&Zamknij");
InsertGuiPair(menu_edit_undo, "&Cofnij");
InsertGuiPair(menu_edit_paste, "&Wklej");
@ -681,6 +721,7 @@ void Languages::InitGuiMessagesTab()
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_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Deshacer");
InsertGuiPair(menu_edit_paste, "&Pegar");
@ -814,6 +855,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&Dansk");
InsertGuiPair(menu_view_lang_chinese, "&Kinesisk"); // 'Kinesisk' is a correct translation for 'Chinese'?
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "S&wedish");
InsertGuiPair(menu_view_close_program, "&Afslut");
InsertGuiPair(menu_edit_undo, "&Fortryd");
InsertGuiPair(menu_edit_paste, "&Sæt ind");
@ -946,6 +988,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&µ¤ÂóÓï");
InsertGuiPair(menu_view_lang_chinese, "&¼òÌåÖÐÎÄ");
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "&Swedish");
InsertGuiPair(menu_view_close_program, "&¹Ø±Õ");
InsertGuiPair(menu_edit_undo, "&È¡Ïû");
InsertGuiPair(menu_edit_paste, "&Õ³Ìù");
@ -1076,6 +1119,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&Äàòñêèé");
InsertGuiPair(menu_view_lang_chinese, "&Êèòàéñêèé");
InsertGuiPair(menu_view_lang_russian, "&Ðóññêèé");
InsertGuiPair(menu_view_lang_swedish, "&Swedish");
InsertGuiPair(menu_view_close_program, "&Çàêðûòü");
InsertGuiPair(menu_edit_undo, "&Îòìåíèòü äåéñòâèå");
InsertGuiPair(menu_edit_paste, "&Âñòàâèòü");
@ -1120,6 +1164,140 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_find_help, "Íå óäàåòñÿ íàéòè ôàéëû ïîìîùè");
InsertGuiPair(cant_open_project_page, "Íå óäàåòñÿ îòêðûòü ñàéò ïðîåêòà");
/*
swedish gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
InsertGuiPair(button_ok,"Ok");
InsertGuiPair(button_cancel,"Avbryt");
InsertGuiPair(message_box_caption,"TTCalc");
InsertGuiPair(dialog_box_add_variable_caption,"L鋑g till en ny variabel");
InsertGuiPair(dialog_box_edit_variable_caption,"Redigera en variabel");
InsertGuiPair(dialog_box_add_variable_incorrect_name,"Ogiltigt namn f鰎 variabel");
InsertGuiPair(dialog_box_add_variable_incorrect_value,"Ogiltigt v鋜de f鰎 variabel");
InsertGuiPair(dialog_box_add_variable_variable_exists,"Denna variabel finns redan");
InsertGuiPair(dialog_box_edit_variable_unknown_variable,"Denna variabel saknas i tabellen. F鰎modligen ett internt fel!");
InsertGuiPair(dialog_box_delete_variable_confirm,"Vill du f鰎g鰎a dessa variabler?");
InsertGuiPair(dialog_box_variable_not_all_deleted,"N錱ra variabler gick ej att ta k錶 p<>. Det m錽te vara ett internt fel!");
InsertGuiPair(dialog_box_add_function_caption,"L鋑g till en ny funktion");
InsertGuiPair(dialog_box_edit_function_caption,"Redigera en funktion");
InsertGuiPair(dialog_box_add_function_function_exists,"Denna funktion finns redan");
InsertGuiPair(dialog_box_edit_function_unknown_function,"Denna funktion saknas i tabellen. F鰎modligen ett internt fel!");
InsertGuiPair(dialog_box_delete_function_confirm,"Vill du f鰎g鰎a dessa funktioner?");
InsertGuiPair(dialog_box_function_not_all_deleted,"N錱ra funktioner gick inte att f鰎g鰎a. Jag tror vi har att g鰎a med ett internt fel!");
InsertGuiPair(dialog_box_add_function_incorrect_name,"Ogiltigt namn f鰎 funktionen");
InsertGuiPair(list_variables_header_1,"Namn");
InsertGuiPair(list_variables_header_2,"V鋜de");
InsertGuiPair(list_functions_header_1,"Namn");
InsertGuiPair(list_functions_header_2,"Param.");
InsertGuiPair(list_functions_header_3,"V鋜de");
InsertGuiPair(button_add,"L鋑ga till");
InsertGuiPair(button_edit,"Redigera");
InsertGuiPair(button_delete,"F鰎g鰎a");
InsertGuiPair(button_clear,"C");
InsertGuiPair(tab_standard,"Standard");
InsertGuiPair(tab_variables,"Variabler");
InsertGuiPair(tab_functions,"Funktioner");
InsertGuiPair(tab_precision,"Precision");
InsertGuiPair(tab_display,"Visning");
InsertGuiPair(tab_convert,"Konvertera");
InsertGuiPair(radio_precision_1,"Liten - 96 bitar f鰎 mantissan, 32 bitar f鰎 exponenten");
InsertGuiPair(radio_precision_2,"Mellan - 288 bitar f鰎 mantissan, 64 bitar f鰎 exponenten");
InsertGuiPair(radio_precision_3,"Stor - 864 bitar f鰎 mantissan, 128 bitar f鰎 exponenten");
InsertGuiPair(precision_1_info,"(+/-)6.9 e+646457021, 26 giltiga siffror (decimaler)");
InsertGuiPair(precision_2_info,"(+/-)3.4e+2776511644261678652, 85 giltiga siffror");
InsertGuiPair(precision_3_info,"(+/-)6.7e+51217599719369681875006054625051616609, 258 siffror");
InsertGuiPair(overflow_during_printing,"Overflow under printning");
InsertGuiPair(combo_rounding_none,"Ingen");
InsertGuiPair(combo_rounding_integer,"till heltal");
InsertGuiPair(combo_rounding_to_number,"till");
InsertGuiPair(combo_rounding_after_comma,"siffror(cifre)");
InsertGuiPair(check_remove_zeroes,"Radera sista 鰒erfl鰀iga nollor");
InsertGuiPair(display_input, "Input");
InsertGuiPair(display_output, "Output");
InsertGuiPair(display_rounding, "Avrundning");
InsertGuiPair(display_always_scientific,"Alltid");
InsertGuiPair(display_not_always_scientific,"N鋜 exponenten 鋜 st鰎re 鋘:");
InsertGuiPair(display_group_scientific, "Visa resultatet som vetenskapligt v鋜de");
InsertGuiPair(display_decimal_point, "Decimalpunkt");
InsertGuiPair(display_deg_rad_grad, "sin/cos asin/acos");
InsertGuiPair(convert_type, "Type");
InsertGuiPair(convert_input, "Input");
InsertGuiPair(convert_output, "Output");
InsertGuiPair(convert_dynamic_output, "Auto prefix");
InsertGuiPair(menu_view, "&Visa");
InsertGuiPair(menu_edit, "&Redigera");
InsertGuiPair(menu_help, "&Hj鋖p");
InsertGuiPair(menu_language, "&Spr錱");
InsertGuiPair(menu_view_new_window, "&Nytt f鰊ster");
InsertGuiPair(menu_view_normal_view, "No&rmal visning");
InsertGuiPair(menu_view_compact_view, "K&ompakt visning");
InsertGuiPair(menu_view_always_on_top, "&Alltid 鰒erst");
InsertGuiPair(menu_view_lang_english, "&Engelska");
InsertGuiPair(menu_view_lang_polish, "&Polska");
InsertGuiPair(menu_view_lang_spanish, "&Spanska");
InsertGuiPair(menu_view_lang_danish, "&Danska");
InsertGuiPair(menu_view_lang_chinese, "&Kinesiska");
InsertGuiPair(menu_view_lang_russian, "&Ryska");
InsertGuiPair(menu_view_lang_swedish, "S&venska");
InsertGuiPair(menu_view_close_program, "&Avsluta");
InsertGuiPair(menu_edit_undo, "&舗gra");
InsertGuiPair(menu_edit_paste, "&Klistra in");
InsertGuiPair(menu_edit_copy_result, "&Kopiera result");
InsertGuiPair(menu_help_help, "&Hj鋖p");
InsertGuiPair(menu_help_project_page, "&Projektsida");
InsertGuiPair(menu_help_about, "&Om");
InsertGuiPair(cant_init_calculations, "Ber鋕ningen kunde inte initieras!");
InsertGuiPair(message_box_error_caption,"TTCalc");
InsertGuiPair(cant_create_thread, "Den andra tr錮en f鰎 utr鋕ning kunde inte skapas");
InsertGuiPair(cant_create_main_window, "Applikationens huvudf鰊ster kunde inte skapas");
InsertGuiPair(cant_init_common_controls,"Inst鋖lningarna kunde inte initieras (InitCommonControlsEx)");
InsertGuiPair(about_text,
"Matematisk kalkylator TTCalc %d.%d.%d%s%s\r\n"
"Upphovsman: Tomasz Sowa\r\n"
"Kontakt: t.sowa@ttmath.org\r\n"
"Licens: BSD (open source)\r\n"
"Projektsida: http://ttcalc.sourceforge.net\r\n"
"Bignumbiblotek: TTMath %d.%d.%d%s\r\n"
"Programmeringsspr錵: C++\r\n"
"Kompilator: %s\r\n"
"%s" // for upx
"\r\n"
"TTCalc anv鋘der sig av TTMath bignum bibloteket"
" som kan hittas h鋜: http://sourceforge.net/projects/ttmath\r\n"
"\r\n"
#ifdef TTCALC_PORTABLE
"Detta 鋜 den portabla versionen av TTCalc. I denna version "
"kan du r鋕na med begr鋘sad precision, dvs (96 bitar f鰎 "
"mantissan och 32 bitar f鰎 exponenten) det 鋜 omkring +/-6.9e+646457021.\r\n"
"\r\n"
#endif
"Har du fr錱or, goda r錮 eller interessanta id閑r betr鋐fande"
" detta program eller vill du rentav bidra med din kompetens som"
" utvecklare eller programmerare 鋜 du v鋖kommen att kontakta upphovsmannen."
);
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, "B鋠er");
InsertGuiPair(unknown_error, "Det har intr鋐fat ett ok鋘t fel");
InsertGuiPair(cant_find_help, "Kunde inte hitta n錱ra hj鋖pfiler");
InsertGuiPair(cant_open_project_page, "Projektsidan kunde inte 鰌pnas");
}

View File

@ -121,6 +121,7 @@ public:
menu_view_lang_danish,
menu_view_lang_chinese,
menu_view_lang_russian,
menu_view_lang_swedish,
menu_view_close_program,
menu_edit_undo,
menu_edit_paste,
@ -149,7 +150,7 @@ public:
// (after conversion to 'int' we pass it into the std::vector)
enum Country
{
en = 0, pl, sp, da, chn, ru
en = 0, pl, sp, da, chn, ru, swe
};

View File

@ -408,6 +408,7 @@ HMENU menu = GetMenu(hWnd);
SetMenuLanguageItem(menu, IDM_LANGUAGE_DANISH, Languages::menu_view_lang_danish);
SetMenuLanguageItem(menu, IDM_LANGUAGE_CHINESE, Languages::menu_view_lang_chinese);
SetMenuLanguageItem(menu, IDM_LANGUAGE_RUSSIAN, Languages::menu_view_lang_russian);
SetMenuLanguageItem(menu, IDM_LANGUAGE_SWEDISH, Languages::menu_view_lang_swedish);
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);
@ -772,6 +773,7 @@ void WmInitMenuPopUpView(HMENU menu)
CheckMenuItem(menu, IDM_LANGUAGE_DANISH, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_CHINESE, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_RUSSIAN, MF_BYCOMMAND|MF_UNCHECKED);
CheckMenuItem(menu, IDM_LANGUAGE_SWEDISH, MF_BYCOMMAND|MF_UNCHECKED);
Languages::Country lang = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
@ -792,6 +794,9 @@ void WmInitMenuPopUpView(HMENU menu)
else
if( lang == Languages::ru )
CheckMenuItem(menu, IDM_LANGUAGE_RUSSIAN, MF_BYCOMMAND|MF_CHECKED);
else
if( lang == Languages::swe )
CheckMenuItem(menu, IDM_LANGUAGE_SWEDISH, MF_BYCOMMAND|MF_CHECKED);
}
@ -1087,6 +1092,16 @@ BOOL WmCommand_LanguageRussian(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
return true;
}
BOOL WmCommand_LanguageSwedish(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
GetPrgRes()->GetLanguages()->SetCurrentLanguage(Languages::swe);
SetMenuLanguage(hWnd);
SetOutputEditLanguage(hWnd);
TabWindowFunctions::SetLanguage( GetDlgItem(hWnd, IDC_TAB) );
return true;
}
BOOL WmHelp(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
@ -1159,6 +1174,7 @@ void CreateCommandMessagesTable(Messages & cmessages)
cmessages.Associate(IDM_LANGUAGE_DANISH, WmCommand_LanguageDanish);
cmessages.Associate(IDM_LANGUAGE_CHINESE, WmCommand_LanguageChinese);
cmessages.Associate(IDM_LANGUAGE_RUSSIAN, WmCommand_LanguageRussian);
cmessages.Associate(IDM_LANGUAGE_SWEDISH, WmCommand_LanguageSwedish);
cmessages.Associate(IDM_HELP_HELP, WmHelp);
cmessages.Associate(IDM_HELP_PROJECT_PAGE, WmProjectPage);
}

View File

@ -110,7 +110,6 @@ public:
private:
#ifndef TTCALC_PORTABLE
ttmath::Parser<TTMathBig1> parser1;
ttmath::Parser<TTMathBig2> parser2;
ttmath::Parser<TTMathBig3> parser3;

View File

@ -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] == "6" )
languages.SetCurrentLanguage(Languages::swe);
else
if( ini_value[13] == "5" )
languages.SetCurrentLanguage(Languages::ru);
else

View File

@ -198,6 +198,7 @@
#define IDM_LANGUAGE_DANISH 40013
#define IDM_LANGUAGE_CHINESE 40014
#define IDM_LANGUAGE_RUSSIAN 40015
#define IDM_LANGUAGE_SWEDISH 40016
#define IDM_CLOSE_PROGRAM 40020
#define IDM_EDIT_UNDO 40030
#define IDM_EDIT_PASTE 40031

View File

@ -32,6 +32,7 @@ BEGIN
MENUITEM "&Danish", 40013
MENUITEM "&Chinese", 40014
MENUITEM "&Russian", 40015
MENUITEM "&Swedish", 40016
END
MENUITEM SEPARATOR
MENUITEM "&Close", 40020

View File

@ -44,6 +44,7 @@
*/
#include <string>
#include <ttmath/ttmath.h>
/*!
@ -194,3 +195,5 @@ static Messages messages;
// so that we have the logarythmic time to find the special function to call
return messages.Call(message, hWnd, message, wParam, lParam);
}