Bug 40161 - New translation not displayed when translating an item type
Summary: New translation not displayed when translating an item type
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords: rel_25_05_candidate, release-notes-needed
Depends on: 38255
Blocks:
  Show dependency treegraph
 
Reported: 2025-06-18 11:41 UTC by Jonathan Druart
Modified: 2025-07-29 18:48 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.02
Circulation function:


Attachments
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error (2.46 KB, patch)
2025-06-18 11:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error (2.51 KB, patch)
2025-06-18 12:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40161: (bug 38255 follow-up) Fix item type translation JS error (2.61 KB, patch)
2025-06-24 14:33 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>
Comment 3 Marcel de Rooy 2025-06-24 14:33:08 UTC
Created attachment 183464 [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>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2025-06-24 14:34:44 UTC
Just curious: Why change var to let here? It does not make any difference here (same block, same function). Do we have some rule about it?
Comment 5 Lucas Gass (lukeg) 2025-06-24 21:27:10 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Paul Derscheid 2025-07-09 11:43:34 UTC
Nice work everyone!

Pushed to 25.05.x for 25.05.01
Comment 7 Fridolin Somers 2025-07-25 13:44:51 UTC
Depends on Bug 38255 not in 24.11.x
Comment 8 David Nind 2025-07-29 18:48:07 UTC
Bug fix, no changes to the manual required.