gnucash maint: Remove build_year from translatable copyright string

Frank H.Ellenberger fell at code.gnucash.org
Sun Sep 10 20:40:08 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/240bc32e (commit)
	from  https://github.com/Gnucash/gnucash/commit/6c8275a7 (commit)



commit 240bc32e57098344a979791b38c4517e337a0fb0
Author: fell <frank.h.ellenberger at gmail.com>
Date:   Mon Sep 11 02:40:03 2017 +0200

    Remove build_year from translatable copyright string

diff --git a/src/core-utils/CMakeLists.txt b/src/core-utils/CMakeLists.txt
index c48f7ee..b379fe3 100644
--- a/src/core-utils/CMakeLists.txt
+++ b/src/core-utils/CMakeLists.txt
@@ -61,11 +61,13 @@ SET (GNC_VERSION_H_IN
 
 #define GNUCASH_SCM \"git\"
 #define GNUCASH_BUILD_DATE \"@GNUCASH_BUILD_DATE@\"
+#define GNUCASH_BUILD_YEAR \"@GNUCASH_BUILD_YEAR@\"
 #include \"gnc-vcs-info.h\"
 #endif
 ")
 
 STRING(TIMESTAMP GNUCASH_BUILD_DATE "%Y-%m-%d")
+STRING(TIMESTAMP GNUCASH_BUILD_DATE "%Y")
 
 STRING(CONFIGURE ${GNC_VERSION_H_IN} GNC_VERSION_H_CONTENT)
 
diff --git a/src/core-utils/Makefile.am b/src/core-utils/Makefile.am
index 514eb9d..8f2f70b 100644
--- a/src/core-utils/Makefile.am
+++ b/src/core-utils/Makefile.am
@@ -176,6 +176,7 @@ _gnc-version.h: gnc-vcs-info.h Makefile
 		echo "#define GNUCASH_SCM \"$$scm_info\"" >> _gnc-version.h ; \
 	fi
 	@echo "#define GNUCASH_BUILD_DATE \"`date +%Y-%m-%d`\"" >> _gnc-version.h
+	@echo "#define GNUCASH_BUILD_YEAR \"`date +%Y`\"" >> _gnc-version.h
 	@echo "#include \"gnc-vcs-info.h\""          >> _gnc-version.h
 	@echo "#endif"                               >> _gnc-version.h
 
diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c
index ee37483..347805a 100644
--- a/src/gnome-utils/gnc-main-window.c
+++ b/src/gnome-utils/gnc-main-window.c
@@ -4369,7 +4369,8 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
     {
 	const gchar *fixed_message = _("The GnuCash personal finance manager. "
                                    "The GNU way to manage your money!");
-	const gchar *copyright = _("© 1997-2017 Contributors");
+	gchar *copyright = g_strdup_printf(_("© 1997-%s Contributors"),
+			                             GNUCASH_BUILD_YEAR);
 	gchar **authors = get_file_strsplit("AUTHORS");
 	gchar **documenters = get_file_strsplit("DOCUMENTERS");
 	gchar *license = get_file("LICENSE");
@@ -4412,6 +4413,7 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
 		      NULL);
 
 	g_free(message);
+	g_free(copyright);
 	if (license)     g_free(license);
 	if (documenters) g_strfreev(documenters);
 	if (authors)     g_strfreev(authors);



Summary of changes:
 src/core-utils/CMakeLists.txt     | 2 ++
 src/core-utils/Makefile.am        | 1 +
 src/gnome-utils/gnc-main-window.c | 4 +++-
 3 files changed, 6 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list