From 2a1b98c37567f4a7a5f5996b65e09a90d92b2f16 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Apr 2012 04:16:31 -0400 Subject: [PATCH] Signed-off-by: swenyu duan Add oils_i18n_gettext for some of config.org_unit_setting_type in upgrade sql. When upgrading the database using current /upgrade/ sql files, some of the config.org_unit_setting_types will disapper. The patch modifies the upgrade sql and add oils_i18n_gettext() to each bug schema. --- .../0001.data.config.org_unit_setting_type.sql | 48 +++++++++++++++----- ....org-setting-lib-supports-behind-desk-holds.sql | 14 +++++- ...0050.data.org-setting-canceled-holds-limits.sql | 24 ++++++++-- .../0051.data.org-setting-uncancel-hold-reset.sql | 12 ++++- .../upgrade/0529.data.merge_user-ou_settings.sql | 36 ++++++++++++--- .../Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql | 16 +++++-- 6 files changed, 119 insertions(+), 31 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql b/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql index 9629d65..000c8fe 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql @@ -5,24 +5,48 @@ BEGIN; INSERT INTO config.upgrade_log (version) VALUES ('0001'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( - 'circ.holds.org_unit_target_weight', - 'Holds: Org Unit Target Weight', - 'Org Units can be organized into hold target groups based on a weight. Potential copies from org units with the same weight are chosen at random.', - 'integer' + 'circ.holds.org_unit_target_weight', + oils_i18n_gettext( + 'circ.holds.org_unit_target_weight', + 'Holds: Org Unit Target Weight', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.org_unit_target_weight', + 'Org Units can be organized into hold target groups based on a weight. Potential copies from org units with the same weight are chosen at random.', + 'coust', + 'description'), + 'integer' ); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( - 'circ.holds.target_holds_by_org_unit_weight', - 'Holds: Use weight-based hold targeting', - 'Use library weight based hold targeting', - 'bool' + 'circ.holds.target_holds_by_org_unit_weight', + oils_i18n_gettext( + 'circ.holds.target_holds_by_org_unit_weight', + 'Holds: Use weight-based hold targeting', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.target_holds_by_org_unit_weight', + 'Use library weight based hold targeting', + 'coust', + 'description'), + 'bool' ); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( - 'circ.holds.max_org_unit_target_loops', - 'Holds: Maximum library target attempts', - 'When this value is set and greater than 0, the system will only attempt to find a copy at each possible branch the configured number of times', - 'integer' + 'circ.holds.max_org_unit_target_loops', + oils_i18n_gettext( + 'circ.holds.max_org_unit_target_loops', + 'Holds: Maximum library target attempts', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.max_org_unit_target_loops', + 'When this value is set and greater than 0, the system will only attempt to find a copy at each possible branch the configured number of times', + 'coust', + 'description'), + 'integer' ); COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql b/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql index dcaed34..c401b47 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql @@ -4,9 +4,17 @@ INSERT INTO config.upgrade_log (version) VALUES ('0008'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.holds.behind_desk_pickup_supported', - 'Holds: Behind Desk Pickup Supported', - 'If a branch supports both a public holds shelf and behind-the-desk pickups, set this value to true. This gives the patron the option to enable behind-the-desk pickups for their holds', - 'bool' + oils_i18n_gettext( + 'circ.holds.behind_desk_pickup_supported', + 'Holds: Behind Desk Pickup Supported', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.behind_desk_pickup_supported', + 'If a branch supports both a public holds shelf and behind-the-desk pickups, set this value to true. This gives the patron the option to enable behind-the-desk pickups for their holds', + 'coust', + 'description'), + 'bool' ); COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/0050.data.org-setting-canceled-holds-limits.sql b/Open-ILS/src/sql/Pg/upgrade/0050.data.org-setting-canceled-holds-limits.sql index 58159f2..b6b21e2 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0050.data.org-setting-canceled-holds-limits.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0050.data.org-setting-canceled-holds-limits.sql @@ -5,16 +5,32 @@ INSERT INTO config.upgrade_log (version) VALUES ('0050'); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.holds.canceled.display_count', - 'Holds: Canceled holds display count', - 'How many canceled holds to show in patron holds interfaces', + oils_i18n_gettext( + 'circ.holds.canceled.display_count', + 'Holds: Canceled holds display count', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.canceled.display_count', + 'How many canceled holds to show in patron holds interfaces', + 'coust', + 'description'), 'integer' ); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.holds.canceled.display_age', - 'Holds: Canceled holds display age', - 'Show all canceled holds that were canceled within this amount of time', + oils_i18n_gettext( + 'circ.holds.canceled.display_age', + 'Holds: Canceled holds display age', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.canceled.display_age', + 'Show all canceled holds that were canceled within this amount of time', + 'coust', + 'description'), 'interval' ); diff --git a/Open-ILS/src/sql/Pg/upgrade/0051.data.org-setting-uncancel-hold-reset.sql b/Open-ILS/src/sql/Pg/upgrade/0051.data.org-setting-uncancel-hold-reset.sql index b0e0d59..395c27e 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0051.data.org-setting-uncancel-hold-reset.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0051.data.org-setting-uncancel-hold-reset.sql @@ -5,8 +5,16 @@ INSERT INTO config.upgrade_log (version) VALUES ('0051'); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.holds.uncancel.reset_request_time', - 'Holds: Reset request time on un-cancel', - 'When a holds is uncanceled, reset the request time to push it to the end of the queue', + oils_i18n_gettext( + 'circ.holds.uncancel.reset_request_time', + 'Holds: Reset request time on un-cancel', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.uncancel.reset_request_time', + 'When a holds is uncanceled, reset the request time to push it to the end of the queue', + 'coust', + 'description'), 'bool' ); diff --git a/Open-ILS/src/sql/Pg/upgrade/0529.data.merge_user-ou_settings.sql b/Open-ILS/src/sql/Pg/upgrade/0529.data.merge_user-ou_settings.sql index 6bc688f..58b5d0b 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0529.data.merge_user-ou_settings.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0529.data.merge_user-ou_settings.sql @@ -5,24 +5,48 @@ INSERT INTO config.upgrade_log (version) VALUES ('0529'); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.user_merge.delete_addresses', - 'Circ: Patron Merge Address Delete', - 'Delete address(es) of subordinate user(s) in a patron merge', + oils_i18n_gettext( + 'circ.user_merge.delete_addresses', + 'Circ: Patron Merge Address Delete', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.user_merge.delete_addresses', + 'Delete address(es) of subordinate user(s) in a patron merge', + 'coust', + 'description'), 'bool' ); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.user_merge.delete_cards', - 'Circ: Patron Merge Barcode Delete', - 'Delete barcode(s) of subordinate user(s) in a patron merge', + oils_i18n_gettext( + 'circ.user_merge.delete_cards', + 'Circ: Patron Merge Barcode Delete', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.user_merge.delete_cards', + 'Delete barcode(s) of subordinate user(s) in a patron merge', + 'coust', + 'description'), 'bool' ); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( 'circ.user_merge.deactivate_cards', - 'Circ: Patron Merge Deactivate Card', - 'Mark barcode(s) of subordinate user(s) in a patron merge as inactive', + oils_i18n_gettext( + 'circ.user_merge.deactivate_cards', + 'Circ: Patron Merge Deactivate Card', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.user_merge.deactivate_cards', + 'Mark barcode(s) of subordinate user(s) in a patron merge as inactive', + 'coust', + 'description'), 'bool' ); diff --git a/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql index 698179f..9176278 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql @@ -1880,10 +1880,18 @@ INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VA -- Setting for behind the desk hold pickups INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( - 'circ.holds.behind_desk_pickup_supported', - 'Holds: Behind Desk Pickup Supported', - 'If a branch supports both a public holds shelf and behind-the-desk pickups, set this value to true. This gives the patron the option to enable behind-the-desk pickups for their holds', - 'bool' + 'circ.holds.behind_desk_pickup_supported', + oils_i18n_gettext( + 'circ.holds.behind_desk_pickup_supported', + 'Holds: Behind Desk Pickup Supported', + 'coust', + 'label'), + oils_i18n_gettext( + 'circ.holds.behind_desk_pickup_supported', + 'If a branch supports both a public holds shelf and behind-the-desk pickups, set this value to true. This gives the patron the option to enable behind-the-desk pickups for their holds', + 'coust', + 'label'), + 'bool' ); INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES ( -- 1.7.2.5