[Koha-bugs] [Bug 33983] Move translatable strings out of OPAC's datatables.inc into JavaScript

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 16 16:26:53 CEST 2023


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

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #152277|0                           |1
        is obsolete|                            |

--- Comment #5 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 152419
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152419&action=edit
Bug 33983: Move translatable strings out of OPAC's datatables.inc into
JavaScript

This patch removes the definition of translatable strings out of
the OPAC datatables.inc file and into datatables.js using the new JS
i81n function.

To test apply the patch and test some DataTable-driven tables in the
OPAC. A list of possible examples:

- Cart
- Bibliographic detail page
  - Place hold (with OPAC item level holds enabled in circulation rules)
    - Show more options ->
      - A specific item
- Bibliographic detail page for a serial record ->
  - More details ->
    - Full history
- Most popular
- Self checkout
- Logged in user ->
  - Charges
  - Curbside pickups
  - Messaging
  - Checkout history
  - Suggestions
  - Holds history
  - Tags
  - Recalls history
  - Search history
  - ILL requests

DataTables functionality should be unaffected. Check that the strings
defined for translation are still working. For instance the "Clear
filter" label on user summary checkouts, or the "No matching records
found" text displayed when you search a table for a string that doesn't
exist.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.:

  msgid "Clear filter"

- Edit the corresponding "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language and repeat the test plan
  above. The translated strings should appear.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list