LP#1770979: tag item alert type names for translation user/gmcharlt/lp1770979_ccat_name_i18n
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 31 Mar 2023 14:44:55 +0000 (10:44 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 31 Mar 2023 14:44:55 +0000 (10:44 -0400)
This patch tags the stock item alert type names in the seed database
to be translated; it also marks ccat.name as translatable.

This patch intentionally does not include any UI work, as Angularizing
the administration interface for item alert types is a separate bug.

To test
-------
[1] Apply the patch.
[2] Do the following:

    cd build/i18n
    make newpot

[3] Verify that po/db.seed/db.seed.pot includes entries for
    the item alert type names.
[4] (optional) run through the translation process

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/950.data.seed-values.sql

index 63353a3..58bcbf9 100644 (file)
@@ -8190,7 +8190,7 @@ SELECT  usr,
                        <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
                        <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
                        <field reporter:label="Active" name="active" reporter:datatype="bool" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" />
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
                        <field reporter:label="State" name="state" reporter:datatype="text"/>
                        <field reporter:label="Event" name="event" reporter:datatype="text" />
                        <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
index 346c273..00b4cb2 100644 (file)
@@ -18196,62 +18196,62 @@ VALUES (
 
 -- staff-usable alert types with no location awareness
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
-VALUES (1, 1, TRUE, 'Normal checkout', 'NORMAL', 'CHECKOUT', FALSE);
+VALUES (1, 1, TRUE, oils_i18n_gettext(1, 'Normal checkout', 'ccat', 'name'), 'NORMAL', 'CHECKOUT', FALSE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
-VALUES (2, 1, TRUE, 'Normal checkin', 'NORMAL', 'CHECKIN', FALSE);
+VALUES (2, 1, TRUE, oils_i18n_gettext(2, 'Normal checkin', 'ccat', 'name'), 'NORMAL', 'CHECKIN', FALSE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
-VALUES (3, 1, FALSE, 'Normal renewal', 'NORMAL', 'CHECKIN', TRUE);
+VALUES (3, 1, FALSE, oils_i18n_gettext(3, 'Normal renewal', 'ccat', 'name'), 'NORMAL', 'CHECKIN', TRUE);
 
 -- copy alerts upon checkin or renewal of exceptional copy statuses are active by
 -- default; users who are not yet using the web staff client for circulation may
 -- want to turn them off
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (4, 1, TRUE, 'Checkin of lost copy', 'LOST', 'CHECKIN');
+VALUES (4, 1, TRUE, oils_i18n_gettext(4, 'Checkin of lost copy', 'ccat', 'name'), 'LOST', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (5, 1, TRUE, 'Checkin of missing copy', 'MISSING', 'CHECKIN');
+VALUES (5, 1, TRUE, oils_i18n_gettext(5, 'Checkin of missing copy', 'ccat', 'name'), 'MISSING', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (6, 1, TRUE, 'Checkin of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKIN');
+VALUES (6, 1, TRUE, oils_i18n_gettext(6, 'Checkin of lost-and-paid copy', 'ccat', 'name'), 'LOST_AND_PAID', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (7, 1, TRUE, 'Checkin of damaged copy', 'DAMAGED', 'CHECKIN');
+VALUES (7, 1, TRUE, oils_i18n_gettext(7,'Checkin of damaged copy', 'ccat', 'name'), 'DAMAGED', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (8, 1, TRUE, 'Checkin of claims-returned copy', 'CLAIMSRETURNED', 'CHECKIN');
+VALUES (8, 1, TRUE, oils_i18n_gettext(8,'Checkin of claims-returned copy', 'ccat', 'name'), 'CLAIMSRETURNED', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (9, 1, TRUE, 'Checkin of long overdue copy', 'LONGOVERDUE', 'CHECKIN');
+VALUES (9, 1, TRUE, oils_i18n_gettext(9, 'Checkin of long overdue copy', 'ccat', 'name'), 'LONGOVERDUE', 'CHECKIN');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (10, 1, TRUE, 'Checkin of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKIN');
+VALUES (10, 1, TRUE, oils_i18n_gettext(10, 'Checkin of claims-never-checked-out copy', 'ccat', 'name'), 'CLAIMSNEVERCHECKEDOUT', 'CHECKIN');
 
 -- copy alerts upon checkout of exceptional copy statuses are active by
 -- default; users who are not yet using the web staff client for circulation may
 -- want to turn them off
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (11, 1, TRUE, 'Checkout of lost copy', 'LOST', 'CHECKOUT');
+VALUES (11, 1, TRUE, oils_i18n_gettext(11, 'Checkout of lost copy', 'ccat', 'name'), 'LOST', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (12, 1, TRUE, 'Checkout of missing copy', 'MISSING', 'CHECKOUT');
+VALUES (12, 1, TRUE, oils_i18n_gettext(12, 'Checkout of missing copy', 'ccat', 'name'), 'MISSING', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (13, 1, TRUE, 'Checkout of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKOUT');
+VALUES (13, 1, TRUE, oils_i18n_gettext(13, 'Checkout of lost-and-paid copy', 'ccat', 'name'), 'LOST_AND_PAID', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (14, 1, TRUE, 'Checkout of damaged copy', 'DAMAGED', 'CHECKOUT');
+VALUES (14, 1, TRUE, oils_i18n_gettext(14, 'Checkout of damaged copy', 'ccat', 'name'), 'DAMAGED', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (15, 1, TRUE, 'Checkout of claims-returned copy', 'CLAIMSRETURNED', 'CHECKOUT');
+VALUES (15, 1, TRUE, oils_i18n_gettext(15, 'Checkout of claims-returned copy', 'ccat', 'name'), 'CLAIMSRETURNED', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (16, 1, TRUE, 'Checkout of long overdue copy', 'LONGOVERDUE', 'CHECKOUT');
+VALUES (16, 1, TRUE, oils_i18n_gettext(16, 'Checkout of long overdue copy', 'ccat', 'name'), 'LONGOVERDUE', 'CHECKOUT');
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
-VALUES (17, 1, TRUE, 'Checkout of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKOUT');
+VALUES (17, 1, TRUE, oils_i18n_gettext(17, 'Checkout of claims-never-checked-out copy', 'ccat', 'name'), 'CLAIMSNEVERCHECKEDOUT', 'CHECKOUT');
 
 -- staff-usable alert types based on location
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
-VALUES (18, 1, FALSE, 'Normal checkout at circ lib', 'NORMAL', 'CHECKOUT', FALSE, TRUE);
+VALUES (18, 1, FALSE, oils_i18n_gettext(18, 'Normal checkout at circ lib', 'ccat', 'name'), 'NORMAL', 'CHECKOUT', FALSE, TRUE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
-VALUES (19, 1, FALSE, 'Normal checkin at circ lib', 'NORMAL', 'CHECKIN', FALSE, TRUE);
+VALUES (19, 1, FALSE, oils_i18n_gettext(19, 'Normal checkin at circ lib', 'ccat', 'name'), 'NORMAL', 'CHECKIN', FALSE, TRUE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
-VALUES (20, 1, FALSE, 'Normal renewal at circ lib', 'NORMAL', 'CHECKIN', TRUE, TRUE);
+VALUES (20, 1, FALSE, oils_i18n_gettext(20, 'Normal renewal at circ lib', 'ccat', 'name'), 'NORMAL', 'CHECKIN', TRUE, TRUE);
 
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
-VALUES (21, 1, FALSE, 'Normal checkout at owning lib', 'NORMAL', 'CHECKOUT', FALSE, TRUE);
+VALUES (21, 1, FALSE, oils_i18n_gettext(21, 'Normal checkout at owning lib', 'ccat', 'name'), 'NORMAL', 'CHECKOUT', FALSE, TRUE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
-VALUES (22, 1, FALSE, 'Normal checkin at owning lib', 'NORMAL', 'CHECKIN', FALSE, TRUE);
+VALUES (22, 1, FALSE, oils_i18n_gettext(22, 'Normal checkin at owning lib', 'ccat', 'name'), 'NORMAL', 'CHECKIN', FALSE, TRUE);
 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
-VALUES (23, 1, FALSE, 'Normal renewal at owning lib', 'NORMAL', 'CHECKIN', TRUE, TRUE);
+VALUES (23, 1, FALSE, oils_i18n_gettext(23, 'Normal renewal at owning lib', 'ccat', 'name'), 'NORMAL', 'CHECKIN', TRUE, TRUE);
 
 -- OU settings related to copy alerts
 INSERT INTO config.org_unit_setting_type