diff --git a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp index 2b8f55eff4..535f4efb5a 100644 --- a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp +++ b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp @@ -38,6 +38,7 @@ extern "C" #include #include +#include "gnc-path.h" #include "gnc-ui.h" #include "gnc-uri-utils.h" #include "gnc-ui-util.h" @@ -63,6 +64,11 @@ extern "C" #include "gnc-fw-tokenizer.hpp" #include "gnc-csv-tokenizer.hpp" +#include + +namespace bl = boost::locale; +using namespace boost::locale; + #define MIN_COL_WIDTH 70 #define GNC_PREFS_GROUP "dialogs.import.csv" #define ASSISTANT_CSV_IMPORT_TRANS_CM_CLASS "assistant-csv-trans-import" @@ -1937,8 +1943,13 @@ CsvImpTransAssist::assist_summary_page_prepare () gtk_assistant_remove_action_widget (csv_imp_asst, help_button); gtk_assistant_remove_action_widget (csv_imp_asst, cancel_button); + bl::generator gen; + gen.add_messages_path(gnc_path_get_datadir()); + gen.add_messages_domain(PACKAGE); + auto text = std::string(""); - text += _("The transactions were imported from the file '") + m_file_name + "'."; + // FIXME Rather than passing a locale generator below we probably should set std::locale::global appropriately somewhere. + text += (bl::format (translate ("The transactions were imported from the file '{1}'.")) % m_file_name).str(gen("")); text += ""; gtk_label_set_markup (GTK_LABEL(summary_label), text.c_str()); }