]> git.evergreen-ils.org Git - working/Evergreen.git/commit
This feature supplies the ability to create alternate templates for Action Triggers
authorRogan Hamby <rogan.hamby@gmail.com>
Wed, 23 Feb 2022 18:55:01 +0000 (13:55 -0500)
committerJane Sandberg <sandbergja@gmail.com>
Mon, 28 Mar 2022 12:33:11 +0000 (05:33 -0700)
commitc318a31d41ab2c9dedc05cc18e64c1d9f7c6ca89
tree21331bf28cc480d3f85bce0d50fa1aeb4afc469f
parent1a07bfb3bdfca6a10db36e2c92ae7c4ea7af21c3
This feature supplies the ability to create alternate templates for Action Triggers
that will generate locale specific out for Action Triggers.  If you send notices in
multiple languages, we recommend putting some words to that effect in your notice
templates.  The template, message and message title can all be localized.  To use the
feature the following new UI elements have been added:

- When you double-click on an Event Definition under Notifications / Action Triggers
  to edit it there will be a tab option for Edit Alternate Template if the reactor is
  ProcessTemplate, SendEmail or SendSMS.
- In the Patron Registration and Patron Editor screens staff members may now select a
  locale for a patron and edit it in the Patron Preferred Language field.
- Patrons may set their own locale in the My Account interface off the OPAC by going to
  Preferences -> Personal Information and setting the Preferred Language field.

The templates used on the Edit Definition tab are the defaults that are used if there are
no alternate templates available that match the preferred language.  If alternate templates
are available the system will use a locale that is an exact match and then if failing that
use one where the language code matches and then fall back to the default one.

For example, if a patron has a locale of fr-CA and there are templates for both fr-CA and
fr-FR it will use the fr-CA.  If the fr-CA template was deleted it would fall back on using
the fr-FR for the patron since it at least shares the same base language.

Valid locales are the codes defined in the i18n_locale table in the config schema.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
19 files changed:
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preferred_locale_and_alternate_at_templates.sql [new file with mode: 0644]
Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/update_locale.tt2 [new file with mode: 0755]
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
Open-ILS/src/templates/staff/circ/patron/t_summary.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
docs/RELEASE_NOTES_NEXT/Administration/localized_action_triggers.adoc [new file with mode: 0644]