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

View File

@ -478,10 +478,10 @@
(gnc:html-table-append-row!
table
(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!
table
(list "<br>"))
(list "<br/>"))
(set-last-row-style!
table "td"
'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 (string-expand
(if addy addy "")
#\newline "<br>")))
#\newline "<br/>")))
(gnc:html-table-append-row! table (list
(strftime
date-format

View File

@ -3176,11 +3176,10 @@
"center"
(gnc:html-markup/format
(string-append (if (and (gnc-get-current-book-tax-name)
(not (string=? ""
(gnc-get-current-book-tax-name))))
"Tax Name: %s<BR>"
(not (string-null? (gnc-get-current-book-tax-name))))
"Tax Name: ~a<br/>"
"~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)
from-date
to-date
@ -3199,7 +3198,7 @@
doc (gnc:make-html-text
(gnc:html-markup-p
(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-table-append-row!
error-table
@ -3262,7 +3261,7 @@
doc (gnc:make-html-text
(gnc:html-markup-p
(gnc:html-markup/format
" <BR> "))))
" <br/> "))))
)
)
@ -3453,29 +3452,29 @@
(gnc:html-markup-p
(gnc:html-markup/format
(string-append
"Selected Report Options:<BR>"
"Selected Report Options:<br/>"
;; selected accounts
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; suppress 0.00 values
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; full acct names
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; transfer detail
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; TXF detail
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; action:memo detail
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; transaction detail
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; special dates
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; currency conversion date
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
;; alternate transaction shading
(if (gnc-html-engine-supports-css)
""
"&nbsp; &nbsp; &nbsp; ~a <BR>"
"&nbsp; &nbsp; &nbsp; ~a <br/>"
))
(if (not (null? user-sel-accnts))
"Subset of accounts"

View File

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