From b0b53808408cb0d219034635e3c105f4a5df13d3 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Thu, 19 Jan 2006 00:40:32 +0000 Subject: [PATCH] Rework schema infrastructure so that all schema strings will appear for translation, and the translations will be incorporated back into the schema files. Fixed bugs #327507 and #327353. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12863 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 8 +++++ make-gnucash-potfiles.in | 4 ++- .../business-gnome/schemas/Makefile.am | 17 ++++------ ...gnucash_dialog_business_common.schemas.in} | 0 src/gnome-utils/schemas/Makefile.am | 19 ++++------- ...chemas => apps_gnucash_history.schemas.in} | 0 src/gnome/schemas/Makefile.am | 33 ++++++++----------- ...pps_gnucash_dialog_commodities.schemas.in} | 0 ... => apps_gnucash_dialog_common.schemas.in} | 0 ... => apps_gnucash_dialog_prices.schemas.in} | 0 ... apps_gnucash_dialog_reconcile.schemas.in} | 0 ...h_dialog_scheduled_transctions.schemas.in} | 0 ...as => apps_gnucash_dialog_totd.schemas.in} | 0 ...chemas => apps_gnucash_general.schemas.in} | 0 ...hemas => apps_gnucash_warnings.schemas.in} | 0 ...cash_window_pages_account_tree.schemas.in} | 0 ..._gnucash_window_pages_register.schemas.in} | 0 src/import-export/hbci/schemas/Makefile.am | 17 ++++------ ...as => apps_gnucash_dialog_hbci.schemas.in} | 0 src/import-export/schemas/Makefile.am | 17 ++++------ ...gnucash_import_generic_matcher.schemas.in} | 0 21 files changed, 50 insertions(+), 65 deletions(-) rename src/business/business-gnome/schemas/{apps_gnucash_dialog_business_common.schemas => apps_gnucash_dialog_business_common.schemas.in} (100%) rename src/gnome-utils/schemas/{apps_gnucash_history.schemas => apps_gnucash_history.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_commodities.schemas => apps_gnucash_dialog_commodities.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_common.schemas => apps_gnucash_dialog_common.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_prices.schemas => apps_gnucash_dialog_prices.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_reconcile.schemas => apps_gnucash_dialog_reconcile.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_scheduled_transctions.schemas => apps_gnucash_dialog_scheduled_transctions.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_dialog_totd.schemas => apps_gnucash_dialog_totd.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_general.schemas => apps_gnucash_general.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_warnings.schemas => apps_gnucash_warnings.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_window_pages_account_tree.schemas => apps_gnucash_window_pages_account_tree.schemas.in} (100%) rename src/gnome/schemas/{apps_gnucash_window_pages_register.schemas => apps_gnucash_window_pages_register.schemas.in} (100%) rename src/import-export/hbci/schemas/{apps_gnucash_dialog_hbci.schemas => apps_gnucash_dialog_hbci.schemas.in} (100%) rename src/import-export/schemas/{apps_gnucash_import_generic_matcher.schemas => apps_gnucash_import_generic_matcher.schemas.in} (100%) diff --git a/ChangeLog b/ChangeLog index 717d0d839d..ffd977c50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-01-18 David Hampton + + * All xxx.schemas files renamed to xxx.schemas.in. + * All schema directory Makefile.am files replaced. + * make-gnucash-potfiles.in: Now also pulls strings from schema + files. Together these fix bugs #327507 and #327353 which are + about schema file strings not being translated. + 2006-01-18 Joshua Sled * src/gnome/dialog-sx-from-trans.c (sxftd_update_fs): Propgate diff --git a/make-gnucash-potfiles.in b/make-gnucash-potfiles.in index 1cf8b815a9..79e3b73ede 100644 --- a/make-gnucash-potfiles.in +++ b/make-gnucash-potfiles.in @@ -10,7 +10,9 @@ use strict; use File::Basename; -my @possible_files = `find src -name '*.c' -o -name '*.glade' -o -name '*.desktop.in' -o -name '*.keys.in' |sort`; +my @possible_files = `find src -name '*.c' -o -name '*.glade' \\ + -o -name '*.desktop.in' -o -name '*.keys.in' \\ + -o -name '*.schemas.in' |sort`; ## For perl files add the following: # -o -name '*.pl' diff --git a/src/business/business-gnome/schemas/Makefile.am b/src/business/business-gnome/schemas/Makefile.am index a2c4454a16..85e96d2a1b 100644 --- a/src/business/business-gnome/schemas/Makefile.am +++ b/src/business/business-gnome/schemas/Makefile.am @@ -1,15 +1,10 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@ -dist_schema_DATA = \ - apps_gnucash_dialog_business_common.schemas +schemas_in_files = \ + apps_gnucash_dialog_business_common.schemas.in +schema_DATA = $(schemas_in_files:.schemas.in=.schemas) -install-data-local: -if GCONF_SCHEMAS_INSTALL - -mkdir -p $(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY) - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(dist_schema_DATA) -endif +@INTLTOOL_SCHEMAS_RULE@ -uninstall-local: -if GCONF_SCHEMAS_INSTALL - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(dist_schema_DATA) -endif +EXTRA_DIST = $(schemas_in_files) +CLEANFILES = $(schema_DATA) diff --git a/src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas b/src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas.in similarity index 100% rename from src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas rename to src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas.in diff --git a/src/gnome-utils/schemas/Makefile.am b/src/gnome-utils/schemas/Makefile.am index a2e5f2a322..8ed4541729 100644 --- a/src/gnome-utils/schemas/Makefile.am +++ b/src/gnome-utils/schemas/Makefile.am @@ -1,15 +1,10 @@ -schemadir = @GCONF_SCHEMA_FILE_DIR@ -dist_schema_DATA = \ - apps_gnucash_history.schemas +schemadir = @GCONF_SCHEMA_FILE_DIR@ +schemas_in_files = \ + apps_gnucash_history.schemas.in +schema_DATA = $(schemas_in_files:.schemas.in=.schemas) -install-data-local: -if GCONF_SCHEMAS_INSTALL - -mkdir -p $(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY) - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(dist_schema_DATA) -endif +@INTLTOOL_SCHEMAS_RULE@ -uninstall-local: -if GCONF_SCHEMAS_INSTALL - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(dist_schema_DATA) -endif +EXTRA_DIST = $(schemas_in_files) +CLEANFILES = $(schema_DATA) diff --git a/src/gnome-utils/schemas/apps_gnucash_history.schemas b/src/gnome-utils/schemas/apps_gnucash_history.schemas.in similarity index 100% rename from src/gnome-utils/schemas/apps_gnucash_history.schemas rename to src/gnome-utils/schemas/apps_gnucash_history.schemas.in diff --git a/src/gnome/schemas/Makefile.am b/src/gnome/schemas/Makefile.am index 42bcf820fa..50c55376fd 100644 --- a/src/gnome/schemas/Makefile.am +++ b/src/gnome/schemas/Makefile.am @@ -1,23 +1,18 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@ -dist_schema_DATA = \ - apps_gnucash_dialog_common.schemas \ - apps_gnucash_dialog_commodities.schemas \ - apps_gnucash_dialog_prices.schemas \ - apps_gnucash_dialog_reconcile.schemas \ - apps_gnucash_dialog_totd.schemas \ - apps_gnucash_general.schemas \ - apps_gnucash_warnings.schemas \ - apps_gnucash_window_pages_account_tree.schemas \ - apps_gnucash_window_pages_register.schemas +schemas_in_files = \ + apps_gnucash_dialog_common.schemas.in \ + apps_gnucash_dialog_commodities.schemas.in \ + apps_gnucash_dialog_prices.schemas.in \ + apps_gnucash_dialog_reconcile.schemas.in \ + apps_gnucash_dialog_totd.schemas.in \ + apps_gnucash_general.schemas.in \ + apps_gnucash_warnings.schemas.in \ + apps_gnucash_window_pages_account_tree.schemas.in \ + apps_gnucash_window_pages_register.schemas.in +schema_DATA = $(schemas_in_files:.schemas.in=.schemas) -install-data-local: -if GCONF_SCHEMAS_INSTALL - -mkdir -p $(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY) - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(dist_schema_DATA) -endif +@INTLTOOL_SCHEMAS_RULE@ -uninstall-local: -if GCONF_SCHEMAS_INSTALL - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(dist_schema_DATA) -endif +EXTRA_DIST = $(schemas_in_files) +CLEANFILES = $(schema_DATA) diff --git a/src/gnome/schemas/apps_gnucash_dialog_commodities.schemas b/src/gnome/schemas/apps_gnucash_dialog_commodities.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_commodities.schemas rename to src/gnome/schemas/apps_gnucash_dialog_commodities.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_dialog_common.schemas b/src/gnome/schemas/apps_gnucash_dialog_common.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_common.schemas rename to src/gnome/schemas/apps_gnucash_dialog_common.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_dialog_prices.schemas b/src/gnome/schemas/apps_gnucash_dialog_prices.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_prices.schemas rename to src/gnome/schemas/apps_gnucash_dialog_prices.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas b/src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas rename to src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas b/src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas rename to src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_dialog_totd.schemas b/src/gnome/schemas/apps_gnucash_dialog_totd.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_dialog_totd.schemas rename to src/gnome/schemas/apps_gnucash_dialog_totd.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_general.schemas b/src/gnome/schemas/apps_gnucash_general.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_general.schemas rename to src/gnome/schemas/apps_gnucash_general.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_warnings.schemas b/src/gnome/schemas/apps_gnucash_warnings.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_warnings.schemas rename to src/gnome/schemas/apps_gnucash_warnings.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas b/src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas rename to src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas.in diff --git a/src/gnome/schemas/apps_gnucash_window_pages_register.schemas b/src/gnome/schemas/apps_gnucash_window_pages_register.schemas.in similarity index 100% rename from src/gnome/schemas/apps_gnucash_window_pages_register.schemas rename to src/gnome/schemas/apps_gnucash_window_pages_register.schemas.in diff --git a/src/import-export/hbci/schemas/Makefile.am b/src/import-export/hbci/schemas/Makefile.am index 804022bc03..6ee166aab9 100644 --- a/src/import-export/hbci/schemas/Makefile.am +++ b/src/import-export/hbci/schemas/Makefile.am @@ -1,15 +1,10 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@ -dist_schema_DATA = \ - apps_gnucash_dialog_hbci.schemas +schemas_in_files = \ + apps_gnucash_dialog_hbci.schemas.in +schema_DATA = $(schemas_in_files:.schemas.in=.schemas) -install-data-local: -if GCONF_SCHEMAS_INSTALL - -mkdir -p $(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY) - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(dist_schema_DATA) -endif +@INTLTOOL_SCHEMAS_RULE@ -uninstall-local: -if GCONF_SCHEMAS_INSTALL - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(dist_schema_DATA) -endif +EXTRA_DIST = $(schemas_in_files) +CLEANFILES = $(schema_DATA) diff --git a/src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas b/src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas.in similarity index 100% rename from src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas rename to src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas.in diff --git a/src/import-export/schemas/Makefile.am b/src/import-export/schemas/Makefile.am index 4f28ec78b2..16af5703a9 100644 --- a/src/import-export/schemas/Makefile.am +++ b/src/import-export/schemas/Makefile.am @@ -1,15 +1,10 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@ -dist_schema_DATA = \ - apps_gnucash_import_generic_matcher.schemas +schemas_in_files = \ + apps_gnucash_import_generic_matcher.schemas.in +schema_DATA = $(schemas_in_files:.schemas.in=.schemas) -install-data-local: -if GCONF_SCHEMAS_INSTALL - -mkdir -p $(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY) - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(dist_schema_DATA) -endif +@INTLTOOL_SCHEMAS_RULE@ -uninstall-local: -if GCONF_SCHEMAS_INSTALL - -GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(dist_schema_DATA) -endif +EXTRA_DIST = $(schemas_in_files) +CLEANFILES = $(schema_DATA) diff --git a/src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas b/src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas.in similarity index 100% rename from src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas rename to src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas.in