Bug 38085: Pick multiple_sortable options for translation

Bug 29948 added a "multiple_sortable" type for sysprefs, to have the
options sortable. But the options were not picked for translation.

This patch fixes it.

Test plan:
Run `cd misc/translator && perl translate update LANG` before and after
this patch. Notice that with this patch you see the different options of
OPACAuthorIdentifiersAndInformation in the LANG-pref.po file (eg.
"Associated group (373$a$s$t$u$v$0)")
Translate the options
Install the translated version of the templates and confirm that the
strings appear translated on the interface.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 738c641bcc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2024-10-07 11:31:36 +02:00 committed by Lucas Gass
parent 400435d4fb
commit 82ecc318f9
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ sub get_translated_pref {
my $value = $syspref->{$key};
my $translated_value = $value;
if (($key eq 'choices' || $key eq 'multiple') && ref($value) eq 'HASH') {
if (($key eq 'choices' || $key eq 'multiple' || $key eq 'multiple_sortable') && ref($value) eq 'HASH') {
$translated_value = {
map {
my $msgid = sprintf('%s#%s# %s', $file, $pref_name, $value->{$_});

View File

@ -120,7 +120,7 @@ sub add_prefs {
for my $element (@$pref) {
if ( ref($element) eq 'HASH' ) {
while ( my ( $key, $value ) = each(%$element) ) {
next unless $key eq 'choices' or $key eq 'multiple';
next unless $key eq 'choices' or $key eq 'multiple' or $key eq 'multiple_sortable';
next unless ref($value) eq 'HASH';
for my $ckey ( keys %$value ) {
my $msgid = sprintf('%s#%s# %s', basename($file), $pref_name, $value->{$ckey});