[open-ils-commits] [GIT] Evergreen ILS branch master updated. 4a13d896946250245e6866357c1b2ce134c01417

Evergreen Git git at git.evergreen-ils.org
Fri Nov 4 16:56:55 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  4a13d896946250245e6866357c1b2ce134c01417 (commit)
      from  481133f0b0433ff373dcf2eb88c8bb1645bb5c2d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a13d896946250245e6866357c1b2ce134c01417
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Nov 2 09:47:04 2011 -0400

    Tpac; hold error message 18n string extraction repairs
    
    Make it possible for xgettext.pl (using
    Locale::Maketext::Extract::Plugin::TT2) to extract hold error
    message strings for translation.  The plugin is not quite
    smart enough to extract wholly dynamic values from the templates, since
    it (presumably) only parses the templates and does not execute them.
    The solution is to wrap the strings in l() where they are defined.
    
    Add an example for the EVENT_MSG_MAP for the event PATRON_EXCEEDS_FINES.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2 b/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
index 9ba6f0e..e79e81d 100644
--- a/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
+++ b/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
@@ -8,23 +8,23 @@
     # these are used to pass them through l() for i18n.
 
     FAIL_PART_MSG_MAP = {
-        "actor.usr.barred" => "The patron is barred",
-        "asset.copy.circulate" => "The item does not circulate",
-        "asset.copy_location.circulate" => "Items from this shelving location do not circulate",
-        "asset.copy.status" => "The item cannot circulate at this time",
-        "circ.holds.target_skip_me" => "The item's circulation library does not fulfill holds",
-        "config.circ_matrix_circ_mod_test" => "The patron has too many items of this type checked out",
-        "config.circ_matrix_test.available_copy_hold_ratio" => "The available item-to-hold ratio is too low",
-        "config.circ_matrix_test.circulate" => "Circulation rules reject this item as non-circulatable",
-        "config.circ_matrix_test.total_copy_hold_ratio" => "The total item-to-hold ratio is too low",
-        "config.hold_matrix_test.holdable" => "Hold rules reject this item as unholdable",
-        "config.hold_matrix_test.max_holds" => "The patron has reached the maximum number of holds",
-        "config.rule_age_hold_protect.prox" => "The item is too new to transit this far",
-        "no_item" => "The system could not find this item",
-        "no_ultimate_items" => "The system could not find any items to match this hold request",
-        "no_matchpoint" => "System rules do not define how to handle this item",
-        "no_user" => "The system could not find this patron",
-        "transit_range" => "The item cannot transit this far"
+        "actor.usr.barred" => l("The patron is barred"),
+        "asset.copy.circulate" => l("The item does not circulate"),
+        "asset.copy_location.circulate" => l("Items from this shelving location do not circulate"),
+        "asset.copy.status" => l("The item cannot circulate at this time"),
+        "circ.holds.target_skip_me" => l("The item's circulation library does not fulfill holds"),
+        "config.circ_matrix_circ_mod_test" => l("The patron has too many items of this type checked out"),
+        "config.circ_matrix_test.available_copy_hold_ratio" => l("The available item-to-hold ratio is too low"),
+        "config.circ_matrix_test.circulate" => l("Circulation rules reject this item as non-circulatable"),
+        "config.circ_matrix_test.total_copy_hold_ratio" => l("The total item-to-hold ratio is too low"),
+        "config.hold_matrix_test.holdable" => l("Hold rules reject this item as unholdable"),
+        "config.hold_matrix_test.max_holds" => l("The patron has reached the maximum number of holds"),
+        "config.rule_age_hold_protect.prox" => l("The item is too new to transit this far"),
+        "no_item" => l("The system could not find this item"),
+        "no_ultimate_items" => l("The system could not find any items to match this hold request"),
+        "no_matchpoint" => l("System rules do not define how to handle this item"),
+        "no_user" => l("The system could not find this patron"),
+        "transit_range" => l("The item cannot transit this far")
     };
 
 
@@ -34,5 +34,6 @@
     # Wait until these are used to pass them through l() for i18n.
 
     EVENT_MSG_MAP = {
+        "PATRON_EXCEEDS_FINES" => l("Patron has reached the maximum fine amount")
     };
 %]
diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
index b83a811..7ff5541 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2
@@ -53,8 +53,8 @@
                                                 event_key = hdata.hold_failed_event.textcode;
 
                                                 # display:
-                                                l(FAIL_PART_MSG_MAP.$fail_part_key) ||
-                                                l(EVENT_MSG_MAP.$event_key) ||
+                                                FAIL_PART_MSG_MAP.$fail_part_key ||
+                                                EVENT_MSG_MAP.$event_key ||
                                                 l(hdata.hold_failed_event.desc) ||
                                                 hdata.hold_failed_event.payload.fail_part ||
                                                 hdata.hold_failed_event.textcode ||

-----------------------------------------------------------------------

Summary of changes:
 .../templates/opac/parts/hold_error_messages.tt2   |   35 ++++++++++---------
 .../src/templates/opac/parts/place_hold_result.tt2 |    4 +-
 2 files changed, 20 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list