gnucash master: CsvPriceImp - change a few translatable strings to match the once in CsvTxImp

Geert Janssens gjanssens at code.gnucash.org
Fri Feb 17 08:16:05 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/ea606875 (commit)
	from  https://github.com/Gnucash/gnucash/commit/64329414 (commit)



commit ea60687524c0ef50a7a1f83f1d512d52c423c17b
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Feb 17 14:15:59 2023 +0100

    CsvPriceImp - change a few translatable strings to match the once in CsvTxImp
    
    Saves translators a few cycles.

diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
index 5df745d19..8e9a70bf2 100644
--- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
+++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
@@ -234,17 +234,17 @@ void GncImportPrice::set (GncPricePropType prop_type, const std::string& value,
     }
     catch (const std::invalid_argument& e)
     {
-        auto err_str = (bl::format (std::string{_("Column '{1}' could not be understood.\n")}) %
-                        std::string{_(gnc_price_col_type_strs[prop_type])}).str() +
-                        e.what();
+        auto err_str = (bl::format (std::string{_("{1}: {2}")}) %
+                        std::string{_(gnc_price_col_type_strs[prop_type])} %
+                        e.what()).str();
         m_errors.emplace(prop_type, err_str);
         throw std::invalid_argument (err_str);
     }
     catch (const std::out_of_range& e)
     {
-        auto err_str = (bl::format (std::string{_("Column '{1}' could not be understood.\n")}) %
-                        std::string{_(gnc_price_col_type_strs[prop_type])}).str() +
-                        e.what();
+        auto err_str = (bl::format (std::string{_("{1}: {2}")}) %
+                        std::string{_(gnc_price_col_type_strs[prop_type])} %
+                        e.what()).str();
         m_errors.emplace(prop_type, err_str);
         throw std::invalid_argument (err_str);
     }



Summary of changes:
 gnucash/import-export/csv-imp/gnc-imp-props-price.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list