From f24c2c8bdd2d09d12b53654a520714669434d232 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 11 Oct 2022 14:05:23 -0700 Subject: [PATCH 1/8] Instrument failure to set the account when creating a split. --- .../backend/sql/gnc-sql-column-table-entry.hpp | 13 ++++++++++++- libgnucash/backend/sql/gnc-transaction-sql.cpp | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp b/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp index 7ea6e93c94..926029a38c 100644 --- a/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp +++ b/libgnucash/backend/sql/gnc-sql-column-table-entry.hpp @@ -187,6 +187,7 @@ public: void* pObject, T get_ref) const noexcept { + static QofLogModule log_module = G_LOG_DOMAIN; g_return_if_fail (pObject != NULL); try @@ -199,9 +200,19 @@ public: if (target != nullptr) set_parameter (pObject, target, get_setter(obj_name), m_gobj_param_name); + else + DEBUG("GUID %s returned null %s reference.", + val.c_str(), m_gobj_param_name); + } + else + { + if (val.empty()) DEBUG("Can't load empty guid string for column %s", m_col_name); + else DEBUG("Invalid GUID %s for column %s", val.c_str(), m_col_name); } } - catch (std::invalid_argument&) {} + catch (std::invalid_argument& err) { + DEBUG("set_parameter threw %s for column %s", err.what(), m_col_name); + } } diff --git a/libgnucash/backend/sql/gnc-transaction-sql.cpp b/libgnucash/backend/sql/gnc-transaction-sql.cpp index f794f67022..05ad24b7d2 100644 --- a/libgnucash/backend/sql/gnc-transaction-sql.cpp +++ b/libgnucash/backend/sql/gnc-transaction-sql.cpp @@ -239,6 +239,12 @@ load_single_split (GncSqlBackend* sql_be, GncSqlRow& row) qof_backend_set_error ((QofBackend*)sql_be, ERR_BACKEND_DATA_CORRUPT); pSplit = NULL; } + if (!xaccSplitGetAccount(pSplit)) + { + gchar guidstr[GUID_ENCODING_LENGTH + 1]; + guid_to_string_buff (qof_instance_get_guid (pSplit), guidstr); + PERR("Split %s created with no account!", guidstr); + } return pSplit; } static void From 14dee67011310e3dec7b299ccc140141c2c3157a Mon Sep 17 00:00:00 2001 From: Guille Lopez Date: Mon, 10 Oct 2022 20:09:19 +0200 Subject: [PATCH 2/8] Translation update by Guille Lopez using Weblate po/es.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 0 failing checks (0.0%) Translation: GnuCash/Program (Spanish) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/ Co-authored-by: Guille Lopez --- po/es.po | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/po/es.po b/po/es.po index 538c98ecfd..bc970927d6 100644 --- a/po/es.po +++ b/po/es.po @@ -83,7 +83,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug." "cgi?product=GnuCash&component=Translations\n" "POT-Creation-Date: 2022-09-11 23:24+0200\n" -"PO-Revision-Date: 2022-09-28 23:23+0000\n" +"PO-Revision-Date: 2022-10-10 18:09+0000\n" "Last-Translator: Guille Lopez \n" "Language-Team: Spanish \n" @@ -16014,10 +16014,8 @@ msgstr "ISIN, CUSI_P u otro código" #: gnucash/gtkbuilder/dialog-commodity.glade:485 #: gnucash/gtkbuilder/dialog-commodity.glade:767 #: gnucash/gtkbuilder/dialog-price.glade:138 -#, fuzzy -#| msgid "Namespace" msgid "Nam_espace" -msgstr "Espacio de nombres" +msgstr "_Espacio de nombres" #: gnucash/gtkbuilder/dialog-commodity.glade:500 msgid "_Symbol/abbreviation" @@ -22157,7 +22155,7 @@ msgstr "Deshabilitado" #. Translators: Menu entry, no full stop #: gnucash/import-export/import-main-matcher.c:1314 msgid "_Assign a transfer account to the selection" -msgstr "_Asignar una cuenta a la selección para transferir." +msgstr "_Asignar una cuenta a la selección para transferir" #. Translators: Menu entry, no full stop #: gnucash/import-export/import-main-matcher.c:1365 From 5b7932dfb53d26ddba1b46d007bd1d4f708ceabb Mon Sep 17 00:00:00 2001 From: Pablo Fernandez Date: Mon, 10 Oct 2022 20:09:20 +0200 Subject: [PATCH 3/8] Translation update by Pablo Fernandez using Weblate po/glossary/es.po: 100.0% (222 of 222 strings; 0 fuzzy) 0 failing checks (0.0%) Translation: GnuCash/Glossary (Spanish) Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/es/ Co-authored-by: Pablo Fernandez --- po/glossary/es.po | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/po/glossary/es.po b/po/glossary/es.po index a768a3f0f5..d610747e03 100644 --- a/po/glossary/es.po +++ b/po/glossary/es.po @@ -11,14 +11,15 @@ # Guille Lopez , 2021. # Francisco Serrador , 2021, 2022. # Cow , 2022. +# Pablo Fernandez , 2022. msgid "" msgstr "" "Project-Id-Version: GnuCash 4.8\n" "Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug." "cgi?product=GnuCash&component=Translations\n" "POT-Creation-Date: 2021-12-05 20:11+0100\n" -"PO-Revision-Date: 2022-05-21 11:16+0000\n" -"Last-Translator: Francisco Serrador \n" +"PO-Revision-Date: 2022-10-10 18:09+0000\n" +"Last-Translator: Pablo Fernandez \n" "Language-Team: Spanish \n" "Language: es\n" @@ -26,7 +27,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.13-dev\n" +"X-Generator: Weblate 4.14.1\n" #. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)" msgid "Term (Dear translator: This file will never be visible to the user!)" @@ -110,7 +111,7 @@ msgstr "ahorro" #. "-" msgid "account type: Stock" -msgstr "Existencias" +msgstr "Acciones" #. "This account type (new in gnucash-2.4.0) is used when exchanging or trading amounts from one currency into another" msgid "account type: trading" From 95a88140341b451f2d3215fb672de0425b15dd92 Mon Sep 17 00:00:00 2001 From: Philippe Lamare Date: Wed, 12 Oct 2022 13:25:47 +0200 Subject: [PATCH 4/8] Translation update by Philippe Lamare using Weblate po/fr.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 0 failing checks (0.0%) Translation: GnuCash/Program (French) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/ Co-authored-by: Philippe Lamare --- po/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/fr.po b/po/fr.po index d91cd827f0..8e560d577d 100644 --- a/po/fr.po +++ b/po/fr.po @@ -37,7 +37,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug." "cgi?product=GnuCash&component=Translations\n" "POT-Creation-Date: 2022-09-11 23:24+0200\n" -"PO-Revision-Date: 2022-10-02 15:52+0000\n" +"PO-Revision-Date: 2022-10-12 11:25+0000\n" "Last-Translator: Philippe Lamare \n" "Language-Team: French \n" @@ -46,7 +46,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.14.1\n" +"X-Generator: Weblate 4.15-dev\n" #: borrowed/goffice/go-charmap-sel.c:70 msgid "Arabic" @@ -16808,7 +16808,7 @@ msgid "" "generated code" msgstr "" "Cela va remplacer le champ de code de tous les comptes fils avec un nouveau " -"code auto-généré." +"code auto-généré" #: gnucash/gtkbuilder/dialog-account-picker.glade:34 msgid "_Show documentation" From d27de50c3553e70f59841187537f83ae2dc99172 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 8 Oct 2022 14:37:00 +0800 Subject: [PATCH 5/8] [assistant-stock-transaction] input positive capgains for Credit income acct In a long position, a positive capital gain indicates the unit price has increased from Buy to Sell. In a short position, a positive capital gain indicates the unit price has decreased from Short Sell to Cover Buy. i.e. when inputting capital gains, the UI amount being positive indicates the income account has a credit value. i.e. the investor has enjoyed a 'profit' on their transaction. --- gnucash/gnome/assistant-stock-transaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp index d05fb34b83..f83f8a5fee 100644 --- a/gnucash/gnome/assistant-stock-transaction.cpp +++ b/gnucash/gnome/assistant-stock-transaction.cpp @@ -292,7 +292,7 @@ static const TxnTypeVec short_types FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO, // fees_amt false, // fees_capitalize FieldMask::DISABLED, // dividend_amt - FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt + FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt // Translators: this is a stock transaction describing cover // buying stock, and recording capital gain/loss N_("Buy to cover short"), From 026c795c82e42ebc9469ac473ffff0ffeabdfeac Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 18 Oct 2022 09:39:38 +0800 Subject: [PATCH 6/8] xxxgtk_textview_get_text returns a char* which must be freed --- gnucash/gnome/gnc-plugin-page-budget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gnucash/gnome/gnc-plugin-page-budget.c b/gnucash/gnome/gnc-plugin-page-budget.c index 8b6722c044..a6c1034abf 100644 --- a/gnucash/gnome/gnc-plugin-page-budget.c +++ b/gnucash/gnome/gnc-plugin-page-budget.c @@ -1300,6 +1300,7 @@ gnc_plugin_page_budget_cmd_budget_note(GtkAction *action, if (!strlen(txt)) txt = NULL; gnc_budget_set_account_period_note(priv->budget, acc, period_num, txt); + g_free (txt); break; default: break; From e93f985f173aec932ab57d2076ff28cc921a2d7e Mon Sep 17 00:00:00 2001 From: "Abdul Quddos (AQN)" Date: Mon, 17 Oct 2022 20:54:03 +0200 Subject: [PATCH 7/8] Translation update by Abdul Quddos (AQN) using Weblate po/ur.po: 71.5% (3866 of 5401 strings; 1035 fuzzy) 1103 failing checks (20.4%) Translation: GnuCash/Program (Urdu) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ur/ Translation update by Abdul Quddos (AQN) using Weblate po/ur.po: 71.3% (3854 of 5401 strings; 1036 fuzzy) 1105 failing checks (20.4%) Translation: GnuCash/Program (Urdu) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ur/ Co-authored-by: Abdul Quddos (AQN) --- po/ur.po | 71 +++++++++++++++++++++++++++----------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/po/ur.po b/po/ur.po index 21bba8862e..a39d15d4fd 100644 --- a/po/ur.po +++ b/po/ur.po @@ -2,39 +2,39 @@ # Copyright (C) 2014, C-DAC, GIST, Pune, India. # Atiur Rahman Khan , 2014. # Frank H. Ellenberger , 2021. +# Abdul Quddos (AQN) , 2022. msgid "" msgstr "" "Project-Id-Version: GnuCash 4.12-pre1\n" -"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug.cgi?" -"product=GnuCash&component=Translations\n" +"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug." +"cgi?product=GnuCash&component=Translations\n" "POT-Creation-Date: 2022-09-11 23:24+0200\n" -"PO-Revision-Date: 2021-03-11 20:02+0000\n" -"Last-Translator: Frank H. Ellenberger \n" -"Language-Team: Urdu \n" +"PO-Revision-Date: 2022-10-17 18:53+0000\n" +"Last-Translator: Abdul Quddos (AQN) \n" +"Language-Team: Urdu " +"\n" "Language: ur\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5.2-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: borrowed/goffice/go-charmap-sel.c:70 msgid "Arabic" -msgstr "" +msgstr "عربی" #: borrowed/goffice/go-charmap-sel.c:71 msgid "Baltic" -msgstr "" +msgstr "بالٹک" #: borrowed/goffice/go-charmap-sel.c:72 -#, fuzzy msgid "Central European" -msgstr "یوروپی" +msgstr "مرکزی یوروپین" #: borrowed/goffice/go-charmap-sel.c:73 msgid "Chinese" -msgstr "" +msgstr "چائینیز" #: borrowed/goffice/go-charmap-sel.c:74 #: gnucash/gnome-utils/assistant-xml-encoding.c:242 @@ -42,29 +42,28 @@ msgid "Cyrillic" msgstr "سریلیك" #: borrowed/goffice/go-charmap-sel.c:75 -#, fuzzy msgid "Greek" -msgstr "ہرا" +msgstr "یونانی" #: borrowed/goffice/go-charmap-sel.c:76 msgid "Hebrew" -msgstr "" +msgstr "عبرانی" #: borrowed/goffice/go-charmap-sel.c:77 msgid "Indian" -msgstr "" +msgstr "ہندی" #: borrowed/goffice/go-charmap-sel.c:78 msgid "Japanese" -msgstr "" +msgstr "جاپانی" #: borrowed/goffice/go-charmap-sel.c:79 msgid "Korean" -msgstr "" +msgstr "کورین" #: borrowed/goffice/go-charmap-sel.c:80 msgid "Turkish" -msgstr "" +msgstr "ترکیا" #: borrowed/goffice/go-charmap-sel.c:81 #: gnucash/gnome-utils/assistant-xml-encoding.c:224 @@ -73,12 +72,11 @@ msgstr "یونی كوڈ" #: borrowed/goffice/go-charmap-sel.c:82 msgid "Vietnamese" -msgstr "" +msgstr "ویتنامی" #: borrowed/goffice/go-charmap-sel.c:83 -#, fuzzy msgid "Western" -msgstr "رجسٹر" +msgstr "مغربی" #: borrowed/goffice/go-charmap-sel.c:84 #: gnucash/gtkbuilder/assistant-loan.glade:966 @@ -114,57 +112,56 @@ msgstr "" #: borrowed/goffice/go-charmap-sel.c:122 msgid "Arabic (Windows-1256)" -msgstr "" +msgstr "عربی (ونڈوز-1256)" #: borrowed/goffice/go-charmap-sel.c:123 msgid "Armenian (ARMSCII-8)" -msgstr "" +msgstr "آرمینیائی (اے آر ایم ایس سی آئی آئی -8)" #: borrowed/goffice/go-charmap-sel.c:124 -#, fuzzy msgid "Baltic (ISO-8859-13)" -msgstr "ISO-8859-13 (بالٹیك) " +msgstr "ISO-8859-13 (بالٹیك)" #: borrowed/goffice/go-charmap-sel.c:125 msgid "Baltic (ISO-8859-4)" -msgstr "" +msgstr "بالٹک (آئی ایس او-8859-4)" #: borrowed/goffice/go-charmap-sel.c:126 msgid "Baltic (Windows-1257)" -msgstr "" +msgstr "بالٹک (ونڈوز-1257)" #: borrowed/goffice/go-charmap-sel.c:127 -#, fuzzy msgid "Celtic (ISO-8859-14)" -msgstr "ISO-8859-14 (سیلٹیك) " +msgstr "ISO-8859-14 (سیلٹیك)" #: borrowed/goffice/go-charmap-sel.c:128 msgid "Central European (IBM-852)" -msgstr "" +msgstr "وسطی یورپی (آئی بی ایم -852)" #: borrowed/goffice/go-charmap-sel.c:130 msgid "Central European (ISO-8859-2)" -msgstr "" +msgstr "وسطی یورپی (آئی ایس او-8859-2)" #: borrowed/goffice/go-charmap-sel.c:132 msgid "Central European (MacCE)" -msgstr "" +msgstr "وسطی یورپی (میک سی ای)" #: borrowed/goffice/go-charmap-sel.c:134 msgid "Central European (Windows-1250)" -msgstr "" +msgstr "وسطی یورپی (ونڈوز -1250)" #: borrowed/goffice/go-charmap-sel.c:136 msgid "Chinese Simplified (GB18030)" -msgstr "" +msgstr "چینی آسان (جی بی 18030)" #: borrowed/goffice/go-charmap-sel.c:137 +#, fuzzy msgid "Chinese Simplified (GB2312)" -msgstr "" +msgstr "چینی آسان (جی بی 2312)" #: borrowed/goffice/go-charmap-sel.c:138 msgid "Chinese Simplified (GBK)" -msgstr "" +msgstr "آسان چینی (جی بی کے)" #: borrowed/goffice/go-charmap-sel.c:139 msgid "Chinese Simplified (HZ)" From 8f1794cb2828a60eba8fbf3d42065bbef3d760e8 Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Mon, 17 Oct 2022 20:54:03 +0200 Subject: [PATCH 8/8] Translation update by Milo Ivir using Weblate po/glossary/hr.po: 100.0% (216 of 216 strings; 0 fuzzy) 0 failing checks (0.0%) Translation: GnuCash/Glossary (Croatian) Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/hr/ Co-authored-by: Milo Ivir --- po/glossary/hr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/glossary/hr.po b/po/glossary/hr.po index b7e777e267..aadbf8b959 100644 --- a/po/glossary/hr.po +++ b/po/glossary/hr.po @@ -7,7 +7,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug." "cgi?product=GnuCash&component=Translations\n" "POT-Creation-Date: 2021-12-05 20:11+0100\n" -"PO-Revision-Date: 2022-03-11 11:54+0000\n" +"PO-Revision-Date: 2022-10-17 18:53+0000\n" "Last-Translator: Milo Ivir \n" "Language-Team: Croatian \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 4.15-dev\n" #. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)" msgid "Term (Dear translator: This file will never be visible to the user!)"