From 645cc9461dddd95c0b417191da6f72218947e197 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Wed, 17 Aug 2022 09:20:37 +0800 Subject: [PATCH 1/7] [core-utils] modify gnc:format to accept - this allows use of varnames such as ${report-title} --- bindings/guile/core-utils.scm | 2 +- bindings/guile/test/test-core-utils.scm | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm index d1bc46af61..dfe98fc5a6 100644 --- a/bindings/guile/core-utils.scm +++ b/bindings/guile/core-utils.scm @@ -111,7 +111,7 @@ (set-exception-printer! 'unbound-variable print-unbound-variable-error) ;; format. -(define %regex (make-regexp "[$][{]([[:alnum:]]+)[}]")) +(define %regex (make-regexp "[$][{]([[:alnum:]\\-]+)[}]")) (define (gnc:format str . bindings) (define hash (make-hash-table)) (define (substitute m) diff --git a/bindings/guile/test/test-core-utils.scm b/bindings/guile/test/test-core-utils.scm index c36734c18e..0910cae055 100644 --- a/bindings/guile/test/test-core-utils.scm +++ b/bindings/guile/test/test-core-utils.scm @@ -30,6 +30,10 @@ "basic test" (gnc:format "basic ${job}" 'job "test")) + (test-equal "one substitution with hyphen" + "master chief" + (gnc:format "master ${job-title}" 'job-title "chief")) + (test-equal "two substitutions out of order" "basic test" (gnc:format "${difficulty} ${job}" 'job "test" 'difficulty "basic")) From 580efe091c74137fac1835301419ee8301bfb3a9 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Wed, 17 Aug 2022 07:45:09 +0800 Subject: [PATCH 2/7] Bug 797725 - Untranslatable string "For Period Covering ~a to ~a" --- .../reports/standard/account-summary.scm | 19 ++++++++++-------- .../reports/standard/equity-statement.scm | 11 +++++----- .../reports/standard/income-statement.scm | 9 +++++---- .../report/reports/standard/trial-balance.scm | 20 ++++++++++--------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/gnucash/report/reports/standard/account-summary.scm b/gnucash/report/reports/standard/account-summary.scm index cd4259e0ae..08b56252c5 100644 --- a/gnucash/report/reports/standard/account-summary.scm +++ b/gnucash/report/reports/standard/account-summary.scm @@ -318,14 +318,17 @@ (exchange-fn (gnc:case-exchange-fn price-source report-commodity to-date))) (gnc:html-document-set-title! - doc (string-append - company-name " " report-title " " - (if sx? - ;; Translators: This is part of the report title, which is capitalzed in English, but not all other languages - (format #f (G_ "For Period Covering ~a to ~a") - (qof-print-date from-date) - (qof-print-date to-date)) - (qof-print-date to-date)))) + doc + (if sx? + (gnc:format (G_ "${company-name} ${report-title} For Period Covering ${start} to ${end}") + 'company-name company-name + 'report-title report-title + 'start (qof-print-date from-date) + 'end (qof-print-date to-date)) + (gnc:format (G_ "${company-name} ${report-title} ${date}") + 'company-name company-name + 'report-title report-title + 'date (qof-print-date to-date)))) (if (null? accounts) diff --git a/gnucash/report/reports/standard/equity-statement.scm b/gnucash/report/reports/standard/equity-statement.scm index 8661214eb7..302bb7542b 100644 --- a/gnucash/report/reports/standard/equity-statement.scm +++ b/gnucash/report/reports/standard/equity-statement.scm @@ -298,12 +298,11 @@ (gnc:account-get-comm-balance-at-date account end-date #f)) (gnc:html-document-set-title! - doc (format #f - (string-append "~a ~a " - (G_ "For Period Covering ~a to ~a")) - company-name report-title - (qof-print-date start-date-printable) - (qof-print-date end-date))) + doc (gnc:format (G_ "${company-name} ${report-title} For Period Covering ${start} to ${end}") + 'company-name company-name + 'report-title report-title + 'start (qof-print-date start-date-printable) + 'end (qof-print-date end-date))) (if (null? accounts) diff --git a/gnucash/report/reports/standard/income-statement.scm b/gnucash/report/reports/standard/income-statement.scm index ebc53a9cd3..85662ef779 100644 --- a/gnucash/report/reports/standard/income-statement.scm +++ b/gnucash/report/reports/standard/income-statement.scm @@ -403,10 +403,11 @@ (gnc:html-table-append-ruler! table (* 2 tree-depth))) (gnc:html-document-set-title! - doc (format #f (string-append "~a ~a " (G_ "For Period Covering ~a to ~a")) - company-name report-title - (qof-print-date start-date-printable) - (qof-print-date end-date))) + doc (gnc:format (G_ "${company-name} ${report-title} For Period Covering ${start} to ${end}") + 'company-name company-name + 'report-title report-title + 'start (qof-print-date start-date-printable) + 'end (qof-print-date end-date))) (if (null? accounts) diff --git a/gnucash/report/reports/standard/trial-balance.scm b/gnucash/report/reports/standard/trial-balance.scm index c3c543ae3b..e6032db912 100644 --- a/gnucash/report/reports/standard/trial-balance.scm +++ b/gnucash/report/reports/standard/trial-balance.scm @@ -399,15 +399,17 @@ (period-for (string-append " " (G_ "for Period")))) (gnc:html-document-set-title! - doc (if (eq? report-variant 'current) - (format #f "~a ~a ~a" - company-name report-title - (qof-print-date end-date)) - (format #f (string-append "~a ~a " - (G_ "For Period Covering ~a to ~a")) - company-name report-title - (qof-print-date start-date-printable) - (qof-print-date end-date)))) + doc + (if (eq? report-variant 'current) + (gnc:format (G_ "${company-name} ${report-title} ${date}") + 'company-name company-name + 'report-title report-title + 'date (qof-print-date end-date)) + (gnc:format (G_ "${company-name} ${report-title} For Period Covering ${start} to ${end}") + 'company-name company-name + 'report-title report-title + 'start (qof-print-date start-date-printable) + 'end (qof-print-date end-date)))) (if (null? accounts) From 2e7424469e1aa2dad803422147c01edd988c8a0d Mon Sep 17 00:00:00 2001 From: Arve Eriksson <031299870@telia.com> Date: Wed, 18 Jan 2023 19:50:18 +0100 Subject: [PATCH 3/7] Translation update by Arve Eriksson <031299870@telia.com> using Weblate po/glossary/sv.po: 100.0% (216 of 216 strings; 0 fuzzy) 0 failing checks (0.0%) Translation: GnuCash/Glossary (Swedish) Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/sv/ Co-authored-by: Arve Eriksson <031299870@telia.com> --- po/glossary/sv.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/glossary/sv.po b/po/glossary/sv.po index d6bed23b0c..705bb17a1d 100644 --- a/po/glossary/sv.po +++ b/po/glossary/sv.po @@ -3,17 +3,17 @@ # Christian Rose , 2001, 2002, 2003. # Jonas Norling , 2006. # Kristoffer Grundström , 2021. -# Arve Eriksson <031299870@telia.com>, 2021, 2022. +# Arve Eriksson <031299870@telia.com>, 2021, 2022, 2023. # # $Id$ # 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" +"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-01-03 03:41+0000\n" +"PO-Revision-Date: 2023-01-18 09:51+0000\n" "Last-Translator: Arve Eriksson <031299870@telia.com>\n" "Language-Team: Swedish \n" @@ -22,7 +22,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.10.1\n" +"X-Generator: Weblate 4.15.1-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!)" @@ -791,11 +791,11 @@ msgstr "skattetyp: försäljningsskatt" #. "'Goods and Service Tax' is one form of sales tax." msgid "tax type: GST" -msgstr "skattetyp: GST" +msgstr "skattetyp: moms" #. "'Value Added Tax' is the other form of sales tax." msgid "tax type: VAT" -msgstr "skattetyp: mervärdesskatt (moms)" +msgstr "skattetyp: mervärdesskatt" #. "If you create a new e.g. style sheet, you can start from a template." msgid "template" From c186e04695c3b9706e8c62f3bff80460e5a3da38 Mon Sep 17 00:00:00 2001 From: Avi Markovitz Date: Wed, 18 Jan 2023 19:50:20 +0100 Subject: [PATCH 4/7] Translation update by Avi Markovitz using Weblate po/he.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 10 failing checks (0.1%) Translation: GnuCash/Program (Hebrew) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/he/ Translation update by Avi Markovitz using Weblate po/he.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 10 failing checks (0.1%) Translation: GnuCash/Program (Hebrew) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/he/ Co-authored-by: Avi Markovitz --- po/he.po | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/po/he.po b/po/he.po index 4c8b9abb6e..86361cc323 100644 --- a/po/he.po +++ b/po/he.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: GnuCash 4.13-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-12-04 19:47-0800\n" -"PO-Revision-Date: 2023-01-10 12:51+0000\n" -"Last-Translator: Yaron Shahrabani \n" +"PO-Revision-Date: 2023-01-18 17:04+0000\n" +"Last-Translator: Avi Markovitz \n" "Language-Team: Hebrew \n" "Language: he\n" @@ -8882,7 +8882,7 @@ msgstr "תחילת רבעון קודם" #: gnucash/gnome-utils/gnc-period-select.c:75 #: libgnucash/app-utils/date-utilities.scm:930 msgid "Start of this year" -msgstr "תחילת השנה הנוכחית" +msgstr "תחילת שנה נוכחית" #: gnucash/gnome-utils/gnc-period-select.c:76 #: libgnucash/app-utils/date-utilities.scm:944 @@ -8919,7 +8919,7 @@ msgstr "סוף רבעון קודם" #: gnucash/gnome-utils/gnc-period-select.c:91 #: libgnucash/app-utils/date-utilities.scm:937 msgid "End of this year" -msgstr "סוף השנה הנוכחית" +msgstr "סוף שנה נוכחית" #: gnucash/gnome-utils/gnc-period-select.c:92 #: libgnucash/app-utils/date-utilities.scm:951 @@ -11631,7 +11631,7 @@ msgstr "" #: gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in:165 #: gnucash/gtkbuilder/dialog-preferences.glade:1212 msgid "In the current calendar year" -msgstr "השנה האזרחית הנוכחית" +msgstr "בשנה האזרחית הנוכחית" #: gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in:166 #: gnucash/gschemas/org.gnucash.GnuCash.gschema.xml.in:171 @@ -16473,7 +16473,7 @@ msgstr "השלמת נתונים" #: gnucash/gtkbuilder/dialog-preferences.glade:1202 msgid "When a date is entered without year, it should be taken" -msgstr "כאשר תאריך מוזן ללא שנה, השנה תושלם" +msgstr "אם בעת הזנת תאריך, לא הוזנה השנה, ההזנה אמורה להתקבל" #: gnucash/gtkbuilder/dialog-preferences.glade:1218 msgid "" @@ -28957,23 +28957,23 @@ msgstr "היום הראשון, בלוח השנה האזרחית הקודמת." #: libgnucash/app-utils/date-utilities.scm:954 msgid "Last day of the previous calendar year." -msgstr "היום האחרון, בלוח השנה האזרחית הקודמת." +msgstr "יום אחרון, בלוח השנה האזרחית הקודמת." #: libgnucash/app-utils/date-utilities.scm:958 msgid "Start of next year" -msgstr "תחילת השנה הבאה" +msgstr "תחילת שנה הבאה" #: libgnucash/app-utils/date-utilities.scm:961 msgid "First day of the next calendar year." -msgstr "היום הראשון, בבלוח השנה האזרחית הבאה." +msgstr "יום ראשון, בלוח השנה האזרחית הבאה." #: libgnucash/app-utils/date-utilities.scm:965 msgid "End of next year" -msgstr "סוף השנה הבאה" +msgstr "סוף שנה הבאה" #: libgnucash/app-utils/date-utilities.scm:968 msgid "Last day of the next calendar year." -msgstr "היום האחרון, בלוח השנה הבאה." +msgstr "יום אחרון, בלוח השנה האזרחית הבאה." #: libgnucash/app-utils/date-utilities.scm:972 msgid "Start of accounting period" From 1aeda8ae92b43d263c752e9a673e4ff5d0c08b50 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 18 Jan 2023 19:50:23 +0100 Subject: [PATCH 5/7] Translation update by Yaron Shahrabani using Weblate po/he.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 10 failing checks (0.1%) Translation: GnuCash/Program (Hebrew) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/he/ Co-authored-by: Yaron Shahrabani --- po/he.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/he.po b/po/he.po index 86361cc323..c27f2c6108 100644 --- a/po/he.po +++ b/po/he.po @@ -5861,8 +5861,8 @@ msgid "" "Add the current report's configuration to the 'Reports->Saved Report " "Configurations' menu. The report configuration will be saved in the file %s." msgstr "" -"הוספת תצורת־הדוח הנוכחי לתפריט 'דוחותlarr;תצורות־דוחות שמורים'. תצורת־הדוח " -"תשמר לקובץ %s." +"הוספת תצורת־הדוח הנוכחי לתפריט 'דוחות←תצורות־דוחות שמורים'. תצורת־הדוח " +"תישמר לקובץ %s." #: gnucash/gnome/gnc-plugin-page-report.c:1205 msgid "_Print Report..." From 69cf911afa5dbca08a365d56bd7820c91451a63b Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Thu, 19 Jan 2023 17:49:54 +0100 Subject: [PATCH 6/7] Translation update by Christopher Lam using Weblate po/fr.po: 100.0% (5401 of 5401 strings; 0 fuzzy) 1 failing checks (0.1%) Translation: GnuCash/Program (French) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/ Co-authored-by: Christopher Lam --- po/fr.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/po/fr.po b/po/fr.po index 727e8c21d0..323a13bc36 100644 --- a/po/fr.po +++ b/po/fr.po @@ -14,7 +14,7 @@ # La Boussole , 2018. # Christopher Lam, 2018 # K. Herbert , 2020. -# Christopher Lam , 2020, 2021. +# Christopher Lam , 2020, 2021, 2023. # Laurent DÉRÉDEC , 2021. # Julien Humbert , 2021. # Un Anonyme , 2021. @@ -34,11 +34,11 @@ msgid "" msgstr "" "Project-Id-Version: GnuCash 4.13-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-12-04 19:47-0800\n" -"PO-Revision-Date: 2022-10-12 11:25+0000\n" -"Last-Translator: Philippe Lamare \n" +"PO-Revision-Date: 2023-01-19 16:49+0000\n" +"Last-Translator: Christopher Lam \n" "Language-Team: French \n" "Language: fr\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.15-dev\n" +"X-Generator: Weblate 4.15.1\n" #: borrowed/goffice/go-charmap-sel.c:70 msgid "Arabic" @@ -6622,7 +6622,7 @@ msgstr "Exporter" #. to be used as toolbar button label. #: gnucash/gnome/gnc-plugin-page-report.c:1140 msgid "Save Config" -msgstr "Enregistrer Config" +msgstr "Enregistrer la configuration" #. Translators: This string is meant to be a short alternative for "Save Report Configuration As..." #. to be used as toolbar button label. From 2d66631feace5fce13b8cae136f57790a86e698b Mon Sep 17 00:00:00 2001 From: Vin Date: Fri, 20 Jan 2023 20:01:45 +0100 Subject: [PATCH 7/7] Translation update by Vin using Weblate po/ru.po: 77.9% (4210 of 5401 strings; 816 fuzzy) 326 failing checks (6.0%) Translation: GnuCash/Program (Russian) Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ru/ Co-authored-by: Vin --- po/ru.po | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/po/ru.po b/po/ru.po index 3d9714b9ab..71f5fc0557 100644 --- a/po/ru.po +++ b/po/ru.po @@ -15,14 +15,15 @@ # МАН69К , 2022. # Nikita Samoilov , 2022. # Vik , 2022. +# Vin , 2023. msgid "" msgstr "" "Project-Id-Version: GnuCash 4.13-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-12-04 19:47-0800\n" -"PO-Revision-Date: 2022-08-27 13:17+0000\n" -"Last-Translator: Vik \n" +"PO-Revision-Date: 2023-01-20 19:01+0000\n" +"Last-Translator: Vin \n" "Language-Team: Russian \n" "Language: ru\n" @@ -31,7 +32,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -"X-Generator: Weblate 4.14.1-dev\n" +"X-Generator: Weblate 4.15.1\n" "X-Source-Language: C\n" # For the translation in '../borrowed/goffice/go-charmap-sel.c' see @@ -16211,10 +16212,8 @@ msgid "All _accounts" msgstr "Все счета" #: gnucash/gtkbuilder/dialog-find-account.glade:165 -#, fuzzy -#| msgid " Search " msgid "Search scope" -msgstr " Поиск " +msgstr "Область поиска" #: gnucash/gtkbuilder/dialog-find-account.glade:191 msgid "Account Full Name" @@ -25992,9 +25991,8 @@ msgid "Barchart" msgstr "Гистограмма активов" #: gnucash/report/reports/standard/balsheet-pnl.scm:1191 -#, fuzzy msgid " to " -msgstr "%s по %s" +msgstr " по " #: gnucash/report/reports/standard/balsheet-pnl.scm:1254 #: gnucash/report/reports/standard/trial-balance.scm:855