<br> to <br/> and ~s to ~a

This commit is contained in:
Christopher Lam 2018-03-04 08:36:39 +08:00
parent 551e98435d
commit 41322ec3d8
4 changed files with 35 additions and 36 deletions

View File

@ -635,10 +635,10 @@
(gnc:html-table-append-row! (gnc:html-table-append-row!
table table
(list (list
(string-expand (gnc:owner-get-address-dep owner) #\newline "<br>"))) (string-expand (gnc:owner-get-address-dep owner) #\newline "<br/>")))
(gnc:html-table-append-row! (gnc:html-table-append-row!
table table
(list "<br>")) (list "<br/>"))
(for-each (for-each
(lambda (order) (lambda (order)
(let* ((reference (gncOrderGetReference order))) (let* ((reference (gncOrderGetReference order)))
@ -722,7 +722,7 @@
'attribute (list "align" "right") 'attribute (list "align" "right")
'attribute (list "width" "33%")) 'attribute (list "width" "33%"))
(gnc:html-table-append-row! (gnc:html-table-append-row!
table (list (string-expand (string-append (if addy addy "") (if id (string-append "\n" id) "")) #\newline "<br>") table (list (string-expand (string-append (if addy addy "") (if id (string-append "\n" id) "")) #\newline "<br/>")
(string-expand (string-expand
(string-append (if phone (string-append (if phone
(string-append (_ "Phone:") " " phone) (string-append (_ "Phone:") " " phone)
@ -730,7 +730,7 @@
(if fax (string-append (if phone "\n" "") (if fax (string-append (if phone "\n" "")
(_ "Fax:") " " fax) (_ "Fax:") " " fax)
"")) ""))
#\newline "<br>" ) #\newline "<br/>" )
(if url (string-append (_ "Web:") " " url) ""))) (if url (string-append (_ "Web:") " " url) "")))
;; oli-custom - I didn't want today's date on the invoice. ;; oli-custom - I didn't want today's date on the invoice.
@ -863,20 +863,20 @@
(due-date (gncInvoiceGetDateDue invoice))) (due-date (gncInvoiceGetDateDue invoice)))
(set! date-table (make-date-table)) (set! date-table (make-date-table))
(gnc:html-table-append-row! (gnc:html-table-append-row!
;; Translators: %s below is "Invoice" or "Bill" or even the ;; Translators: ~a below is "Invoice" or "Bill" or even the
;; custom title from the options. The next column contains ;; custom title from the options. The next column contains
;; the number of the document. ;; the number of the document.
date-table (list (format #f (_ "~s&nbsp;#") title) (gncInvoiceGetID invoice))) date-table (list (format #f (_ "~a&nbsp;#") title) (gncInvoiceGetID invoice)))
;; Translators: The first %s below is "Invoice" or ;; Translators: The first ~a below is "Invoice" or
;; "Bill" or even the custom title from the ;; "Bill" or even the custom title from the
;; options. This string sucks for i18n, but I don't ;; options. This string sucks for i18n, but I don't
;; have a better solution right now without breaking ;; have a better solution right now without breaking
;; other people's invoices. ;; other people's invoices.
(make-date-row! date-table (format #f (_ "~s&nbsp;Date") title) post-date date-format) (make-date-row! date-table (format #f (_ "~a&nbsp;Date") title) post-date date-format)
(make-date-row! date-table (_ "Due&nbsp;Date") due-date date-format) (make-date-row! date-table (_ "Due Date") due-date date-format)
date-table) date-table)
(gnc:make-html-text (gnc:make-html-text
(string-append title "<br>" (string-append title "<br/>"
(_ "Invoice in progress..."))))) (_ "Invoice in progress...")))))
(gnc:html-table-append-row! (gnc:html-table-append-row!
@ -910,7 +910,7 @@
(gnc:make-html-text (gnc:make-html-text
(string-append (string-append
(_ "Reference") ":&nbsp;" (_ "Reference") ":&nbsp;"
(string-expand billing-id #\newline "<br>")))) (string-expand billing-id #\newline "<br/>"))))
(make-break! document))))) (make-break! document)))))
(if (opt-val "Display" "Billing Terms") (if (opt-val "Display" "Billing Terms")
@ -922,7 +922,7 @@
(gnc:make-html-text (gnc:make-html-text
(string-append (string-append
(_ "Terms") ":&nbsp;" (_ "Terms") ":&nbsp;"
(string-expand terms #\newline "<br>"))))))) (string-expand terms #\newline "<br/>")))))))
(make-break! document) (make-break! document)
@ -948,7 +948,7 @@
document document
(gnc:make-html-text (gnc:make-html-text
(string-append name-str ":&nbsp;" (string-append name-str ":&nbsp;"
(string-expand name #\newline "<br>"))))))) (string-expand name #\newline "<br/>")))))))
(make-break! document) (make-break! document)
@ -960,13 +960,13 @@
document document
(gnc:make-html-text (gnc:make-html-text
(string-append contact-str ":&nbsp;" (string-append contact-str ":&nbsp;"
(string-expand contact #\newline "<br>"))))))) (string-expand contact #\newline "<br/>")))))))
(gnc:html-document-add-object! (gnc:html-document-add-object!
document document
(gnc:make-html-text (gnc:make-html-text
(gnc:html-markup-br) (gnc:html-markup-br)
(string-expand (opt-val "Display" "Extra Notes") #\newline "<br>") (string-expand (opt-val "Display" "Extra Notes") #\newline "<br/>")
(gnc:html-markup-br)))) (gnc:html-markup-br))))
; else ; else

View File

@ -478,10 +478,10 @@
(gnc:html-table-append-row! (gnc:html-table-append-row!
table table
(list (list
(string-expand (gnc:owner-get-name-and-address-dep owner) #\newline "<br>"))) (string-expand (gnc:owner-get-name-and-address-dep owner) #\newline "<br/>")))
(gnc:html-table-append-row! (gnc:html-table-append-row!
table table
(list "<br>")) (list "<br/>"))
(set-last-row-style! (set-last-row-style!
table "td" table "td"
'attribute (list "valign" "top")) 'attribute (list "valign" "top"))
@ -521,7 +521,7 @@
(gnc:html-table-append-row! table (list (if name name ""))) (gnc:html-table-append-row! table (list (if name name "")))
(gnc:html-table-append-row! table (list (string-expand (gnc:html-table-append-row! table (list (string-expand
(if addy addy "") (if addy addy "")
#\newline "<br>"))) #\newline "<br/>")))
(gnc:html-table-append-row! table (list (gnc:html-table-append-row! table (list
(strftime (strftime
date-format date-format

View File

@ -3176,11 +3176,10 @@
"center" "center"
(gnc:html-markup/format (gnc:html-markup/format
(string-append (if (and (gnc-get-current-book-tax-name) (string-append (if (and (gnc-get-current-book-tax-name)
(not (string=? "" (not (string-null? (gnc-get-current-book-tax-name))))
(gnc-get-current-book-tax-name)))) "Tax Name: ~a<br/>"
"Tax Name: %s<BR>"
"~a") "~a")
"Period from ~a to ~s<BR>Tax Year ~a<BR>Tax Entity Type: %s<BR>All amounts in USD unless otherwise noted") "Period from ~a to ~a<br/>Tax Year ~a<br/>Tax Entity Type: ~a<br/>All amounts in USD unless otherwise noted")
(gnc-get-current-book-tax-name) (gnc-get-current-book-tax-name)
from-date from-date
to-date to-date
@ -3199,7 +3198,7 @@
doc (gnc:make-html-text doc (gnc:make-html-text
(gnc:html-markup-p (gnc:html-markup-p
(gnc:html-markup/format (gnc:html-markup/format
"<BR>The following Account(s) have errors with their Income Tax code assignments (use 'Edit->Tax Report Options' to correct):")))) "<br/>The following Account(s) have errors with their Income Tax code assignments (use 'Edit->Tax Report Options' to correct):"))))
(gnc:html-document-add-object! doc error-table) (gnc:html-document-add-object! doc error-table)
(gnc:html-table-append-row! (gnc:html-table-append-row!
error-table error-table
@ -3262,7 +3261,7 @@
doc (gnc:make-html-text doc (gnc:make-html-text
(gnc:html-markup-p (gnc:html-markup-p
(gnc:html-markup/format (gnc:html-markup/format
" <BR> ")))) " <br/> "))))
) )
) )
@ -3453,29 +3452,29 @@
(gnc:html-markup-p (gnc:html-markup-p
(gnc:html-markup/format (gnc:html-markup/format
(string-append (string-append
"Selected Report Options:<BR>" "Selected Report Options:<br/>"
;; selected accounts ;; selected accounts
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; suppress 0.00 values ;; suppress 0.00 values
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; full acct names ;; full acct names
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; transfer detail ;; transfer detail
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; TXF detail ;; TXF detail
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; action:memo detail ;; action:memo detail
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; transaction detail ;; transaction detail
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; special dates ;; special dates
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; currency conversion date ;; currency conversion date
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
;; alternate transaction shading ;; alternate transaction shading
(if (gnc-html-engine-supports-css) (if (gnc-html-engine-supports-css)
"" ""
"&nbsp; &nbsp; &nbsp; ~a <BR>" "&nbsp; &nbsp; &nbsp; ~a <br/>"
)) ))
(if (not (null? user-sel-accnts)) (if (not (null? user-sel-accnts))
"Subset of accounts" "Subset of accounts"

View File

@ -431,7 +431,7 @@
(gnc:html-document-set-title! (gnc:html-document-set-title!
doc (format #f doc (format #f
(string-append "~a ~a " (string-append "~a ~a "
(_ "For Period Covering %s to %s")) (_ "For Period Covering ~a to ~a"))
company-name report-title company-name report-title
(qof-print-date start-date-printable) (qof-print-date start-date-printable)
(qof-print-date end-date))) (qof-print-date end-date)))