From 4ee0c3ef46b5379aff3bb34efea3f477cf0f11b1 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 12 Mar 2019 15:32:20 +0800 Subject: [PATCH] i18n: fix embedded translated strings --- .../business-reports/customer-summary.scm | 13 ++++++++++--- gnucash/report/business-reports/job-report.scm | 17 ++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/gnucash/report/business-reports/customer-summary.scm b/gnucash/report/business-reports/customer-summary.scm index 139ef6dd58..4ab7f785dc 100644 --- a/gnucash/report/business-reports/customer-summary.scm +++ b/gnucash/report/business-reports/customer-summary.scm @@ -1009,9 +1009,16 @@ (gnc:html-document-add-object! document (gnc:make-html-text - (format #f - (_ "No valid ~a selected. Click on the Options button to select a company.") - (_ type-str))))) ;; FIXME because of translations: Please change this string into full sentences instead of format, because in non-english languages the "no valid" has different forms depending on the grammatical gender of the "%s". + (string-append + (cond + ((eqv? type GNC-OWNER-CUSTOMER) + (_ "No valid customer selected.")) + ((eqv? type GNC-OWNER-VENDOR) + (_ "No valid vendor selected.")) + ((eqv? type GNC-OWNER-EMPLOYEE) + (_ "No valid employee selected."))) + " " + (_ "Click on the \"Options\" button to select a company."))))) (qof-query-destroy owner-query) (qof-query-destroy toplevel-income-query) diff --git a/gnucash/report/business-reports/job-report.scm b/gnucash/report/business-reports/job-report.scm index 82b4fd1011..f6b015cf09 100644 --- a/gnucash/report/business-reports/job-report.scm +++ b/gnucash/report/business-reports/job-report.scm @@ -619,11 +619,18 @@ ;; else.... (gnc:html-document-add-object! - document - (gnc:make-html-text - (format #f - (_ "No valid ~a selected. Click on the Options button to select a company.") - (_ type-str))))) ;; FIXME because of translations: Please change this string into full sentences instead of format, because in non-english languages the "no valid" has different forms depending on the grammatical gender of the "%s". + document + (gnc:make-html-text + (string-append + (cond + ((eqv? type GNC-OWNER-CUSTOMER) + (_ "No valid customer selected.")) + ((eqv? type GNC-OWNER-VENDOR) + (_ "No valid vendor selected.")) + ((eqv? type GNC-OWNER-EMPLOYEE) + (_ "No valid employee selected."))) + " " + (_ "Click on the \"Options\" button to select a company."))))) (qof-query-destroy query) document))