</actions>
</permacrud>
</class>
+ <class id="i18ns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_string" oils_persist:tablename="config.i18n_string" oils_persist:field_safe="true" reporter:label="i18n String">
+ <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_string_id_seq">
+ <field name="id" reporter:datatype="id" />
+ <field name="context" reporter:datatype="text"/>
+ <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
+ </fields>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="CREATE_TRANSLATION" global_required="true"/>
+ <retrieve />
+ <update permission="UPDATE_TRANSLATION" global_required="true"/>
+ <delete permission="DELETE_TRANSLATION" global_required="true"/>
+ </actions>
+ </permacrud>
+ </class>
<class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
<fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
<field name="id" reporter:label="ID" reporter:datatype="id" />
routerLink="/staff/admin/server/config/hold_matrix_weights"></eg-link-table-link>
<eg-link-table-link i18n-label label="Import Match Sets"
routerLink="/staff/cat/vandelay/match_sets"></eg-link-table-link>
+ <eg-link-table-link i18n-label label="I18N: Localized Fieldmapper Strings"
+ routerLink="/staff/admin/local/config/i18n_core"></eg-link-table-link>
+ <eg-link-table-link i18n-label label="I18N: Localized UI Strings"
+ routerLink="/staff/admin/local/config/i18n_string"></eg-link-table-link>
<eg-link-table-link i18n-label label="Item Statuses"
routerLink="/staff/admin/server/config/copy_status"></eg-link-table-link>
<eg-link-table-link i18n-label label="Item Tag Types"
<ng-container *ngIf="ctx.holdMeta.parts.length">
<select class="form-control" (change)="setPart(ctx, $event)"
[ngModel]="ctx.holdMeta.part ? ctx.holdMeta.part.id() : (ctx.holdMeta.part_required ? ctx.holdMeta.parts[0].id() : '')">
- <option *ngIf="!ctx.holdMeta.part_required" value="" i18n>Any Part</option>
+ <option *ngIf="!ctx.holdMeta.part_required" value="">{{anyPartLabel}}</option>
<option *ngFor="let part of ctx.holdMeta.parts"
value="{{part.id()}}">{{part.label()}}</option>
</select>
activeDateYmd: string;
activeDate: Date;
activeDateInvalid = false;
+ anyPartLabel: string;
holdContexts: HoldContext[];
recordSummaries: BibRecordSummary[];
}
});
+ this.pcrud.retrieve('i18ns', 1) // Any Part
+ .subscribe(i18n_string => {
+ this.anyPartLabel = i18n_string.string();
+ });
+
if (!Array.isArray(this.holdTargets)) {
this.holdTargets = [this.holdTargets];
}
$logger->info("Looking at hold_type: " . $ctx->{hold_type} . " and targets: @targets");
+ my $any_part_label = $self->editor->retrieve_config_i18n_string([1, {}]);
+ $any_part_label = $any_part_label->string if $any_part_label;
+ $ctx->{any_part_label} = $any_part_label;
$ctx->{staff_recipient} = $self->editor->retrieve_actor_user([
$e->requestor->id,
{
END;
$_$ LANGUAGE PLPGSQL;
+-- this may grow to support full GNU gettext functionality
+CREATE TABLE config.i18n_string (
+ id SERIAL PRIMARY KEY,
+ context TEXT NOT NULL, -- hint for translators to disambiguate
+ string TEXT NOT NULL
+);
+
CREATE TABLE config.billing_type (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
AND t.xlate IS NOT NULL
AND t.name <> (xlate->value);
+INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons, when monographic parts are available, this would be the option for indicating that no specific part is being requested.', 'Any Part');
+
INSERT INTO authority.heading_field(heading_type, heading_purpose, label, heading_xpath, component_xpath, type_xpath, thesaurus_xpath, thesaurus_override_xpath) VALUES
( 'topical_term', 'main', 'Main Topical Term', '/mads21:mads/mads21:authority', '//mads21:topic', NULL, '/mads21:mads/mads21:authority/mads21:topic[1]/@authority', NULL )
,( 'topical_term', 'variant', 'Variant Topical Term', '/mads21:mads/mads21:variant', '//mads21:topic', '/mads21:variant/@type', '/mads21:mads/mads21:authority/mads21:topic[1]/@authority', '//mads21:topic[1]/@authority')
--- /dev/null
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('YYYY', :eg_version);
+
+-- 002.schema.config.sql
+
+-- this may grow to support full GNU gettext functionality
+CREATE TABLE config.i18n_string (
+ id SERIAL PRIMARY KEY,
+ context TEXT NOT NULL, -- hint for translators to disambiguate
+ string TEXT NOT NULL
+);
+
+-- 950.data.seed-values.sql
+
+INSERT INTO config.i18n_string (id, context, string) VALUES (1, 'In the Place Hold interfaces for staff and patrons, when monographic parts are available, this would be the option for indicating that no specific part is being requested.', 'Any Part');
+
+COMMIT;
<div class='radio-parts-selection'>
[% IF !hdata.part_required %]
<span class='parts-radio-option'>
- <input type='radio' name='part' value='' onchange='maybeToggleNumCopies(this);' required>[% l('All Parts') %]</span>
+ <input type='radio' name='part' value='' onchange='maybeToggleNumCopies(this);' required>[% ctx.any_part_label %]</span>
[% END %]
[% FOR part IN hdata.parts %]
<span class='parts-radio-option'><input type='radio' name='part' id=[% part.id %] value=[% part.id %] onchange='maybeToggleNumCopies(this);' required>
%]</label></span>
<select id='select_hold_part' name='part' onchange='maybeToggleNumCopies(this);'>
[% IF !hdata.part_required %]
- <option selected='selected' value=''>[% l('- All Parts -') %]</option>
+ <option selected='selected' value=''>[% ctx.any_part_label %]</option>
[% END %]
[% FOR part IN hdata.parts %]
<option value='[% part.id %]'>[% part.label | html %]</option>
<div class='radio-parts-selection'>
[% IF !hdata.part_required %]
<span class='parts-radio-option'>
- <input type='radio' name='part' value='' onchange='maybeToggleNumCopies(this);' required>[% l('All Parts') %]</span>
+ <input type='radio' name='part' value='' onchange='maybeToggleNumCopies(this);' required>[% ctx.any_part_label %]</span>
[% END %]
[% FOR part IN hdata.parts %]
<span class='parts-radio-option'><input type='radio' name='part' id=[% part.id %] value=[% part.id %] onchange='maybeToggleNumCopies(this);' required>
%]</label></span>
<select id='select_hold_part' name='part' onchange='maybeToggleNumCopies(this);'>
[% IF !hdata.part_required %]
- <option selected='selected' value=''>[% l('- All Parts -') %]</option>
+ <option selected='selected' value=''>[% ctx.any_part_label %]</option>
[% END %]
[% FOR part IN hdata.parts %]
<option value='[% part.id %]'>[% part.label | html %]</option>
event for a title hold request when there are items with monographic parts on the bib. It is possible for
the library settings and the global flag to differ, but the global flag will catch every instance of hold
placement including those by third party callers, SIP, etc.
+
+* LP1902120 the All/Any Part(s) label
+
+ This feature creates a new table for localizable strings intended to be used in
+ UI's. This is not a replacement for the existing I18N system for templates,
+ but does allow developers to choose some strings to be more easily accessible
+ to staff/admins for dynamic localization. The string we're focused on here is
+ a replacement for the "All Parts" and "Any Part" label in various Place Hold
+ interfaces when monographic parts are an option. There is a UI for managing
+ such strings under Administration -> Server Administration -> I18N: Localized
+ UI Strings. An admin could change the "string" field directly, or use the
+ existing Apply Translation mechanism to customize the string for a specific
+ locale.
+
+ As a bonus feature, we also expose an alternate UI for handling entries for
+ said Translation mechanism. This can be found under Administration -> Server
+ Administration -> I18N: Localized Fieldmapper Strings.
+
+ These customizations are global to the Evergreen installation.
+