Bug 40161

Summary: New translation not displayed when translating an item type
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low Keywords: rel_25_05_candidate
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38255    
Bug Blocks:    
Attachments: Bug 40161: (bug 38255 follow-up) Fix item type translation JS error
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Description Jonathan Druart 2025-06-18 11:41:17 UTC
Uncaught (in promise) TypeError: table.row is undefined
Comment 1 Jonathan Druart 2025-06-18 11:45:58 UTC
Created attachment 183327 [details] [review]
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Uncaught (in promise) TypeError: table.row is undefined

We need to use the DataTable object.

Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open the
modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation
Comment 2 Owen Leonard 2025-06-18 12:42:14 UTC
Created attachment 183328 [details] [review]
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error

Uncaught (in promise) TypeError: table.row is undefined

We need to use the DataTable object.

Test plan:
Have several languages installed
Edit an item type and click "Translate into other languages" to open
the modal
Translate into another language and note that:
Without this patch you get a JS error in the browser console and the
row is not added to the table
With this patch applied the row is added correctly with your translation

Signed-off-by: Owen Leonard <oleonard@myacpl.org>