gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Sat Jun 15 10:15:29 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/7306f2dd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/91adf868 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4e057188 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/65df53de (commit)
	from  https://github.com/Gnucash/gnucash/commit/354e8687 (commit)



commit 7306f2dda31ff729c5b48eb60ada9cd8e7da0151
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Jun 15 15:43:56 2019 +0200

    Always add srfi64-extras.scm to dist tarball
    
    Even if the current machine doesn't have srfi-64 a machine
    downloading the dist tarball may and hence could compile
    and run the srfi-64 based tests.

diff --git a/libgnucash/engine/test/CMakeLists.txt b/libgnucash/engine/test/CMakeLists.txt
index b3b307dbb..4f784c9a7 100644
--- a/libgnucash/engine/test/CMakeLists.txt
+++ b/libgnucash/engine/test/CMakeLists.txt
@@ -241,10 +241,6 @@ if (HAVE_SRFI64)
     FALSE
     )
 
-  set(srfi64_extras_SCHEME_DIST
-    srfi64-extras.scm
-    )
-
 endif (HAVE_SRFI64)
 
 gnc_add_scheme_test_targets(scm-test-engine
@@ -311,6 +307,7 @@ set(test_engine_SOURCES_DIST
 )
 
 set(test_engine_SCHEME_DIST
+        srfi64-extras.scm
         test-create-account.scm
         test-engine-extras.scm
         test-scm-query-import.scm
@@ -321,5 +318,4 @@ set(test_engine_EXTRA_DIST
 )
 
 set_dist_list(test_engine_DIST CMakeLists.txt
-        ${srfi64_extras_SCHEME_DIST}
         ${test_engine_SOURCES_DIST} ${test_engine_SCHEME_DIST} ${test_engine_EXTRA_DIST})

commit 91adf868f40632d98f4f8857429313f083f0350d
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jun 14 16:21:23 2019 +0200

    BuildSystem - drop load path for no longer existing build-config.scm

diff --git a/common/cmake_modules/GncAddSchemeTargets.cmake b/common/cmake_modules/GncAddSchemeTargets.cmake
index 25adc8aa3..1b72aadae 100644
--- a/common/cmake_modules/GncAddSchemeTargets.cmake
+++ b/common/cmake_modules/GncAddSchemeTargets.cmake
@@ -78,8 +78,7 @@ function(make_scheme_targets _TARGET _SOURCE_FILES _OUTPUT_DIR _GUILE_DEPENDS
   endif(MAKE_LINKS)
 
   # Construct the guile source and compiled load paths
-  set(_GUILE_LOAD_PATH "${current_srcdir}"
-      "${current_bindir}" "${CMAKE_BINARY_DIR}/libgnucash/scm")  # to pick up generated build-config.scm
+  set(_GUILE_LOAD_PATH "${current_srcdir}" "${current_bindir}")
   set(_GUILE_LOAD_COMPILED_PATH "${current_bindir}")
   # VERSION_GREATER_EQUAL introduced in CMake 3.7.
   if(MINGW64 AND (${GUILE_EFFECTIVE_VERSION} VERSION_GREATER 2.2 OR

commit 4e0571882e64689c1c2382ad6506137a8f139ded
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Fri Jun 14 13:55:29 2019 +0200

    Sample Graphs report updates
    
    - Add the report to the Examples menu
    - Tweak strings and make them translatable
    - Rename report to better match the report title

diff --git a/gnucash/report/reports/CMakeLists.txt b/gnucash/report/reports/CMakeLists.txt
index 469039e47..d7e81eb50 100644
--- a/gnucash/report/reports/CMakeLists.txt
+++ b/gnucash/report/reports/CMakeLists.txt
@@ -55,6 +55,7 @@ set(reports_example_SCHEME
   example/average-balance.scm
   example/daily-reports.scm
   example/hello-world.scm
+  example/sample-graphs.scm
   example/welcome-to-gnucash.scm
 )
 
diff --git a/gnucash/report/reports/example/test-graphing.scm b/gnucash/report/reports/example/sample-graphs.scm
similarity index 88%
rename from gnucash/report/reports/example/test-graphing.scm
rename to gnucash/report/reports/example/sample-graphs.scm
index 41463f1c2..357af0bf6 100644
--- a/gnucash/report/reports/example/test-graphing.scm
+++ b/gnucash/report/reports/example/sample-graphs.scm
@@ -23,13 +23,23 @@
 ;; It illustrates the basic techniques used to create
 ;; new reports for GnuCash.
 
-(define-module (gnucash report reports example test-graphing))
+(define-module (gnucash report reports example sample-graphs))
 (use-modules (gnucash utilities)) 
 (use-modules (gnucash gnc-module))
 
+;; Add this module to enable translatable strings
+;; Use (N_ string) to mark string for translation (it won't be translated on the spot)
+;; Use (_ string) to use a translation of this string if it exists.
+(use-modules (gnucash gettext))
+
 (gnc:module-load "gnucash/report/report-system" 0)
 (gnc:module-load "gnucash/gnome-utils" 0) ;for gnc-build-url
 
+;; It's common to define frequently used strings once
+;; This also helps getting more consistent messages which simplifies
+;; the life of translators later on.
+(define reportname (N_ "Sample Graphs"))
+
 (define (simple-pie-chart)
   (let ((chart (gnc:make-html-chart)))
     ;; the minimum chartjs-based html-chart requires the following settings
@@ -124,40 +134,28 @@
 
   (let ((document (gnc:make-html-document)))
 
-    (gnc:html-document-set-title! document "Graphs")
-
-    (gnc:html-document-add-object!
-     document
-     (gnc:make-html-text
-      (gnc:html-markup-p
-       (gnc:html-markup/format
-        "Sample graphs:"))))
+    (gnc:html-document-set-title! document (_ reportname))
 
     (gnc:html-document-add-object!
      document
-     (gnc:make-html-text (gnc:html-markup-p "Pie:")))
+     (gnc:make-html-text (gnc:html-markup-p (_ "Pie:"))))
     (gnc:html-document-add-object! document (simple-pie-chart))
 
     (gnc:html-document-add-object!
      document
-     (gnc:make-html-text (gnc:html-markup-p "Bar, normal:")))
+     (gnc:make-html-text (gnc:html-markup-p (_ "Bar, normal:"))))
     (gnc:html-document-add-object! document (simple-bar-chart #f))
 
     (gnc:html-document-add-object!
      document
-     (gnc:make-html-text (gnc:html-markup-p "Bar, stacked:")))
+     (gnc:make-html-text (gnc:html-markup-p (_ "Bar, stacked:"))))
     (gnc:html-document-add-object! document (simple-bar-chart #t))
 
     (gnc:html-document-add-object!
      document
-     (gnc:make-html-text (gnc:html-markup-p "Scatter:")))
+     (gnc:make-html-text (gnc:html-markup-p (_ "Scatter:"))))
     (gnc:html-document-add-object! document (simple-scatter-chart))
 
-    (gnc:html-document-add-object!
-     document
-     (gnc:make-html-text
-      (gnc:html-markup-p "Done.")))
-
     document))
 
 ;; Here we define the actual report with gnc:define-report
@@ -169,7 +167,7 @@
  ;; The name of this report. This will be used, among other things,
  ;; for making its menu item in the main menu. You need to use the
  ;; untranslated value here!
- 'name "Test Graphing"
+ 'name reportname
 
  ;; The GUID for this report. This string should be unique, set once
  ;; and left alone forever after that. In theory, you could use any
@@ -180,11 +178,11 @@
 
  ;; The name in the menu
  ;; (only necessary if it differs from the name)
- 'menu-name "Sample graphs"
+ 'menu-name (_ reportname)
 
  ;; A tip that is used to provide additional information about the
  ;; report to the user.
- 'menu-tip "Sample graphs"
+ 'menu-tip (_ reportname)
 
  ;; A path describing where to put the report in the menu system.
  ;; In this case, it's going under the utility menu.
diff --git a/gnucash/report/reports/reports.scm b/gnucash/report/reports/reports.scm
index 8d87b6411..a96cbc5ec 100644
--- a/gnucash/report/reports/reports.scm
+++ b/gnucash/report/reports/reports.scm
@@ -97,8 +97,6 @@
      (get-report-list rpt-dir-str)))
   report-dirs)
 
-;;(use-modules (gnucash report test-graphing))
-
 (use-modules (gnucash gnc-module))
 (gnc:module-load "gnucash/engine" 0)
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 157509e17..e244701ec 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -427,6 +427,7 @@ gnucash/report/reports/aging.scm
 gnucash/report/reports/example/average-balance.scm
 gnucash/report/reports/example/daily-reports.scm
 gnucash/report/reports/example/hello-world.scm
+gnucash/report/reports/example/sample-graphs.scm
 gnucash/report/reports/example/welcome-to-gnucash.scm
 gnucash/report/reports/reports.scm
 gnucash/report/reports/standard/account-piecharts.scm

commit 65df53deae7c1849c00ebb4f21ed7e872b2981a3
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Jun 12 21:38:43 2019 +0200

    Fix distcheck

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index ab10c65d9..3b9e0dfa5 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -19,7 +19,7 @@ set(doc_DATA
 )
 
 set(doc_noinst_DATA
-        build-aix.txt build-solaris.txt CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in
+        build-solaris.txt CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in
         misc-notes.txt README.HBCI README.OFX README.translator.txt tip_of_the_day.list.c
         TRANSLATION_HOWTO)
 



Summary of changes:
 common/cmake_modules/GncAddSchemeTargets.cmake     |  3 +-
 doc/CMakeLists.txt                                 |  2 +-
 gnucash/report/reports/CMakeLists.txt              |  1 +
 .../{test-graphing.scm => sample-graphs.scm}       | 40 ++++++++++------------
 gnucash/report/reports/reports.scm                 |  2 --
 libgnucash/engine/test/CMakeLists.txt              |  6 +---
 po/POTFILES.in                                     |  1 +
 7 files changed, 24 insertions(+), 31 deletions(-)
 rename gnucash/report/reports/example/{test-graphing.scm => sample-graphs.scm} (88%)



More information about the gnucash-changes mailing list