Skip to content

Commit

Permalink
[price-quotes] show if F::Q not installed, remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Aug 13, 2019
1 parent 112cf99 commit fab1c8d
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions libgnucash/scm/price-quotes.scm
Expand Up @@ -603,26 +603,15 @@ Run 'gnc-fq-update' as root to install them." "\n")))
(lambda (x) (not (string? x)))
prices)))))))

; (define (get-1-quote exchange . items)
; (let ((cmd (apply list 'fetch exchange items))
; (quoter (run-sub-process #f
; gnc:*finance-quote-helper*
; gnc:*finance-quote-helper*)))
; (and quoter
; (write cmd (caddr quoter))
; (newline (caddr quoter))
; (force-output (caddr quoter))
; (let ((result (read (cadr quoter))))
; (close-input-port (cadr quoter))
; (close-output-port (caddr quoter))
; result))))

(define (gnc:price-quotes-install-sources)
(let ((sources (gnc:fq-check-sources)))
(if (list? sources)
(begin
;; Translators: ~A is the version string
(cond
((list? sources)
;; Translators: ~A is the version string
(format #t (_ "Found Finance::Quote version ~A.") (car sources))
(newline)
(gnc:msg "Found Finance::Quote version " (car sources))
(gnc-quote-source-set-fq-installed (car sources) (cdr sources))))))
(gnc:msg "Found Finance::Quote version " (car sources))
(gnc-quote-source-set-fq-installed (car sources) (cdr sources)))
(else
(display "No Finance::Quote found\n")

This comment has been minimized.

Copy link
@fellen

fellen Aug 13, 2019

Member

@christopherlam Can we have

  1. a full sentence. IMHO a "!" would be appropriate here.
  2. the same string for both channels.
  3. Mark the string for translation (N_ ...)
  4. Output the translated_string (_ ...) to the user and the untranslated to the logs?
(gnc:msg "No Finance::Quote found")))))

0 comments on commit fab1c8d

Please sign in to comment.