Bugzilla – Attachment 173197 Details for
Bug 38136
Refactor database translations (alternative)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38136: Fix 'Delete' link
Bug-38136-Fix-Delete-link.patch (text/plain), 2.34 KB, created by
Jonathan Druart
on 2024-10-23 09:52:37 UTC
(
hide
)
Description:
Bug 38136: Fix 'Delete' link
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-23 09:52:37 UTC
Size:
2.34 KB
patch
obsolete
>From 236f4ecfb7bb348e4f099684b365ab92f586a6fc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 23 Oct 2024 11:52:00 +0200 >Subject: [PATCH] Bug 38136: Fix 'Delete' link > >When a new entry has been added the Delete link was wrong. > >Also fix translatability of "Delete" >--- > .../intranet-tmpl/prog/en/modules/admin/localization.tt | 3 ++- > svc/localization | 5 +++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >index 2ecb6347071..05da3414b21 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >@@ -269,7 +269,8 @@ > if ( success.error ) { > show_message({ type: 'error_on_insert', data: success }); > } else { >- var new_row = table.row.add( [ success.lang, success.translation, "<a href=\"#\" class=\"delete\"><i class=\"fa fa-trash-can\"></i> Delete</a>" ] ).draw().node(); >+ let delete_str = _("Delete"); >+ var new_row = table.row.add( [ success.lang, success.translation, "<a href=\"#\" class=\"delete\"><i class=\"fa fa-trash-can\"></i> %s</a>".format(escape_str(delete_str)) ] ).draw().node(); > $( new_row ).attr("id", "row_id_" + success.localization_id ).data("id", success.localization_id ); > show_message({ type: 'success_on_insert', data: success }); > } >diff --git a/svc/localization b/svc/localization >index 6dd2c5c1d02..15e78030b06 100755 >--- a/svc/localization >+++ b/svc/localization >@@ -64,8 +64,9 @@ sub add_translation { > Koha::Caches->get_instance('localization')->clear_from_cache("$source:$lang"); > > $response->param( >- lang => $localization->lang, >- translation => $localization->translation, >+ lang => $localization->lang, >+ translation => $localization->translation, >+ localization_id => $localization->id, > ); > } catch { > $response->param(error => 1, error_code => 'already_exists'); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38136
:
172585
|
172804
|
173195
|
173196
|
173197
|
173198
|
174578
|
174579
|
174580
|
174581
|
174598
|
174599
|
175077
|
175078
|
175082
|
175083
|
179978
|
180096
|
180136