diff --git a/BuildTools/macosx/install_name.py b/BuildTools/macosx/install_name.py index d41dc2f3..e6aab873 100644 --- a/BuildTools/macosx/install_name.py +++ b/BuildTools/macosx/install_name.py @@ -31,12 +31,16 @@ def ProcessDependency(dir_path, dylib_name): copyitem = '/usr/local/opt/icu4c/lib/libicuuc.71.dylib' if item == '@loader_path/libicuuc.72.dylib': copyitem = '/usr/local/opt/icu4c/lib/libicuuc.72.dylib' + if item == '@loader_path/libicuuc.73.dylib': + copyitem = '/usr/local/opt/icu4c/lib/libicuuc.73.dylib' if item == '@loader_path/libicudata.70.dylib': copyitem = '/usr/local/opt/icu4c/lib/libicudata.70.dylib' if item == '@loader_path/libicudata.71.dylib': copyitem = '/usr/local/opt/icu4c/lib/libicudata.71.dylib' if item == '@loader_path/libicudata.72.dylib': copyitem = '/usr/local/opt/icu4c/lib/libicudata.72.dylib' + if item == '@loader_path/libicudata.73.dylib': + copyitem = '/usr/local/opt/icu4c/lib/libicudata.73.dylib' if item == '@loader_path/libbrotlicommon.1.dylib': copyitem = '/usr/local/opt/brotli/lib/libbrotlicommon.1.dylib' if item == '@rpath/libIlmThread-3_1.30.dylib': diff --git a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss index 93b00618..17df7900 100644 --- a/BuildTools/windows/installer/32bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/32bit/GeoDa-win7+.iss @@ -27,6 +27,7 @@ Name: "en"; MessagesFile: "compiler:Default.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" [dirs] Name: "{app}"; Check: InitializeSetup @@ -202,6 +203,10 @@ begin begin langCode := '153'; // Portuguese end; + 5: + begin + langCode := '79'; // French + end; end; end; @@ -228,6 +233,7 @@ begin ComboBox.Items.Add('Spanish'); ComboBox.Items.Add('Russian'); ComboBox.Items.Add('Portuguese'); + ComboBox.Items.Add('French'); ComboBox.ItemIndex := 0; ComboBox.OnChange := @ComboBoxChange; langCode := '58'; diff --git a/BuildTools/windows/installer/32bit/GeoDa.iss b/BuildTools/windows/installer/32bit/GeoDa.iss index 05f6b633..28bb5586 100644 --- a/BuildTools/windows/installer/32bit/GeoDa.iss +++ b/BuildTools/windows/installer/32bit/GeoDa.iss @@ -27,6 +27,7 @@ Name: "en"; MessagesFile: "compiler:Default.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" [dirs] Name: "{app}"; Permissions: everyone-full; Check: InitializeSetup @@ -201,6 +202,10 @@ begin begin langCode := '153'; // Portuguese end; + 5: + begin + langCode := '79'; // French + end; end; end; @@ -227,6 +232,7 @@ begin ComboBox.Items.Add('Spanish'); ComboBox.Items.Add('Russian'); ComboBox.Items.Add('Portuguese'); + ComboBox.Items.Add('French'); ComboBox.ItemIndex := 0; ComboBox.OnChange := @ComboBoxChange; langCode := '58'; diff --git a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss index aaf014c8..b6a7815a 100644 --- a/BuildTools/windows/installer/64bit/GeoDa-win7+.iss +++ b/BuildTools/windows/installer/64bit/GeoDa-win7+.iss @@ -36,9 +36,11 @@ ShowLanguageDialog=yes [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" [dirs] Name: "{app}"; Check: InitializeSetup @@ -215,6 +217,10 @@ begin begin langCode := '153'; // Portuguese end; + 5: + begin + langCode := '79'; // French + end; end; end; @@ -241,6 +247,7 @@ begin ComboBox.Items.Add('Spanish'); ComboBox.Items.Add('Russian'); ComboBox.Items.Add('Portuguese'); + ComboBox.Items.Add('French'); ComboBox.ItemIndex := 0; ComboBox.OnChange := @ComboBoxChange; langCode := '58'; diff --git a/BuildTools/windows/installer/64bit/GeoDa.iss b/BuildTools/windows/installer/64bit/GeoDa.iss index cfa5d3f2..e1f8a254 100644 --- a/BuildTools/windows/installer/64bit/GeoDa.iss +++ b/BuildTools/windows/installer/64bit/GeoDa.iss @@ -39,6 +39,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" [dirs] Name: "{app}"; Permissions: everyone-full; Check: InitializeSetup @@ -214,6 +215,10 @@ begin begin langCode := '153'; // Portuguese end; + 5: + begin + langCode := '79'; // French + end; end; end; @@ -240,6 +245,7 @@ begin ComboBox.Items.Add('Spanish'); ComboBox.Items.Add('Russian'); ComboBox.Items.Add('Portuguese'); + ComboBox.Items.Add('French'); ComboBox.ItemIndex := 0; ComboBox.OnChange := @ComboBoxChange; langCode := '58'; diff --git a/DialogTools/PreferenceDlg.cpp b/DialogTools/PreferenceDlg.cpp index 021132ad..41b4a108 100644 --- a/DialogTools/PreferenceDlg.cpp +++ b/DialogTools/PreferenceDlg.cpp @@ -270,12 +270,14 @@ void PreferenceDlg::Init() wxStaticText* lbl_txt113 = new wxStaticText(vis_page, wxID_ANY, lbl113); cmb113 = new wxComboBox(vis_page, wxID_ANY, "", pos, wxDefaultSize, 0, NULL, wxCB_READONLY); - cmb113->Append(""); - cmb113->Append("English"); - cmb113->Append("Chinese (Simplified)"); - cmb113->Append("Spanish"); - cmb113->Append("Russian"); - cmb113->Append("Portuguese"); + cmb113->Append(wxEmptyString); + cmb113->Append(GdaConst::gda_lang_chinese); + cmb113->Append(GdaConst::gda_lang_english); + cmb113->Append(GdaConst::gda_lang_french); + cmb113->Append(GdaConst::gda_lang_portuguese); + cmb113->Append(GdaConst::gda_lang_russian); + cmb113->Append(GdaConst::gda_lang_spanish); + cmb113->Bind(wxEVT_COMBOBOX, &PreferenceDlg::OnChooseLanguage, this); //cmb113->Disable(); @@ -940,17 +942,20 @@ void PreferenceDlg::OnChooseLanguage(wxCommandEvent& ev) wxConfigBase * config = new wxFileConfig("GeoDa", wxEmptyString, configPath); if (lan_sel > 0) { + wxString sel_lan_name = cmb113->GetString(lan_sel); long language = wxLANGUAGE_UNKNOWN; - if (lan_sel == 1) { + if (sel_lan_name == GdaConst::gda_lang_english) { language = wxLANGUAGE_ENGLISH + 1; - } else if (lan_sel == 2) { + } else if (sel_lan_name == GdaConst::gda_lang_chinese) { language = 45;//wxLANGUAGE_CHINESE + 1; - } else if (lan_sel == 3) { + } else if (sel_lan_name == GdaConst::gda_lang_spanish) { language = 179;//wxLANGUAGE_SPANISH; - } else if (lan_sel == 4) { - language = wxLANGUAGE_RUSSIAN; - } else if (lan_sel == 5) { - language = wxLANGUAGE_PORTUGUESE; + } else if (sel_lan_name == GdaConst::gda_lang_russian) { + language = wxLANGUAGE_RUSSIAN; // 159 + } else if (sel_lan_name == GdaConst::gda_lang_portuguese) { + language = wxLANGUAGE_PORTUGUESE; // 153 + } else if (sel_lan_name == GdaConst::gda_lang_french) { + language = wxLANGUAGE_FRENCH; // 79 } config->DeleteEntry("Translation"); config->SetPath("Translation"); diff --git a/GdaConst.cpp b/GdaConst.cpp index 3a9eadb8..9458fa61 100644 --- a/GdaConst.cpp +++ b/GdaConst.cpp @@ -428,6 +428,13 @@ const wxString GdaConst::gda_lbl_2sigma = "> 2Std"; const wxPen* GdaConst::default_myshape_pen=0; const wxBrush* GdaConst::default_myshape_brush=0; +const wxString GdaConst::gda_lang_english = "English"; +const wxString GdaConst::gda_lang_chinese = "Chinese (Simplified)"; +const wxString GdaConst::gda_lang_french = "French"; +const wxString GdaConst::gda_lang_portuguese = "Portuguese"; +const wxString GdaConst::gda_lang_russian = "Russian"; +const wxString GdaConst::gda_lang_spanish = "Spanish"; + //background color -- this is light gray const wxColour GdaConst::backColor(192, 192, 192); // background color -- this is light gray diff --git a/GdaConst.h b/GdaConst.h index b059f55b..b05c0b2c 100644 --- a/GdaConst.h +++ b/GdaConst.h @@ -240,6 +240,14 @@ class GdaConst { static const wxString gda_lbl_1sigma_2sigma; static const wxString gda_lbl_2sigma; + // Languages + static const wxString gda_lang_english; + static const wxString gda_lang_chinese; + static const wxString gda_lang_french; + static const wxString gda_lang_portuguese; + static const wxString gda_lang_russian; + static const wxString gda_lang_spanish; + // Preferences static double gda_autoweight_stop; static bool gda_draw_map_labels;