https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23649

--- Comment #64 from Pedro Amorim (ammopt) <[email protected]> ---
Created attachment 211650
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211650&action=edit
Bug 23649: (follow-up) Make relevance boost JS strings translatable

The relevance boost error messages, the 0 matches warning and the
Delete button of rows added via AJAX were plain JS string literals,
not picked up by the translator.

Test plan:
1) Apply the patch, then update the Spanish staff po file:
   gulp po:update --lang es-ES --task staff-prog
2) Translate the new strings:
   perl -00 -pi -e '
   my %t = ( "Invalid boost weight" => "Peso \x27%s\x27 no válido.", "This
boost currently matches 0" => "Este refuerzo no coincide con ningún registro."
);
   for my $k (keys %t) { next unless /^msgid "\Q$k\E/m; s/^#, fuzzy\n//m; s/^#,
fuzzy, /#, /m; s/^#\|.*\n//mg; s/^msgstr ".*"$/msgstr "$t{$k}"/m; }
   ' /kohadevbox/koha/misc/translator/po/es-ES-staff-prog.po
3) Install the translation, flush the cache and restart plack:
   cd /kohadevbox/koha/misc/translator && ./translate install es-ES
   perl -MKoha::Caches -e 'Koha::Caches->get_instance->flush_all' && koha-plack
--restart kohadev
4) Enable 'es-ES' in the 'StaffInterfaceLanguages' system preference and
   switch the staff interface to 'Español' from the footer.
5) Go to
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
   'Bibliographic records' tab, 'Relevance boosts' section.
6) Select 'Location (location)', enter value 'GEN' and weight '1000', click
   'Agregar'. Notice the error "Peso '1000' no válido."
7) Select 'Location (location)', enter value 'totally-bogus-value' and
   weight '1.00', click 'Agregar'. Notice the warning "Este refuerzo no
   coincide con ningún registro."

Sponsored-by: Southeast Kansas Library System

Co-Authored-By: Claude Opus 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to